import{a as c}from"./chunk-UG6FE2XS.mjs";import"react";import{IconButton as y}from"@baseapp-frontend/design-system/components/web/buttons";import{ThreeDotsIcon as T,TrashCanIcon as k}from"@baseapp-frontend/design-system/components/web/icons";import{Popover as I}from"@baseapp-frontend/design-system/components/web/popovers";import{MenuItem as h,MenuList as O,Typography as m}from"@mui/material";import{jsx as e,jsxs as n}from"react/jsx-runtime";var B=function(o){var u=o.offsetRight,v=o.offsetTop,b=o.showDeleteButton,f=o.isDeletingItem,t=o.disableDeleteButton,x=o.handleDeleteDialogOpen,a=o.actions,l=a===void 0?[]:a,s=o.handleClosePopover,d=o.popover;return n(c,{offsetRight:u,offsetTop:v,"aria-label":"actions overlay",sx:{position:"unset",marginX:"4px",borderRadius:"500px",alignSelf:"baseline"},children:[e(y,{onClick:d.onOpen,"aria-label":"Show menu options",children:e(T,{sx:{fontSize:"18px"}})}),e(I,{open:d.open,onClose:s,children:n(O,{children:[l?.map(function(i){var p=i.label,D=i.icon,r=i.onClick,C=i.disabled,g=i.hasPermission;return g?n(h,{onClick:function(){r?.(),s()},disabled:C,children:[D,e(m,{variant:"body2",color:"text.primary",children:p})]},p):null}),b&&n(h,{onClick:x,disabled:f||t,color:"disabled",children:[e(k,{sx:{color:t?"text.disabled":"error.main"}}),e(m,{variant:"body2",color:t?"text.disabled":"error.main",children:"Delete"})]})]})})]})},X=B;export{X as a};
//# sourceMappingURL=chunk-OVV7FA2W.mjs.map