import {
  ActionOverlayTooltipContainer
} from "./chunk-TSAVJPG4.mjs";

// tmp-babel/__shared__/web/ActionsOverlay/DefaultHoverOverlay/index.js
import React from "react";
import { IconButton } from "@baseapp-frontend/design-system/components/web/buttons";
import { TrashCanIcon } from "@baseapp-frontend/design-system/components/web/icons";
import { jsx as _jsx, jsxs as _jsxs } from "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__ */ _jsxs(ActionOverlayTooltipContainer, {
    offsetRight,
    offsetTop,
    "aria-label": "actions overlay",
    children: [showDeleteButton && /* @__PURE__ */ _jsx(IconButton, {
      onClick: handleDeleteDialogOpen,
      disabled: isDeletingItem || disableDeleteButton,
      "aria-label": "delete item",
      children: /* @__PURE__ */ _jsx(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__ */ _jsx(IconButton, {
        onClick: handleClick,
        disabled,
        "aria-label": label,
        children: icon
      }, label);
    })]
  });
};
var DefaultHoverOverlay_default = DefaultHoverOverlay;

export {
  DefaultHoverOverlay_default
};
//# sourceMappingURL=chunk-DB2Y3HTL.mjs.map