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

function IconRunningProcessComponent(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-running-process${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path d="M4.4309 9.08607L3.80872 9.08607L5.03912 7.61215L6.26953 9.08607L5.64458 9.08607C5.64459 9.54879 5.78181 10.0011 6.03888 10.3859C6.29596 10.7706 6.66136 11.0705 7.08887 11.2476C7.51637 11.4246 7.98679 11.471 8.44063 11.3807C8.78569 11.3121 9.10937 11.1668 9.38853 10.9573C9.53486 10.8475 9.74343 10.8453 9.8728 10.9746L10.2625 11.3644C10.3919 11.4937 10.3928 11.7048 10.2519 11.8216C9.79884 12.1972 9.25804 12.4556 8.67741 12.5711C7.98814 12.7082 7.27369 12.6378 6.62441 12.3689C5.97513 12.0999 5.42018 11.6445 5.02973 11.0601C4.76339 10.6615 4.58176 10.2152 4.49321 9.74858C4.45195 9.53119 4.4309 9.30943 4.4309 9.08607Z" opacity=".5"/><path fillRule="evenodd" d="M13.9999 14.1334V5.4672C13.9999 5.32364 13.9421 5.18613 13.8394 5.08578L10.1554 1.48526C10.0558 1.38787 9.92195 1.33334 9.78262 1.33334H2.53333C2.23878 1.33334 2 1.57212 2 1.86668V14.1334C2 14.4279 2.23878 14.6667 2.53333 14.6667H13.4666C13.7612 14.6667 13.9999 14.4279 13.9999 14.1334ZM11.5688 9.07135H12.1912L10.9608 10.5453L9.73036 9.07135H10.3551C10.3551 8.60863 10.2179 8.15631 9.96083 7.77157C9.70375 7.38682 9.33835 7.08694 8.91084 6.90986C8.48333 6.73278 8.01292 6.68645 7.55907 6.77673C7.21402 6.84536 6.89033 6.99062 6.61118 7.20012C6.46485 7.30993 6.25628 7.31215 6.12691 7.18278L5.73719 6.79307C5.60782 6.6637 5.60691 6.45259 5.74777 6.33582C6.20087 5.9602 6.74167 5.70185 7.3223 5.58635C8.01157 5.44925 8.72602 5.51962 9.3753 5.78856C10.0246 6.0575 10.5795 6.51294 10.97 7.09728C11.2363 7.49589 11.4179 7.94227 11.5065 8.40885C11.5478 8.62623 11.5688 8.84799 11.5688 9.07135ZM3.80876 9.08607H4.43094C4.43094 9.30943 4.45199 9.53119 4.49325 9.74858C4.5818 10.2152 4.76343 10.6615 5.02978 11.0601C5.42022 11.6445 5.97517 12.0999 6.62445 12.3689C7.27373 12.6378 7.98818 12.7082 8.67745 12.5711C9.25808 12.4556 9.79888 12.1972 10.252 11.8216C10.3928 11.7048 10.3919 11.4937 10.2626 11.3644L9.87284 10.9746C9.74347 10.8453 9.5349 10.8475 9.38857 10.9573C9.10942 11.1668 8.78573 11.3121 8.44067 11.3807C7.98683 11.471 7.51641 11.4246 7.08891 11.2476C6.6614 11.0705 6.296 10.7706 6.03892 10.3859C5.78185 10.0011 5.64463 9.54879 5.64462 9.08607H6.26957L5.03916 7.61215L3.80876 9.08607Z" clipRule="evenodd"/></svg>;
}

const IconRunningProcess = React.forwardRef(IconRunningProcessComponent);
export default IconRunningProcess;
