import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import r from"prop-types";import o from"classnames";import i from"@material-ui/core/ListItemIcon";import{makeStyles as n}from"@material-ui/core";import c from"../MenuItem/index.js";import{jsxs as l,jsx as a}from"react/jsx-runtime";var p=["classes","icon","children","small","iconType"];function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function m(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?s(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var u=n((function(e){return{menuItem:{height:function(e){return e.small?36:54},lineHeight:function(e){return e.small?"17px":"24px"},"&:hover svg":{fill:function(t){var r=t.iconType,o=t.disabled;return"iconPark"===r?"":o?e.palette.primary.text9:e.palette.primary.contrastText},color:function(t){var r=t.iconType,o=t.disabled;return"mui"===r?"":o?e.palette.primary.text9:e.palette.primary.contrastText}}},listItemIcon:{paddingRight:e.spacing(1),color:function(t){return t.disabled?e.palette.primary.text9:e.palette.primary.text7},minWidth:"auto",fontSize:function(e){return e.small?16:24},"& .MuiSvgIcon-root":{fontSize:"inherit"}}}})),f=function(e){var r=e.classes,n=void 0===r?{}:r,s=e.icon,f=e.children,d=e.small,y=e.iconType,b=t(e,p),h=u({small:d,disabled:b.disabled,iconType:y});return l(c,m(m({classes:m(m({},n),{},{root:o(h.menuItem,n.root)})},b),{},{children:[a(i,{classes:{root:h.listItemIcon},children:s}),f]}))};f.propTypes={children:r.node.isRequired,icon:r.node.isRequired,iconType:r.string,small:r.bool},f.defaultProps={small:!1,iconType:"mui"};export{f as default};
