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

function IconPluginLocalComponent(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_local${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="M6 .429A5.571 5.571 0 1 1 6 11.57 5.571 5.571 0 0 1 6 .43Zm0 1a4.571 4.571 0 1 0 0 9.142A4.571 4.571 0 0 0 6 1.43Zm2.384 1.935a.5.5 0 0 1 .735.622L6.455 9.807a.5.5 0 0 1-.904.012L2.76 4.126a.501.501 0 0 1 .11-.59.501.501 0 0 1 .596-.059l2.517 1.51 2.4-1.623Zm-2.105 2.63-.062.035a.5.5 0 0 1-.475-.021l-1.339-.803 1.581 3.227L7.47 5.19l-1.19.804Z"/></svg>;
}

const IconPluginLocal = React.forwardRef(IconPluginLocalComponent);
export default IconPluginLocal;
