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

function IconMenuPluginCenterComponent(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-menu-plugin-center${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 20 20" {...rest} ref={ref}><path fillRule="evenodd" d="M7.56699 1.66699H3.26699C2.38334 1.66699 1.66699 2.38334 1.66699 3.26699V7.56699C1.66699 8.45065 2.38334 9.16699 3.26699 9.16699H7.56699C8.45065 9.16699 9.16699 8.45065 9.16699 7.56699V3.26699C9.16699 2.38334 8.45065 1.66699 7.56699 1.66699ZM16.733 10.833H12.433C11.5493 10.833 10.833 11.5494 10.833 12.433V16.733C10.833 17.6167 11.5493 18.333 12.433 18.333H16.733C17.6166 18.333 18.333 17.6167 18.333 16.733V12.433C18.333 11.5494 17.6166 10.833 16.733 10.833ZM2.36407 13.2693L4.32275 11.3106C4.94759 10.6858 5.96066 10.6858 6.58549 11.3106L8.54418 13.2693C9.16902 13.8942 9.16902 14.9072 8.54418 15.5321L6.58549 17.4908C5.96066 18.1156 4.94759 18.1156 4.32275 17.4908L2.36407 15.5321C1.73923 14.9072 1.73923 13.8942 2.36407 13.2693Z" clipRule="evenodd"/><path d="M14.583 9.16699C16.6541 9.16699 18.333 7.48806 18.333 5.41699C18.333 3.34592 16.6541 1.66699 14.583 1.66699C12.5119 1.66699 10.833 3.34592 10.833 5.41699C10.833 7.48806 12.5119 9.16699 14.583 9.16699Z" opacity=".5"/></svg>;
}

const IconMenuPluginCenter = React.forwardRef(IconMenuPluginCenterComponent);
export default IconMenuPluginCenter;
