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

function IconClearHistoryComponent(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-clear-history${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 20 20" {...rest} ref={ref}><path fillRule="evenodd" d="M10 3.25a1.67 1.67 0 0 0-1.183.493 1.692 1.692 0 0 0-.491 1.193v1.602c0 .521-.206 1.021-.574 1.39a1.96 1.96 0 0 1-1.388.578H4.545a.46.46 0 0 0-.325.136.47.47 0 0 0-.137.332v.853h11.834v-.853a.471.471 0 0 0-.137-.332.46.46 0 0 0-.325-.136h-1.819a1.96 1.96 0 0 1-1.388-.577 1.97 1.97 0 0 1-.574-1.39V4.935c0-.448-.177-.878-.492-1.193A1.668 1.668 0 0 0 10 3.25Zm-6.342 8.077h-.325a.75.75 0 0 1-.75-.75V8.974c0-.52.206-1.02.574-1.39a1.96 1.96 0 0 1 1.388-.578h1.819a.46.46 0 0 0 .325-.135.47.47 0 0 0 .137-.333V4.936c0-.844.333-1.654.928-2.252a3.168 3.168 0 0 1 4.492 0c.595.598.928 1.408.928 2.252v1.602c0 .126.05.245.137.333a.46.46 0 0 0 .325.135h1.819a1.96 1.96 0 0 1 1.388.578c.368.37.574.87.574 1.39v1.603a.75.75 0 0 1-.75.75h-.326l.773 4.578a1.975 1.975 0 0 1-1.92 2.345H4.807a1.957 1.957 0 0 1-1.51-.727 1.97 1.97 0 0 1-.412-1.618l.772-4.578Zm1.521 0-.815 4.836a.474.474 0 0 0 .094.41l.004.005a.463.463 0 0 0 .353.172h1.94a.758.758 0 0 1-.005-.083v-1.945a.75.75 0 0 1 1.5 0v1.945a.758.758 0 0 1-.005.083h1.01a.758.758 0 0 1-.005-.083v-2.5a.75.75 0 0 1 1.5 0v2.5a.741.741 0 0 1-.005.083h1.01a.766.766 0 0 1-.005-.083v-1.945a.75.75 0 0 1 1.5 0v1.945a.741.741 0 0 1-.005.083h1.94a.46.46 0 0 0 .353-.172l.003-.004a.472.472 0 0 0 .095-.41l-.816-4.837H5.18Z" clipRule="evenodd"/></svg>;
}

const IconClearHistory = React.forwardRef(IconClearHistoryComponent);
export default IconClearHistory;
