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

function IconParallelComponent(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-parallel${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 6 6" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M4.97942 1.92467C5.13563 1.76846 5.38962 1.76846 5.54583 1.92467L5.88469 2.26452C6.0409 2.42073 6.0409 2.67374 5.88469 2.82995L2.83001 5.88561C2.6738 6.04182 2.41981 6.04182 2.2636 5.88561L1.92473 5.54577C1.76852 5.38956 1.76852 5.13655 1.92473 4.98034L4.97942 1.92467ZM3.16887 0.114127C3.3251 -0.0418811 3.57816 -0.0420158 3.7343 0.114127L4.07415 0.45397C4.2299 0.610144 4.23002 0.863304 4.07415 1.0194L1.01848 4.07506C0.862396 4.23106 0.609265 4.23085 0.453052 4.07506L0.113209 3.73522C-0.0429728 3.57904 -0.0429162 3.32601 0.113209 3.16979L3.16887 0.114127Z"/></svg>;
}

const IconParallel = React.forwardRef(IconParallelComponent);
export default IconParallel;
