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

function IconAppWorkflowComponent(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-app-workflow${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 16 16" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#61C78A'} d="M4.744 1.676A.744.744 0 0 0 4 2.42v.913h8c.368 0 .667.299.667.667v8.092h.922a.744.744 0 0 0 .744-.744V2.42a.744.744 0 0 0-.744-.744H4.744Z" opacity=".5"/><path fill={useCurrentColor ? 'currentColor' : '#61C78A'} d="M8.945 6.544a.366.366 0 1 1 .732 0 .366.366 0 0 1-.732 0Zm-4.261 4.579a.366.366 0 1 1 .732 0 .366.366 0 0 1-.732 0Z"/><path fill={useCurrentColor ? 'currentColor' : '#61C78A'} d="M8.945 6.543a.366.366 0 1 1 .731 0 .366.366 0 0 1-.731 0Zm-4.261 4.58a.366.366 0 1 1 .732 0 .366.366 0 0 1-.732 0Z"/><path fill={useCurrentColor ? 'currentColor' : '#61C78A'} fillRule="evenodd" d="M2.333 3.333A.667.667 0 0 0 1.666 4v9.667c0 .368.299.666.667.666h9.694a.667.667 0 0 0 .667-.666V4a.667.667 0 0 0-.667-.667H2.333ZM9.311 5.08c-.612 0-1.136.375-1.355.907H5.804c-.995 0-1.802.807-1.802 1.802 0 .958.777 1.735 1.735 1.735h2.895a.363.363 0 1 1 0 .725H6.224a1.464 1.464 0 1 0 .216 1.333h2.192a1.696 1.696 0 1 0 0-3.391H5.737a.402.402 0 0 1-.401-.402c0-.259.21-.469.468-.469H8.07a1.463 1.463 0 0 0 2.704-.777c0-.808-.655-1.463-1.463-1.463Z" clipRule="evenodd"/></svg>;
}

const IconAppWorkflow = React.forwardRef(IconAppWorkflowComponent);
export default IconAppWorkflow;
