import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as t}from"react";import{makeStyles as o,MenuItem as i,Tooltip as p}from"@material-ui/core";import a from"prop-types";import l from"classnames";import{jsx as s,jsxs as n,Fragment as c}from"react/jsx-runtime";var b=["DisabledTooltipProps","disabled"];function d(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function m(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?d(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var f=o((function(e){return{disabled:{color:e.palette.primary.text9,opacity:1,cursor:"default"},tooltipTrigger:{position:"absolute",top:0,bottom:0,left:0,right:0}}})),u=t((function(e,t){var o=e.DisabledTooltipProps,a=void 0===o?void 0:o,d=e.disabled,u=void 0!==d&&d,O=r(e,b),y=f();return s(i,u?m(m({},O),{},{ref:t,className:l(y.disabled,O.className),tabIndex:-1,button:!1,children:n(c,{children:[O.children,s(p,m(m({title:"Disabled",placement:"right"},a),{},{children:s("div",{onClick:function(e){e.stopPropagation()},className:y.tooltipTrigger})}))]})}):m({},O))}));u.propTypes={disabled:a.bool,DisabledTooltipProps:a.shape({})},u.defaultProps={disabled:!1,DisabledTooltipProps:{}};export{u as default};
