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

function IconBarChartComponent(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-bar-chart${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 d="M7.084 6.75a.75.75 0 0 1 .75.75v10a.75.75 0 0 1-.75.75H1.667a.75.75 0 0 1-.75-.75v-10a.75.75 0 0 1 .75-.75h5.417Zm-4.667 10h3.917v-8.5H2.417v8.5Z"/><path d="M12.5 1.75a.75.75 0 0 1 .75.75v15a.75.75 0 0 1-.75.75H7.083a.75.75 0 0 1-.75-.75v-15a.75.75 0 0 1 .75-.75H12.5Zm-4.667 15h3.917V3.25H7.833v13.5Z"/><path d="M17.917 10.083a.75.75 0 0 1 .75.75V17.5a.75.75 0 0 1-.75.75H12.5a.75.75 0 0 1-.75-.75v-6.667a.75.75 0 0 1 .75-.75h5.417ZM13.25 16.75h3.917v-5.167H13.25v5.167Z"/></svg>;
}

const IconBarChart = React.forwardRef(IconBarChartComponent);
export default IconBarChart;
