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

function IconSuccessFillComponent(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-success-fill${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M45 24c0-11.598-9.402-21-21-21S3 12.402 3 24s9.402 21 21 21 21-9.402 21-21zm-13.671-6.816l1.149.964a1.5 1.5 0 01.184 2.113l-9.021 10.745-1.028 1.237a1.5 1.5 0 01-2.113.195l-.011-.01-.012-.01-2.11-1.827-.148-.125.002-.002-3.711-3.214a1.5 1.5 0 01-.152-2.116l.02-.022 1.006-1.118a1.5 1.5 0 012.093-.133l3.65 3.142 8.088-9.634a1.501 1.501 0 012.114-.185z"/></svg>;
}

const IconSuccessFill = React.forwardRef(IconSuccessFillComponent);
export default IconSuccessFill;
