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

function IconA2AComponent(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-A2A${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}><rect width="24" height="24" fill={useCurrentColor ? 'currentColor' : '#14C9C9'} rx="4"/><path stroke="#fff" strokeLinejoin="round" strokeWidth="1.8" d="M19.083 9.206A2.4 2.4 0 0 0 17.9 7.137l-4.683-2.755a2.4 2.4 0 0 0-2.434 0L6.1 7.137a2.4 2.4 0 0 0-1.183 2.069v5.588A2.4 2.4 0 0 0 6.1 16.863l4.683 2.755a2.4 2.4 0 0 0 2.434 0l4.683-2.755a2.4 2.4 0 0 0 1.183-2.07V9.207Z"/><path stroke="#fff" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1.8" d="M8.667 9.916 11.997 12l3.334-2.084M12 12v3.75"/></svg>;
}

const IconA2A = React.forwardRef(IconA2AComponent);
export default IconA2A;
