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

function IconTraceAIComponent(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-TraceAI${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="M3.5 6.333c.368 0 .667.299.667.667v.667H6c.184 0 .333.149.333.333v.667A.333.333 0 0 1 6 9H4.167v3.083c0 .194.04.37.102.493l.023.044.023.034.01.013H6c.184 0 .333.149.333.333v.667A.333.333 0 0 1 6 14H4.262c-.854 0-1.399-.858-1.427-1.837l-.002-.08V7c0-.368.299-.667.667-.667Zm10.848 6.334c.176 0 .319.149.319.333v.666a.327.327 0 0 1-.32.334H7.653a.327.327 0 0 1-.319-.334V13c0-.184.143-.333.32-.333h6.695Zm0-5c.176 0 .319.149.319.333v.666a.327.327 0 0 1-.32.334H7.653a.327.327 0 0 1-.319-.334V8c0-.184.143-.333.32-.333h6.695ZM3.105 1.469c.104-.402.673-.403.779-.002l.103.388a1.61 1.61 0 0 0 1.154 1.149l.39.101c.402.104.403.673.002.779l-.397.105c-.56.148-.999.586-1.147 1.147l-.105.397c-.106.401-.675.4-.778-.002l-.102-.39a1.61 1.61 0 0 0-1.149-1.154l-.388-.103c-.401-.106-.4-.675.002-.779l.382-.1a1.61 1.61 0 0 0 1.155-1.154l.1-.382Zm11.243 1.198c.176 0 .319.149.319.333v.667a.327.327 0 0 1-.32.333H7.653a.327.327 0 0 1-.319-.333V3c0-.184.143-.333.32-.333h6.695Z"/></svg>;
}

const IconTraceAI = React.forwardRef(IconTraceAIComponent);
export default IconTraceAI;
