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

function IconPluginRemoteComponent(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-plugin_remote${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 12 12" {...rest} ref={ref}><path d="M9.369 5.63a1.501 1.501 0 0 1 1.347 1.493v2.52l-.008.154a1.502 1.502 0 0 1-1.34 1.339l-.152.008H2.752l-.154-.008a1.5 1.5 0 0 1-1.338-1.34l-.008-.152v-2.52A1.5 1.5 0 0 1 2.598 5.63l.154-.008h6.464l.153.008Zm-6.617.993a.5.5 0 0 0-.5.5v2.52a.5.5 0 0 0 .5.5h6.464a.5.5 0 0 0 .5-.5v-2.52a.5.5 0 0 0-.5-.5H2.752Zm5.097.577a.5.5 0 0 1 0 1H4.118a.5.5 0 0 1 0-1h3.731ZM3.303 4.05c1.49-1.198 3.87-1.198 5.359 0a.5.5 0 0 1-.627.78c-1.124-.905-2.981-.905-4.105 0a.5.5 0 0 1-.627-.78ZM2.086 2.16a6.217 6.217 0 0 1 8.185.341.5.5 0 0 1-.69.725 5.218 5.218 0 0 0-7.195 0 .501.501 0 0 1-.69-.725 5.93 5.93 0 0 1 .39-.34Z"/></svg>;
}

const IconPluginRemote = React.forwardRef(IconPluginRemoteComponent);
export default IconPluginRemote;
