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

function IconFilterComponent(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-filter${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 12 12" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M1.25 2C1.25 1.58579 1.58579 1.25 2 1.25H10C10.4142 1.25 10.75 1.58579 10.75 2V3.61276C10.75 3.86919 10.619 4.10784 10.4027 4.24551L8 5.77447V10.5H7V5.63724C7 5.38081 7.13101 5.14216 7.34734 5.00449L9.75 3.47553V2.25H2.25V3.47553L4.65266 5.00449C4.86899 5.14216 5 5.38081 5 5.63724V9.25H4V5.77447L1.59734 4.24551C1.38101 4.10784 1.25 3.86919 1.25 3.61276V2Z"/></svg>;
}

const IconFilter = React.forwardRef(IconFilterComponent);
export default IconFilter;
