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

function IconCleanComponent(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-clean${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="M29 4a1 1 0 011 1v7h13a1 1 0 011 1v11a1 1 0 01-1 1h-1.304l2.897 16.657A2 2 0 0142.623 44H5.377a2 2 0 01-1.97-2.343L6.304 25H5a1 1 0 01-1-1V13a1 1 0 011-1h13V5a1 1 0 011-1h10zm8.635 21H10.364L7.756 40H16v-8a1 1 0 011-1h2a1 1 0 011 1v8h9v-8a1 1 0 011-1h2a1 1 0 011 1v8h7.244l-2.61-15zM22 8h4v8h14v5H8v-5h14V8z"/></svg>;
}

const IconClean = React.forwardRef(IconCleanComponent);
export default IconClean;
