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

function IconWorkflowWaitingComponent(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-workflow_waiting${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 20 20" {...rest} ref={ref}><rect width="20" height="20" fill={useCurrentColor ? 'currentColor' : '#F6BB45'} rx="6"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} fillRule="evenodd" d="M16.222 10a6.222 6.222 0 1 1-12.444 0 6.222 6.222 0 0 1 12.444 0Zm-3.11.835v-.692a.345.345 0 0 0-.345-.345h-2.552V7.233a.345.345 0 0 0-.345-.344h-.69a.345.345 0 0 0-.346.345v3.6c0 .085.031.167.087.23l.03.029.031.025a.346.346 0 0 0 .198.063h3.588a.345.345 0 0 0 .346-.346Z" clipRule="evenodd"/></svg>;
}

const IconWorkflowWaiting = React.forwardRef(IconWorkflowWaitingComponent);
export default IconWorkflowWaiting;
