"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkNCSJCS36js = require('./chunk-NCSJCS36.js');require('react');var _buttons = require('@baseapp-frontend/design-system/components/web/buttons');var _icons = require('@baseapp-frontend/design-system/components/web/icons');var _popovers = require('@baseapp-frontend/design-system/components/web/popovers');var _material = require('@mui/material');var _jsxruntime = require('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 _jsxruntime.jsxs.call(void 0, _chunkNCSJCS36js.a,{offsetRight:u,offsetTop:v,"aria-label":"actions overlay",sx:{position:"unset",marginX:"4px",borderRadius:"500px",alignSelf:"baseline"},children:[_jsxruntime.jsx.call(void 0, _buttons.IconButton,{onClick:d.onOpen,"aria-label":"Show menu options",children:_jsxruntime.jsx.call(void 0, _icons.ThreeDotsIcon,{sx:{fontSize:"18px"}})}),_jsxruntime.jsx.call(void 0, _popovers.Popover,{open:d.open,onClose:s,children:_jsxruntime.jsxs.call(void 0, _material.MenuList,{children:[_optionalChain([l, 'optionalAccess', _ => _.map, 'call', _2 => _2(function(i){var p=i.label,D=i.icon,r=i.onClick,C=i.disabled,g=i.hasPermission;return g?_jsxruntime.jsxs.call(void 0, _material.MenuItem,{onClick:function(){_optionalChain([r, 'optionalCall', _3 => _3()]),s()},disabled:C,children:[D,_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",color:"text.primary",children:p})]},p):null})]),b&&_jsxruntime.jsxs.call(void 0, _material.MenuItem,{onClick:x,disabled:f||t,color:"disabled",children:[_jsxruntime.jsx.call(void 0, _icons.TrashCanIcon,{sx:{color:t?"text.disabled":"error.main"}}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",color:t?"text.disabled":"error.main",children:"Delete"})]})]})})]})},X= exports.a =B;exports.a = X;
//# sourceMappingURL=chunk-ETYOHKYZ.js.map