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/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDaySelectionBar.tsx
var BookingCalendarDaySelectionBar_exports = {};
__export(BookingCalendarDaySelectionBar_exports, {
  BookingCalendarDaySelectionBar: () => BookingCalendarDaySelectionBar
});
module.exports = __toCommonJS(BookingCalendarDaySelectionBar_exports);
var import_react = __toESM(require("react"));
var import_bookingCalendarDateUtils = require("../utils/bookingCalendarDateUtils");
var import_calendarI18n = require("../calendarI18n");
function BookingCalendarDaySelectionBar({
  slotStepHours,
  selectedFreeSlots,
  resourceSelectionSummary,
  deselectAll,
  onOpenBlockPanel,
  createBookingFromSelection
}) {
  const hasFree = resourceSelectionSummary != null ? resourceSelectionSummary.freePickCount > 0 : selectedFreeSlots.length > 0;
  if (!hasFree) {
    return null;
  }
  const allowCreateOrBlock = resourceSelectionSummary != null ? resourceSelectionSummary.freeAllowsBlockPanel : (0, import_bookingCalendarDateUtils.isFreeSelectionContiguousSameResource)(selectedFreeSlots, slotStepHours);
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "fixed bottom-6 left-1/2 z-50 -translate-x-1/2" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "flex max-w-[92vw] flex-wrap items-center justify-center gap-3 rounded-2xl border border-white/10 bg-black/55 px-4 py-3 shadow-2xl shadow-black/40 backdrop-blur-xl" }, /* @__PURE__ */ import_react.default.createElement(
    "button",
    {
      type: "button",
      onClick: deselectAll,
      className: "rounded-xl bg-red-500/85 px-4 py-2 text-sm font-semibold text-white"
    },
    (0, import_calendarI18n.tCal)("pisell2.recordBoard.calendar.day.deselectAll")
  ), allowCreateOrBlock && /* @__PURE__ */ import_react.default.createElement(
    "button",
    {
      type: "button",
      onClick: onOpenBlockPanel,
      className: "rounded-xl bg-zinc-500/90 px-5 py-3 text-sm font-semibold text-white"
    },
    (0, import_calendarI18n.tCal)("pisell2.recordBoard.calendar.day.block")
  ), allowCreateOrBlock && /* @__PURE__ */ import_react.default.createElement(
    "button",
    {
      type: "button",
      onClick: createBookingFromSelection,
      className: "rounded-xl bg-violet-600 px-6 py-3 text-sm font-semibold text-white"
    },
    (0, import_calendarI18n.tCal)("pisell2.recordBoard.calendar.day.createBooking")
  )));
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  BookingCalendarDaySelectionBar
});
