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

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

    const prefix = prefixFromProps || prefixFromContext || 'font';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-folder${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M9.17358 2C9.704 2.00002 10.2128 2.21088 10.5879 2.58594L12.0022 4.00024H21.0022C22.1066 4.00038 23.0016 4.89538 23.0017 5.99976V19.0002C23.0016 20.1046 22.1066 20.9996 21.0022 20.9998H3.0022C1.89771 20.9998 1.00208 20.1047 1.00195 19.0002V4.00024C1.00195 2.89567 1.89763 2 3.0022 2H9.17358Z" fill={useCurrentColor ? 'currentColor' : '#90A792'}/><path d="M1 7.86719C1 6.76262 1.89109 5.86719 2.99566 5.86719C7.49649 5.86719 16.9008 5.86719 21.0085 5.86719C22.1131 5.86719 23 6.76262 23 7.86719L23 19.0005C23 20.1051 22.1046 21.0005 21 21.0005H3C1.89543 21.0005 1 20.1051 1 19.0005V7.86719Z" fill={useCurrentColor ? 'currentColor' : '#B7CBB8'}/></svg>;
}

const IconFolder = React.forwardRef(IconFolderComponent);
export default IconFolder;
