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

function IconMenuWorkflowComponent(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-menu-workflow${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 20 20" {...rest} ref={ref}><path fillRule="evenodd" d="M2.18005 4.89774C2.18005 3.29736 3.47742 2 5.0778 2H14.9125C16.513 2 17.8103 3.29736 17.8103 4.89774V15.1022C17.8103 16.7027 16.513 18 14.9125 18H5.0778C3.47742 18 2.18005 16.7027 2.18005 15.1022V4.89774ZM8.06554 6.17877H11.1873L11.2279 6.07923C11.3933 5.67403 11.6945 5.33898 12.0799 5.13144C12.4652 4.9239 12.9108 4.85679 13.3401 4.9416C13.7695 5.02641 14.1561 5.25786 14.4336 5.59633C14.7111 5.93479 14.8623 6.3592 14.8613 6.79688C14.8619 7.20694 14.7288 7.60603 14.4823 7.93373C14.2359 8.26143 13.8893 8.49991 13.4952 8.61306C13.101 8.72621 12.6808 8.70788 12.298 8.56084C11.9152 8.41379 11.5907 8.14605 11.3737 7.79813L11.3262 7.72173H8.06554C7.61411 7.72173 7.24834 8.08866 7.24834 8.54009C7.24834 8.73227 7.32468 8.91657 7.46057 9.05246C7.59646 9.18835 7.78077 9.26469 7.97294 9.26469H12.0242C12.611 9.26469 13.1738 9.4978 13.5888 9.91274C14.0037 10.3277 14.2368 10.8905 14.2368 11.4773C14.2368 12.0641 14.0037 12.6269 13.5888 13.0418C13.1738 13.4567 12.611 13.6898 12.0242 13.6898H8.83876L8.80172 13.7998C8.66908 14.2009 8.40568 14.5459 8.0537 14.7795C7.70171 15.0131 7.28152 15.1218 6.86041 15.0882C6.4393 15.0546 6.04165 14.8807 5.73114 14.5943C5.42062 14.3078 5.21522 13.9255 5.14782 13.5084C5.08042 13.0914 5.15493 12.6638 5.3594 12.2942C5.56388 11.9245 5.88651 11.6342 6.2756 11.4696C6.66469 11.3051 7.09774 11.2759 7.50538 11.3868C7.91303 11.4976 8.27169 11.742 8.52392 12.0809L8.57253 12.1457H12.0242C12.2017 12.1457 12.3718 12.0752 12.4973 11.9498C12.6228 11.8243 12.6933 11.6541 12.6933 11.4767C12.6933 11.2993 12.6228 11.1291 12.4973 11.0036C12.3718 10.8781 12.2017 10.8077 12.0242 10.8077H7.97294C7.37144 10.8077 6.79456 10.5688 6.36912 10.1436C5.94369 9.71835 5.70453 9.14159 5.70422 8.54009C5.70422 7.91383 5.953 7.31322 6.39584 6.87039C6.83867 6.42755 7.43928 6.17877 8.06554 6.17877ZM12.4982 6.32052C12.3718 6.44686 12.3009 6.61821 12.3009 6.79688C12.3009 6.9757 12.3707 7.1472 12.4972 7.27365C12.6236 7.40009 12.7951 7.47113 12.974 7.47113C13.1528 7.47113 13.3243 7.40009 13.4507 7.27365C13.5772 7.1472 13.6482 6.9757 13.6482 6.79688C13.6482 6.61821 13.5772 6.44686 13.4509 6.32052C13.3246 6.19419 13.1532 6.12321 12.9745 6.12321C12.7959 6.12321 12.6245 6.19419 12.4982 6.32052ZM6.53255 12.7304C6.4061 12.8568 6.33507 13.0283 6.33507 13.2072C6.33507 13.386 6.4061 13.5575 6.53255 13.6839C6.659 13.8104 6.83049 13.8814 7.00932 13.8814C7.18814 13.8814 7.35963 13.8104 7.48608 13.6839C7.61253 13.5575 7.68356 13.386 7.68356 13.2072C7.68356 13.0283 7.61253 12.8568 7.48608 12.7304C7.35963 12.604 7.18814 12.5329 7.00932 12.5329C6.83049 12.5329 6.659 12.604 6.53255 12.7304Z" clipRule="evenodd"/></svg>;
}

const IconMenuWorkflow = React.forwardRef(IconMenuWorkflowComponent);
export default IconMenuWorkflow;
