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

function IconRuntimeConfigurationComponent(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-runtime-configuration${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="M11.798 1c1.357 0 2.457 1.1 2.457 2.457v.323a.67.67 0 1 1-1.34 0v-.323c0-.617-.5-1.116-1.117-1.116H5.319v8.052c0 .51-.18 1.003-.508 1.392L3.246 13.64c.068.013.139.02.211.02h8.34c.618 0 1.118-.5 1.118-1.117v-.323a.67.67 0 0 1 1.34 0v.323c0 1.357-1.1 2.457-2.457 2.457H3.457A2.457 2.457 0 0 1 1 12.543V3.457C1 2.1 2.1 1 3.457 1h8.34ZM3.457 2.34c-.617.001-1.116.5-1.116 1.117v9.086c0 .03 0 .058.003.087l1.441-1.71a.82.82 0 0 0 .194-.527V2.34h-.522Zm8.165 3.324a.67.67 0 0 1 .947 0l2.235 2.234a.67.67 0 0 1 0 .949l-2.235 2.233a.67.67 0 1 1-.947-.947l1.09-1.09H9.117a.67.67 0 0 1 0-1.34h3.595l-1.09-1.09a.67.67 0 0 1 0-.949Z"/></svg>;
}

const IconRuntimeConfiguration = React.forwardRef(IconRuntimeConfigurationComponent);
export default IconRuntimeConfiguration;
