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

function IconComparisonComponent(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-comparison${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path fillRule="evenodd" d="M8.333 1.708c0-.391-.336-.708-.75-.708s-.75.317-.75.708v.079H3.417C2.082 1.787 1 2.807 1 4.067v7.551c0 1.26 1.082 2.28 2.417 2.28h3.416v.394c0 .391.336.708.75.708s.75-.317.75-.708V1.708ZM3.417 3.202c-.507 0-.917.388-.917.865v7.551c0 .478.41.865.917.865h3.25v-9.28h-3.25Zm9.166 9.596c.507 0 .917-.387.917-.865V4.068c0-.478-.41-.865-.917-.865h-2.5c-.414 0-.75-.317-.75-.708 0-.391.336-.708.75-.708h2.5C13.918 1.787 15 2.808 15 4.068v7.865c0 1.26-1.082 2.281-2.417 2.281h-2.5c-.414 0-.75-.317-.75-.708 0-.39.336-.708.75-.708h2.5Z" clipRule="evenodd"/></svg>;
}

const IconComparison = React.forwardRef(IconComparisonComponent);
export default IconComparison;
