var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/booking/components/clearCartModal/index.tsx
var clearCartModal_exports = {};
__export(clearCartModal_exports, {
  default: () => clearCartModal_default
});
module.exports = __toCommonJS(clearCartModal_exports);
var import_react = __toESM(require("react"));
var import_icon = require("@pisell/icon");
var import_materials = require("@pisell/materials");
var import_utils = require("@pisell/utils");
var import_index = require("./index.less");
var import_compensatedPisellContainer = __toESM(require("../../../../pro/compensatedPisellContainer"));
var import_responsive = require("../../../../responsive");
var ClearCartModal = ({
  visible,
  onCancel,
  onClearItemsOnly,
  onClearAllAndReset,
  variant
}) => {
  const isPhoneVariant = variant === "phone";
  return /* @__PURE__ */ import_react.default.createElement(
    import_compensatedPisellContainer.default,
    {
      renderType: isPhoneVariant ? "drawer" : "modal",
      showHandlerBar: isPhoneVariant,
      onHandlerBarClick: onCancel,
      props: isPhoneVariant ? {
        open: visible,
        placement: "bottom",
        width: "100%",
        height: "auto",
        onClose: onCancel,
        footer: null,
        className: "pisell-clear-cart-modal",
        title: null
      } : {
        open: visible,
        onCancel,
        footer: null,
        width: 520,
        centered: true,
        className: "pisell-clear-cart-modal",
        title: null,
        closable: true
      }
    },
    /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-clear-cart-modal-content" }, /* @__PURE__ */ import_react.default.createElement("h3", { className: "pisell-clear-cart-modal-title" }, import_utils.locales.getText("pisell2.clear-cart-modal.title")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-clear-cart-modal-options" }, /* @__PURE__ */ import_react.default.createElement(
      "button",
      {
        type: "button",
        className: "pisell-clear-cart-option purple-option",
        onClick: onClearItemsOnly
      },
      /* @__PURE__ */ import_react.default.createElement("div", { className: "option-icon" }, /* @__PURE__ */ import_react.default.createElement(import_icon.Trash01, { size: 32 })),
      /* @__PURE__ */ import_react.default.createElement("div", { className: "option-text" }, import_utils.locales.getText("pisell2.clear-cart-modal.clear-items-only"))
    ), /* @__PURE__ */ import_react.default.createElement(
      "button",
      {
        type: "button",
        className: "pisell-clear-cart-option red-option",
        onClick: onClearAllAndReset
      },
      /* @__PURE__ */ import_react.default.createElement("div", { className: "option-icon" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-log-out-04", size: 32 })),
      /* @__PURE__ */ import_react.default.createElement("div", { className: "option-text" }, import_utils.locales.getText("pisell2.clear-cart-modal.clear-all-reset"))
    )))
  );
};
ClearCartModal.displayName = "ClearCartModal";
var clearCartModal_default = (0, import_responsive.withResponsive)(ClearCartModal);
