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

function IconCheckTriangleFillComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = false, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-check-triangle-fill${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 49 48" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M27.7288 25.9377L3.84736 1.5H36.2842C42.0832 1.5 46.7842 6.20101 46.7842 12V44.4513L27.7288 25.9377Z" fill={useCurrentColor ? 'currentColor' : '#309256'} stroke="#2A814B" strokeWidth="2"/><path fillRule="evenodd" clipRule="evenodd" d="M41.6618 11.4573L42.6862 12.4817C42.9691 12.7646 42.9691 13.2233 42.6862 13.5062L34.4904 21.7018C34.3816 21.8106 34.2468 21.8775 34.106 21.9027L34.0209 21.9127H33.9354C33.7645 21.9027 33.5965 21.8323 33.4659 21.7018L28.8557 17.0918C28.5728 16.8089 28.5728 16.3502 28.8557 16.0673L29.8802 15.0429C30.1631 14.76 30.6218 14.76 30.9047 15.0429L33.9782 18.116L40.6373 11.4573C40.9202 11.1744 41.3788 11.1744 41.6618 11.4573Z" fill={useCurrentColor ? 'currentColor' : '#141414'} fillOpacity=".2"/><path fillRule="evenodd" clipRule="evenodd" d="M40.9166 10.7122L41.9411 11.7366C42.224 12.0195 42.224 12.4782 41.9411 12.7611L33.7453 20.9567C33.6365 21.0655 33.5016 21.1324 33.3608 21.1575L33.2758 21.1676H33.1903C33.0194 21.1575 32.8514 21.0872 32.7208 20.9567L28.1106 16.3466C27.8277 16.0637 27.8277 15.6051 28.1106 15.3222L29.1351 14.2977C29.418 14.0148 29.8767 14.0148 30.1596 14.2977L33.2331 17.3709L39.8922 10.7122C40.1751 10.4293 40.6337 10.4293 40.9166 10.7122Z" fill={useCurrentColor ? 'currentColor' : '#fff'}/></svg>;
}

const IconCheckTriangleFill = React.forwardRef(IconCheckTriangleFillComponent);
export default IconCheckTriangleFill;
