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

function IconFullComponent(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-full${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 20 20" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M3.4 12.602a.7.7 0 0 1 .7.7v2.601h2.601a.7.7 0 0 1 0 1.4h-3.3a.7.7 0 0 1-.7-.7v-3.3a.7.7 0 0 1 .7-.7Zm13.202 0a.7.7 0 0 1 .7.7v3.302a.7.7 0 0 1-.7.7h-3.3a.7.7 0 0 1 0-1.4h2.6v-2.601a.7.7 0 0 1 .7-.7ZM6.702 2.7a.7.7 0 0 1 0 1.4H4.1v2.601a.7.7 0 0 1-1.4 0v-3.3a.7.7 0 0 1 .7-.7h3.3Zm9.9 0a.7.7 0 0 1 .7.7v3.301a.7.7 0 0 1-1.4 0v-2.6h-2.6a.7.7 0 0 1 0-1.4h3.3Z"/></svg>;
}

const IconFull = React.forwardRef(IconFullComponent);
export default IconFull;
