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

function IconWorkflowWorkflowComponent(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-workflow${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' : '#61C78A'} rx="6"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} fillRule="evenodd" d="M7.58 5.196h3.92l.052-.126a2.372 2.372 0 1 1 .184 2.16l-.06-.095H7.579c-.567 0-1.028.46-1.028 1.028 0 .502.408.91.91.91h5.093a2.78 2.78 0 0 1 0 5.56H8.55l-.046.14a2.373 2.373 0 1 1-.35-2.16l.062.081h4.338a.841.841 0 1 0 0-1.682H7.462a2.85 2.85 0 0 1-2.85-2.85A2.967 2.967 0 0 1 7.58 5.197Zm6.167-.071a.847.847 0 1 0 0 1.694.847.847 0 0 0 0-1.694ZM6.252 13.18a.847.847 0 1 0 0 1.694.847.847 0 0 0 0-1.694Z" clipRule="evenodd"/></svg>;
}

const IconWorkflowWorkflow = React.forwardRef(IconWorkflowWorkflowComponent);
export default IconWorkflowWorkflow;
