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

function IconChartFillComponent(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-chart-fill${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 24 24" {...rest} ref={ref}><path fillRule="evenodd" d="M20.889 2A1.11 1.11 0 0 1 22 3.11v17.78A1.11 1.11 0 0 1 20.89 22H3.11A1.112 1.112 0 0 1 2 20.89V3.11C2 2.497 2.497 2 3.11 2h17.78ZM7.5 10a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5h1Zm5-3a.5.5 0 0 1 .5.5v10a.5.5 0 0 1-.5.5h-1a.502.502 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h1Zm5 6a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h1Z" clipRule="evenodd"/></svg>;
}

const IconChartFill = React.forwardRef(IconChartFillComponent);
export default IconChartFill;
