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

function IconGeneratingComponent(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-generating${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 18 18" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M9 12.4365C9.63262 12.4365 10.1455 12.9494 10.1455 13.582C10.1454 14.2146 9.63256 14.7275 9 14.7275C8.36745 14.7275 7.85459 14.2146 7.85449 13.582C7.85449 12.9494 8.36739 12.4365 9 12.4365ZM5.76562 11.0898C6.39818 11.0899 6.91108 11.6028 6.91113 12.2354C6.91113 12.868 6.39822 13.3808 5.76562 13.3809C5.13301 13.3809 4.62012 12.868 4.62012 12.2354C4.62017 11.6028 5.13304 11.0898 5.76562 11.0898ZM12.2354 11.0898C12.8679 11.0899 13.3808 11.6028 13.3809 12.2354C13.3809 12.868 12.8679 13.3808 12.2354 13.3809C11.6027 13.3809 11.0898 12.868 11.0898 12.2354C11.0899 11.6028 11.6028 11.0898 12.2354 11.0898ZM4.41797 7.85449C5.05059 7.85449 5.56348 8.36738 5.56348 9C5.56344 9.63258 5.05056 10.1455 4.41797 10.1455C3.78547 10.1454 3.2725 9.63251 3.27246 9C3.27246 8.36745 3.78545 7.85461 4.41797 7.85449ZM13.582 7.85449C14.2145 7.85461 14.7275 8.36746 14.7275 9C14.7275 9.63251 14.2145 10.1454 13.582 10.1455C12.9494 10.1455 12.4366 9.63258 12.4365 9C12.4365 8.36738 12.9494 7.85449 13.582 7.85449ZM5.76562 4.62012C6.39822 4.62015 6.91113 5.13303 6.91113 5.76562C6.91104 6.39815 6.39816 6.9111 5.76562 6.91113C5.13306 6.91113 4.62021 6.39816 4.62012 5.76562C4.62012 5.13301 5.13301 4.62012 5.76562 4.62012ZM12.2354 4.62012C12.8679 4.62015 13.3809 5.13303 13.3809 5.76562C13.3808 6.39815 12.8679 6.9111 12.2354 6.91113C11.6028 6.91113 11.0899 6.39816 11.0898 5.76562C11.0898 5.13301 11.6027 4.62012 12.2354 4.62012ZM9 3.27246C9.63255 3.27246 10.1454 3.78545 10.1455 4.41797C10.1455 5.05059 9.63262 5.56348 9 5.56348C8.36739 5.56347 7.85449 5.05058 7.85449 4.41797C7.85461 3.78546 8.36746 3.27247 9 3.27246Z"/></svg>;
}

const IconGenerating = React.forwardRef(IconGeneratingComponent);
export default IconGenerating;
