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

function IconQAComponent(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-QA${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 18 18" {...rest} ref={ref}><g fillRule="evenodd" clipRule="evenodd"><path d="M15.4081 1.5H4.61717C3.8753 1.5 3.26831 2.10699 3.26831 2.84886V10.099C3.26831 10.8409 3.8753 11.4479 4.61717 11.4479H5.96878C5.42475 11.2696 5.03181 10.7578 5.03181 10.1542C5.03181 9.64307 5.31358 9.19774 5.73027 8.96508C5.78821 8.93272 5.83074 8.87762 5.8447 8.81274C6.06109 7.80703 6.95543 7.05323 8.02582 7.05323C9.09613 7.05323 9.99041 7.80691 10.2069 8.8125C10.2209 8.8774 10.2634 8.93251 10.3214 8.96485C10.7383 9.19745 11.0203 9.6429 11.0203 10.1542C11.0203 10.7578 10.6273 11.2696 10.0833 11.4479H14.0592L15.9027 13.2913C16.2177 13.6064 16.7565 13.3831 16.7562 12.9375L16.7502 2.84886C16.7502 2.10699 16.1499 1.5 15.4081 1.5Z" opacity=".5"/><path d="M8.02648 4.43524H13.5312C14.231 4.43524 14.8036 5.00783 14.8036 5.70766V13.3422C14.8036 14.042 14.231 14.6146 13.5312 14.6146H3.79416L2.10355 16.3052C1.78848 16.6203 1.24975 16.397 1.25 15.9514L1.25569 5.70766C1.25569 5.00783 1.82192 4.43524 2.52175 4.43524H8.02648ZM10.3214 8.9648C10.2634 8.93246 10.2208 8.87735 10.2069 8.81245C9.99036 7.80689 9.0961 7.05324 8.02581 7.05324C6.95539 7.05324 6.06104 7.80707 5.84468 8.81282C5.83072 8.8777 5.7882 8.93279 5.73026 8.96515C5.31364 9.19783 5.03192 9.64313 5.03192 10.1542C5.03192 10.9059 5.64126 11.5152 6.39293 11.5152H8.00502L8.02581 11.5153L8.04661 11.5152H9.65935C10.411 11.5152 11.0204 10.9059 11.0204 10.1542C11.0204 9.64287 10.7384 9.19739 10.3214 8.9648Z"/></g></svg>;
}

const IconQA = React.forwardRef(IconQAComponent);
export default IconQA;
