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

function IconWorkflowGraphComponent(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-graph${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 20 20" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><g clipPath="url(#svg_2e1d92cdb7__clip0_2502_167527)"><path d="M14 0H6C2.68629 0 0 2.68629 0 6V14C0 17.3137 2.68629 20 6 20H14C17.3137 20 20 17.3137 20 14V6C20 2.68629 17.3137 0 14 0Z" fill={useCurrentColor ? 'currentColor' : '#9E56F6'}/><path fillRule="evenodd" clipRule="evenodd" d="M12.6508 7.47428C12.948 7.74855 13.3469 7.90855 13.7822 7.90855C14.7309 7.90855 15.4954 7.14285 15.4954 6.19428C15.4954 5.2457 14.7297 4.48 13.7811 4.48C12.8326 4.48 12.0668 5.2457 12.0668 6.19428C12.0668 6.28571 12.0783 6.37713 12.0897 6.46855L7.47256 9.13142C7.404 9.03998 7.31256 8.97142 7.22114 8.91427L7.59714 6.21713V6.2057C8.03028 6.05713 8.35142 5.63427 8.35142 5.14284C8.35142 4.50285 7.836 4 7.20858 4C6.57886 4 6.06572 4.50285 6.06572 5.14284C6.06791 5.30755 6.10464 5.46997 6.17354 5.61958C6.24244 5.76919 6.34197 5.90269 6.46571 6.01142L6.1 8.58284C5.20972 8.63999 4.5 9.37141 4.5 10.2857C4.5 11.2228 5.26572 12 6.21428 12C6.64972 12 7.05999 11.8286 7.35714 11.5428L9.87371 13.0971C9.81541 13.2914 9.78228 13.4983 9.78228 13.7143C9.78228 14.1664 9.91633 14.6082 10.1675 14.9841C10.4186 15.36 10.7756 15.653 11.1933 15.826C11.6109 15.999 12.0705 16.0443 12.5139 15.956C12.9573 15.8679 13.3645 15.6502 13.6842 15.3305C14.0039 15.0109 14.2215 14.6035 14.3098 14.1602C14.3979 13.7168 14.3526 13.2572 14.1798 12.8396C14.0067 12.4219 13.7137 12.0648 13.3379 11.8137C12.962 11.5626 12.52 11.4285 12.068 11.4285C11.4268 11.4285 10.8451 11.6926 10.4451 12.1143H10.4326L7.90685 10.5371C7.91828 10.4571 7.92971 10.3772 7.92971 10.2857C7.92971 10.2514 7.92971 10.2171 7.91828 10.1943L12.6508 7.47428Z" fill={useCurrentColor ? 'currentColor' : '#fff'}/></g><defs><clipPath id="svg_2e1d92cdb7__clip0_2502_167527"><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M0 0H20V20H0z"/></clipPath></defs></svg>;
}

const IconWorkflowGraph = React.forwardRef(IconWorkflowGraphComponent);
export default IconWorkflowGraph;
