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

function IconCheckComponent(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-check${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 49 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><g clipPath="url(#svg_0ba4439ee9__svg_0ba4439ee9__clip0_94162_209422)" fillRule="evenodd" clipRule="evenodd"><path d="M37.4928 11.5659L39.3527 13.1265C40.3803 13.9878 40.5142 15.5192 39.6523 16.5464C39.6522 16.5465 39.6521 16.5467 39.6514 16.5465L23.414 35.8867C22.5515 36.913 21.0205 37.0467 19.9931 36.1855L16.2734 33.0643L34.0719 11.8647C34.9344 10.8384 36.4654 10.7046 37.4928 11.5659Z"/><path d="M10.055 24.3979L11.684 22.5887C12.567 21.608 14.0718 21.5122 15.072 22.3731L26.4917 32.2021L23.3847 35.9406C22.5277 36.9718 20.997 37.113 19.9657 36.256C19.953 36.2454 19.9404 36.2347 19.9279 36.2239L10.2696 27.8575C9.2561 26.9796 9.1462 25.4463 10.0241 24.4328C10.0343 24.4211 10.0446 24.4094 10.055 24.3979Z"/></g><defs><clipPath id="svg_0ba4439ee9__svg_0ba4439ee9__clip0_94162_209422"><path transform="translate(.822)" d="M0 0H48V48H0z"/></clipPath></defs></svg>;
}

const IconCheck = React.forwardRef(IconCheckComponent);
export default IconCheck;
