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

function IconLLMComponent(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-LLM${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 24 24" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#57A9FB'} d="M17 0H7a7 7 0 0 0-7 7v10a7 7 0 0 0 7 7h10a7 7 0 0 0 7-7V7a7 7 0 0 0-7-7Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} fillRule="evenodd" d="M6.055 9.43a.37.37 0 0 0-.555.315v5.59c0 .196.053.39.153.56.1.171.245.312.418.411l4.64 2.619a.575.575 0 0 0 .774-.205.551.551 0 0 0 .077-.28v-5.87a.059.059 0 0 0-.006-.026.048.048 0 0 0-.02-.02L6.057 9.43ZM12.033 5a.576.576 0 0 0-.283.075L6.334 8.133a.226.226 0 0 0-.114.194.221.221 0 0 0 .114.194l5.414 3.057a.575.575 0 0 0 .564 0l5.417-3.06a.225.225 0 0 0 .084-.306.223.223 0 0 0-.084-.082l-5.413-3.055A.575.575 0 0 0 12.033 5Zm6.533 10.336v-5.59a.363.363 0 0 0-.186-.317.376.376 0 0 0-.37-.001l-5.477 3.093a.056.056 0 0 0-.028.05v5.87a.554.554 0 0 0 .283.483.573.573 0 0 0 .568.002l4.64-2.62a1.11 1.11 0 0 0 .57-.97Z" clipRule="evenodd"/></svg>;
}

const IconLLM = React.forwardRef(IconLLMComponent);
export default IconLLM;
