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

function IconMenuFoldComponent(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-menu-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="M43 36a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1v-2a1 1 0 011-1h38zM13.81 17.575a1.19 1.19 0 011.184 1.068l.006.121v10.234a1.19 1.19 0 01-1.69 1.08l-.114-.061L4.708 24.9a1.19 1.19 0 01-.107-1.965l.107-.073 8.488-5.117a1.19 1.19 0 01.615-.17zM43 22a1 1 0 011 1v2a1 1 0 01-1 1H23a1 1 0 01-1-1v-2a1 1 0 011-1h20zm0-14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V9a1 1 0 011-1h38z"/></svg>;
}

const IconMenuFold = React.forwardRef(IconMenuFoldComponent);
export default IconMenuFold;
