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

function IconTreeAgentComponent(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-tree_agent${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><rect width="24" height="24" rx="6" fill={useCurrentColor ? 'currentColor' : '#A061EF'}/><g fill={useCurrentColor ? 'currentColor' : '#fff'}><path d="M8.27521 8.05347C8.5625 7.43791 9.4378 7.43791 9.72509 8.05347L11.1045 11.0092C11.184 11.1794 11.3208 11.3163 11.4911 11.3958L14.4468 12.7752C15.0623 13.0624 15.0623 13.9378 14.4468 14.225L11.4911 15.6045C11.3208 15.6839 11.184 15.8208 11.1045 15.9911L9.72509 18.9468C9.4378 19.5623 8.5625 19.5623 8.27521 18.9468L6.89578 15.9911C6.81631 15.8208 6.67945 15.6839 6.50917 15.6045L3.55347 14.225C2.93791 13.9378 2.93791 13.0624 3.55347 12.7752L6.50917 11.3958C6.67945 11.3163 6.81631 11.1794 6.89578 11.0092L8.27521 8.05347zM16.9421 3.41527C17.1419 2.90878 17.8587 2.90878 18.0585 3.41527L18.6775 4.98483C18.7385 5.13947 18.8609 5.26187 19.0155 5.32286L20.5851 5.94188C21.0916 6.14164 21.0916 6.85844 20.5851 7.0582L19.0155 7.67722C18.8609 7.73821 18.7385 7.86062 18.6775 8.01525L18.0585 9.58481C17.8587 10.0913 17.1419 10.0913 16.9421 9.58481L16.3231 8.01525C16.2621 7.86061 16.1397 7.73821 15.9851 7.67722L14.4155 7.0582C13.909 6.85844 13.909 6.14164 14.4155 5.94188L15.9851 5.32286C16.1397 5.26187 16.2621 5.13946 16.3231 4.98483L16.9421 3.41527zM17.1281 14.9435C17.2613 14.6058 17.7391 14.6058 17.8723 14.9435L18.4264 16.3484C18.4671 16.4515 18.5487 16.5331 18.6518 16.5738L20.0567 17.1279C20.3944 17.2611 20.3944 17.7389 20.0567 17.8721L18.6518 18.4262C18.5487 18.4669 18.4671 18.5485 18.4264 18.6516L17.8723 20.0565C17.7391 20.3942 17.2613 20.3942 17.1281 20.0565L16.574 18.6516C16.5333 18.5485 16.4517 18.4669 16.3486 18.4262L14.9437 17.8721C14.606 17.7389 14.606 17.2611 14.9437 17.1279L16.3486 16.5738C16.4517 16.5331 16.5333 16.4515 16.574 16.3484L17.1281 14.9435z"/></g></svg>;
}

const IconTreeAgent = React.forwardRef(IconTreeAgentComponent);
export default IconTreeAgent;
