"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var _chunkGIOWIKTQjs = require('./chunk-GIOWIKTQ.js');

// tmp-babel/__shared__/web/ActionsOverlay/DefaultHoverOverlay/index.js
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
var _buttons = require('@baseapp-frontend/design-system/components/web/buttons');
var _icons = require('@baseapp-frontend/design-system/components/web/icons');
var _jsxruntime = require('react/jsx-runtime');
var DefaultHoverOverlay = function DefaultHoverOverlay2(_ref) {
  var offsetRight = _ref.offsetRight, offsetTop = _ref.offsetTop, showDeleteButton = _ref.showDeleteButton, isDeletingItem = _ref.isDeletingItem, disableDeleteButton = _ref.disableDeleteButton, handleDeleteDialogOpen = _ref.handleDeleteDialogOpen, _ref$actions = _ref.actions, actions = _ref$actions === void 0 ? [] : _ref$actions, handleLongPressItemOptionsClose = _ref.handleLongPressItemOptionsClose;
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGIOWIKTQjs.ActionOverlayTooltipContainer, {
    offsetRight,
    offsetTop,
    "aria-label": "actions overlay",
    children: [showDeleteButton && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _buttons.IconButton, {
      onClick: handleDeleteDialogOpen,
      disabled: isDeletingItem || disableDeleteButton,
      "aria-label": "delete item",
      children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _icons.TrashCanIcon, {})
    }), actions === null || actions === void 0 ? void 0 : actions.map(function(_ref2) {
      var label = _ref2.label, icon = _ref2.icon, onClick = _ref2.onClick, disabled = _ref2.disabled, hasPermission = _ref2.hasPermission, closeOnClick = _ref2.closeOnClick;
      if (!hasPermission) return null;
      var handleClick = function handleClick2() {
        onClick === null || onClick === void 0 || onClick();
        if (closeOnClick) {
          handleLongPressItemOptionsClose();
        }
      };
      return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _buttons.IconButton, {
        onClick: handleClick,
        disabled,
        "aria-label": label,
        children: icon
      }, label);
    })]
  });
};
var DefaultHoverOverlay_default = DefaultHoverOverlay;



exports.DefaultHoverOverlay_default = DefaultHoverOverlay_default;
//# sourceMappingURL=chunk-7ULNVKTJ.js.map