import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import t from"@babel/runtime/helpers/typeof";import{jsxs as i,jsx as o}from"react/jsx-runtime";import{forwardRef as s,isValidElement as a,cloneElement as c}from"react";import{MenuItem as l}from"@material-ui/core";import m from"classnames";import n from"./MenuItem.scss.js";var p=["children","testId","className","onClick","disabled","prefix","suffix","size","tagName","disableClickEffect","selected","type"];function f(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,i)}return t}function d(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?f(Object(i),!0).forEach((function(t){e(r,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}var u={medium:n.medium,large:n.large},b={medium:"small",large:"medium"},y={medium:16,large:24},O=function(e,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(a(e)){var o=e&&"object"===t(e.type)&&e.type.displayName;return c(e,"Checkbox"===o?{size:b[r],className:m(n.checkboxAffix,i?n.suffix:n.prefix),labelPlacement:i?"start":"end"}:{size:y[r],className:m(n.iconAffix,e.props.className)})}return e},h={normal:"",destructive:n.destructive},v=s((function(e,t){var s=e.children,a=e.testId,c=e.className,f=e.onClick,b=e.disabled,y=e.prefix,v=e.suffix,j=e.size,g=void 0===j?"medium":j,x=e.tagName,P=void 0===x?"li":x,N=e.disableClickEffect,k=e.selected,w=e.type,C=void 0===w?"normal":w,I=r(e,p);return i(l,d(d({className:m(n.menuItem,h[C],u[g],c),"data-testid":a,onClick:f,disabled:b,disableRipple:N,disableTouchRipple:N,component:P,selected:k,ref:t},I),{},{children:[O(y,g),o("div",{className:n.itemLabel,children:s}),O(v,g,!0)]}))}));export{v as MenuItem};
//# sourceMappingURL=MenuItem.js.map
