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

function IconEnVariableComponent(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-EnVariable${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 14 14" {...rest} ref={ref}><path d="M3.117 2.7a.582.582 0 0 1 0 1.164h-1.12v7.205h1.12a.582.582 0 0 1 0 1.164H1.844a1.01 1.01 0 0 1-1.01-1.01V3.71a1.01 1.01 0 0 1 1.01-1.01h1.273Zm8.965 0c.522 0 .953.398 1.005.906l.005.104v7.514a1.01 1.01 0 0 1-1.01 1.01h-1.274a.583.583 0 0 1 0-1.165h1.12V3.864h-1.12a.582.582 0 0 1 0-1.164h1.274ZM5.865 4.47c.298.024.553.135.759.337l.085.09c.192.223.341.546.453.957l.086.305 1.106-1.344a.957.957 0 0 1 .32-.264l.09-.036a1.02 1.02 0 0 1 .31-.043l.099.004a.55.55 0 0 1 .247.08.325.325 0 0 1 .15.195l.01.086c0 .148-.083.3-.214.45L7.582 7.346l.385 1.377c.07.245.13.43.184.555.051.12.11.201.172.253.062.044.15.072.269.072.12 0 .25-.044.391-.138l.001-.001c.147-.095.322-.258.525-.492a.345.345 0 0 1 .265-.132.25.25 0 0 1 .222.128h.001c.039.058.06.128.07.206l.003.08a.761.761 0 0 1-.156.498 3.438 3.438 0 0 1-.7.65h-.001a1.44 1.44 0 0 1-.588.22l-.216.013c-.436 0-.78-.131-1.02-.405v-.002a2.515 2.515 0 0 1-.424-.78l-.109-.343-.186-.68-1.528 1.892a.807.807 0 0 1-.33.263l-.004.001a1.19 1.19 0 0 1-.374.054.8.8 0 0 1-.376-.081l-.006-.003v-.001a.346.346 0 0 1-.161-.204l-.012-.091c0-.154.088-.31.228-.466l2.23-2.542-.208-.766-.081-.26c-.083-.237-.169-.404-.256-.507-.116-.137-.24-.196-.372-.196-.202 0-.466.15-.794.506a.37.37 0 0 1-.189.116l-.074.007a.348.348 0 0 1-.252-.106l-.007-.006a.4.4 0 0 1-.087-.198l-.005-.076c0-.173.083-.347.225-.519l.001-.002c.198-.23.414-.418.648-.56.242-.146.527-.215.85-.215l.13.005Z"/></svg>;
}

const IconEnVariable = React.forwardRef(IconEnVariableComponent);
export default IconEnVariable;
