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

function IconAsynchronousOperationComponent(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-asynchronous-operation${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path d="M8.06836 1.00293C8.40445 1.03715 8.66699 1.32187 8.66699 1.66699V12.333C8.66699 12.7012 8.36819 13 8 13H2C1.63183 13 1.33301 12.7012 1.33301 12.333V1.66699L1.33691 1.59863C1.37113 1.26256 1.6549 1.00002 2 1H8L8.06836 1.00293ZM6.15039 5.20801C5.91301 4.95768 5.5272 4.93144 5.25977 5.1377L5.20801 5.18262L3.875 6.44629C3.61578 6.69206 3.59645 7.09876 3.83105 7.36816L5.05273 8.77051C5.29447 9.0481 5.7155 9.07754 5.99316 8.83594C6.25334 8.60925 6.29554 8.2251 6.10059 7.94922L6.05859 7.89551L5.25488 6.97363L6.125 6.15039L6.17285 6.10156C6.39334 5.84558 6.38776 5.45856 6.15039 5.20801Z"/><path d="M14.0684 3.00293C14.4044 3.03715 14.667 3.32187 14.667 3.66699V14.333C14.667 14.7012 14.3682 15 14 15H8C7.63183 15 7.33301 14.7012 7.33301 14.333V3.66699L7.33691 3.59863C7.37113 3.26256 7.6549 3.00002 8 3H14L14.0684 3.00293ZM10.7402 7.1377C10.4728 6.93146 10.087 6.95767 9.84961 7.20801C9.61225 7.45855 9.60668 7.84558 9.82715 8.10156L9.875 8.15039L10.7441 8.97363L9.94141 9.89551C9.69994 10.1731 9.7294 10.5942 10.0068 10.8359C10.2671 11.0624 10.6529 11.0512 10.8994 10.8203L10.9473 10.7705L12.1689 9.36816L12.21 9.31543C12.4003 9.04788 12.3681 8.67672 12.125 8.44629L10.792 7.18262L10.7402 7.1377Z"/></svg>;
}

const IconAsynchronousOperation = React.forwardRef(IconAsynchronousOperationComponent);
export default IconAsynchronousOperation;
