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

function IconMenuPluginComponent(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${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 d="M8.95624 1.5C9.32722 1.50003 9.69278 1.58909 10.0222 1.75969C10.3516 1.9303 10.6353 2.17747 10.8494 2.48044C11.0635 2.78342 11.2017 3.13334 11.2526 3.50083C11.3034 3.86832 11.2652 4.24263 11.1414 4.59233H14.3645C15.2189 4.59233 15.9101 5.28351 15.9101 6.13669V9.35982C16.2598 9.23618 16.634 9.19825 17.0014 9.2492C17.3687 9.30015 17.7185 9.4385 18.0214 9.65264C18.3242 9.86677 18.5712 10.1504 18.7417 10.4798C18.9122 10.8092 19.0012 11.1747 19.0012 11.5456C19.0012 11.9165 18.9122 12.2819 18.7417 12.6113C18.5712 12.9407 18.3242 13.2244 18.0214 13.4385C17.7185 13.6526 17.3687 13.791 17.0014 13.8419C16.634 13.8929 16.2598 13.8549 15.9101 13.7313V16.9544C15.9101 17.8076 15.2189 18.5 14.3645 18.5H11.1426C11.2659 18.1504 11.3036 17.7763 11.2524 17.4091C11.2013 17.0419 11.0628 16.6923 10.8486 16.3897C10.6345 16.087 10.3509 15.8402 10.0216 15.6698C9.69231 15.4995 9.32698 15.4105 8.95624 15.4105C8.5855 15.4105 8.22016 15.4995 7.89089 15.6698C7.56161 15.8402 7.27799 16.087 7.06383 16.3897C6.84967 16.6923 6.7112 17.0419 6.66006 17.4091C6.60891 17.7763 6.64658 18.1504 6.76989 18.5H3.54556C3.13565 18.5 2.74253 18.3372 2.45269 18.0473C2.16284 17.7575 2 17.3643 2 16.9544V13.7313C2.34968 13.8549 2.72392 13.8929 3.09129 13.8419C3.45867 13.791 3.80846 13.6526 4.11129 13.4385C4.41413 13.2244 4.66116 12.9407 4.83167 12.6113C5.00217 12.2819 5.09115 11.9165 5.09115 11.5456C5.09115 11.1747 5.00217 10.8092 4.83167 10.4798C4.66116 10.1504 4.41413 9.86677 4.11129 9.65264C3.80846 9.4385 3.45867 9.30015 3.09129 9.2492C2.72392 9.19825 2.34968 9.23618 2 9.35982V6.13669C2 5.28351 2.69238 4.59113 3.54556 4.59113H6.76869C6.64521 4.24128 6.6075 3.8669 6.65873 3.49946C6.70995 3.13201 6.84861 2.78222 7.06306 2.47948C7.2775 2.17674 7.56148 1.92988 7.89112 1.75965C8.22076 1.58942 8.58644 1.50079 8.95744 1.5012L8.95624 1.5Z"/></svg>;
}

const IconMenuPlugin = React.forwardRef(IconMenuPluginComponent);
export default IconMenuPlugin;
