import React, { ForwardedRef, useContext } from 'react';
import { OriginIconProps } from '../type';
import { Context } from '../context';

function IconDrawerFoldComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = true, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-drawer-fold${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M6 8.97656C6 8.42428 6.44772 7.97656 7 7.97656H41C41.5523 7.97656 42 8.42428 42 8.97656V10.9766C42 11.5288 41.5523 11.9766 41 11.9766H7C6.44772 11.9766 6 11.5288 6 10.9766V8.97656zM6 36.9688C6 36.4165 6.44772 35.9688 7 35.9688H41C41.5523 35.9688 42 36.4165 42 36.9688V38.9688C42 39.521 41.5523 39.9688 41 39.9688H7C6.44772 39.9688 6 39.521 6 38.9688V36.9688zM10.7027 17.4296C11.0932 17.0391 11.7264 17.0391 12.1169 17.4296L13.5312 18.8438C13.9217 19.2343 13.9217 19.8675 13.5312 20.258L11.8167 21.9725H41C41.5523 21.9725 42 22.4202 42 22.9725V24.9725C42 25.5248 41.5523 25.9725 41 25.9725H11.8226L13.5312 27.6811C13.9217 28.0716 13.9217 28.7048 13.5312 29.0953L12.1169 30.5095C11.7264 30.9 11.0933 30.9 10.7027 30.5095L4.87 24.6767C4.47948 24.2861 4.47948 23.653 4.87 23.2625L10.7027 17.4296z"/></svg>;
}

const IconDrawerFold = React.forwardRef(IconDrawerFoldComponent);
export default IconDrawerFold;
