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

function IconMenuTaskComponent(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-task${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.89774ZM4.53506 6.57437C4.38239 6.72704 4.29662 6.9341 4.29662 7.15C4.29662 7.3659 4.38239 7.57297 4.53506 7.72563C4.68772 7.8783 4.89478 7.96407 5.11069 7.96407H8.36694C8.47385 7.96408 8.57972 7.94304 8.6785 7.90213C8.77728 7.86123 8.86704 7.80127 8.94265 7.72568C9.01825 7.65008 9.07823 7.56033 9.11914 7.46156C9.16006 7.36278 9.18112 7.25692 9.18112 7.15C9.18112 7.04309 9.16006 6.93722 9.11914 6.83845C9.07823 6.73967 9.01825 6.64992 8.94265 6.57433C8.86704 6.49873 8.77728 6.43877 8.6785 6.39787C8.57972 6.35697 8.47385 6.33592 8.36694 6.33594H5.11069C4.89478 6.33594 4.68772 6.42171 4.53506 6.57437ZM4.53506 12.2728C4.38239 12.4255 4.29662 12.6325 4.29662 12.8484C4.29662 13.0643 4.38239 13.2714 4.53506 13.4241C4.68772 13.5767 4.89478 13.6625 5.11069 13.6625H8.36694C8.47385 13.6625 8.57972 13.6415 8.6785 13.6006C8.77728 13.5597 8.86704 13.4997 8.94265 13.4241C9.01825 13.3485 9.07823 13.2588 9.11914 13.16C9.16006 13.0612 9.18112 12.9554 9.18112 12.8484C9.18112 12.7415 9.16006 12.6357 9.11914 12.5369C9.07823 12.4381 9.01825 12.3484 8.94265 12.2728C8.86704 12.1972 8.77728 12.1372 8.6785 12.0963C8.57972 12.0554 8.47385 12.0344 8.36694 12.0344H5.11069C4.89478 12.0344 4.68772 12.1201 4.53506 12.2728ZM15.455 4.94634C15.6076 5.099 15.6933 5.30602 15.6933 5.52188C15.6933 5.73774 15.6076 5.94476 15.455 6.09742L13.0128 8.53961C12.8601 8.69222 12.6531 8.77795 12.4372 8.77795C12.2214 8.77795 12.0144 8.69222 11.8617 8.53961L10.6406 7.31851C10.4923 7.16498 10.4103 6.95935 10.4121 6.7459C10.414 6.53246 10.4996 6.32828 10.6505 6.17735C10.8015 6.02641 11.0056 5.9408 11.2191 5.93894C11.4325 5.93709 11.6382 6.01914 11.7917 6.16743L12.4372 6.81298L14.3039 4.94634C14.4566 4.79372 14.6636 4.70799 14.8794 4.70799C15.0953 4.70799 15.3023 4.79372 15.455 4.94634ZM12.9397 12.0963C13.0385 12.0554 13.1444 12.0344 13.2513 12.0344C13.4672 12.0344 13.6742 12.1202 13.8269 12.2729C13.9795 12.4255 14.0652 12.6326 14.0652 12.8484C14.0652 13.0643 13.9795 13.2714 13.8269 13.424C13.6742 13.5767 13.4672 13.6625 13.2513 13.6625C13.1444 13.6625 13.0385 13.6415 12.9397 13.6006C12.841 13.5597 12.7512 13.4997 12.6756 13.4241C12.6 13.3485 12.54 13.2588 12.4991 13.16C12.4582 13.0612 12.4371 12.9554 12.4371 12.8484C12.4371 12.7415 12.4582 12.6357 12.4991 12.5369C12.54 12.4381 12.6 12.3484 12.6756 12.2728C12.7512 12.1972 12.841 12.1372 12.9397 12.0963ZM11.5244 11.1216C11.0664 11.5796 10.8091 12.2007 10.8091 12.8484C10.8091 13.4961 11.0664 14.1173 11.5244 14.5753C11.9824 15.0333 12.6036 15.2906 13.2513 15.2906C13.899 15.2906 14.5202 15.0333 14.9782 14.5753C15.4362 14.1173 15.6935 13.4961 15.6935 12.8484C15.6935 12.2007 15.4362 11.5796 14.9782 11.1216C14.5202 10.6636 13.899 10.4063 13.2513 10.4063C12.6036 10.4063 11.9824 10.6636 11.5244 11.1216Z" clipRule="evenodd"/></svg>;
}

const IconMenuTask = React.forwardRef(IconMenuTaskComponent);
export default IconMenuTask;
