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

function IconRunningInProgressComponent(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-running-in-progress${loadingKls} ${className}`} width={width} height={height} version="1.1" id="svg_8932fafb1f__svg_16bfbf9c46__svg_16bfbf9c46__图层_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 48 48" xmlSpace="preserve" {...rest} ref={ref}><switch><g><linearGradient id="svg_8932fafb1f__svg_16bfbf9c46__svg_16bfbf9c46__SVGID_1_" gradientUnits="userSpaceOnUse" x1="26.43" y1="34.075" x2="21.43" y2="15.325" gradientTransform="matrix(1 0 0 -1 0 47.89)"><stop offset="0" stopColor="#1765ff"/><stop offset="1" stopColor="#1765ff" stopOpacity="0"/></linearGradient><path d="M27.6,11.7C25,10.9,22.2,11,19.6,12c-2.6,1-4.8,2.7-6.3,5c-1.5,2.3-2.2,5-2.1,7.8s1.2,5.4,3,7.5 c1.8,2.1,4.2,3.6,6.9,4.2c2.7,0.6,5.5,0.4,8-0.8c1.8-0.8,3.9,0,4.7,1.8c0.8,1.8,0,3.9-1.8,4.7c-3.9,1.7-8.3,2.2-12.5,1.2 c-4.2-1-8-3.3-10.8-6.5C6,33.7,4.3,29.6,4,25.3C3.8,21,4.9,16.7,7.2,13.1c2.4-3.6,5.8-6.4,9.9-7.8c4-1.5,8.5-1.6,12.6-0.4 C33.8,6.1,37.5,8.6,40,12c2.6,3.5,4,7.6,4,12c0,2-1.6,3.6-3.6,3.6c-2,0-3.6-1.6-3.6-3.6c0-2.8-0.9-5.4-2.5-7.7 C32.6,14.1,30.3,12.5,27.6,11.7z" fillRule="evenodd" clipRule="evenodd" fill={useCurrentColor ? 'currentColor' : 'url(#svg_8932fafb1f__svg_16bfbf9c46__svg_16bfbf9c46__SVGID_1_)'}/><linearGradient id="svg_8932fafb1f__svg_16bfbf9c46__svg_16bfbf9c46__SVGID_00000096780286032208382000000005582607336579955121_" gradientUnits="userSpaceOnUse" x1="-1.147" y1="28.757" x2="37.603" y2="21.257" gradientTransform="matrix(1 0 0 -1 0 47.89)"><stop offset="0" stopColor="#adc9ff"/><stop offset="1" stopColor="#8ab1ff" stopOpacity="0"/></linearGradient><path d="M27.6,11.7C25,10.9,22.2,11,19.6,12c-2.6,1-4.8,2.7-6.3,5c-1.5,2.3-2.2,5-2.1,7.8s1.2,5.4,3,7.5c1.8,2.1,4.2,3.6,6.9,4.2 c2.7,0.6,5.5,0.4,8-0.8c1.8-0.8,3.9,0,4.7,1.8c0.8,1.8,0,3.9-1.8,4.7c-3.9,1.7-8.3,2.2-12.5,1.2c-4.2-1-8-3.3-10.8-6.5 C6,33.7,4.3,29.6,4,25.3C3.8,21,4.9,16.7,7.2,13.1c2.4-3.6,5.8-6.4,9.9-7.8c4-1.5,8.5-1.6,12.6-0.4C33.8,6.1,37.5,8.6,40,12 c2.6,3.5,4,7.6,4,12c0,2-1.6,3.6-3.6,3.6c-2,0-3.6-1.6-3.6-3.6c0-2.8-0.9-5.4-2.5-7.7C32.6,14.1,30.3,12.5,27.6,11.7z" fillRule="evenodd" clipRule="evenodd" fill={useCurrentColor ? 'currentColor' : 'url(#svg_8932fafb1f__svg_16bfbf9c46__svg_16bfbf9c46__SVGID_00000096780286032208382000000005582607336579955121_)'}/></g><animateTransform attributeName="transform" begin="0s" dur="2s" type="rotate" from="0 24 24" to="360 24 24" repeatCount="indefinite"/></switch></svg>;
}

const IconRunningInProgress = React.forwardRef(IconRunningInProgressComponent);
export default IconRunningInProgress;
