import React from 'react';
import { isFreeSelectionContiguousSameResource } from "../utils/bookingCalendarDateUtils";
import { tCal } from "../calendarI18n";
/** 日视图底部：多选空闲 / 锁台后的固定操作条 */
export function BookingCalendarDaySelectionBar(_ref) {
  var slotStepHours = _ref.slotStepHours,
    selectedFreeSlots = _ref.selectedFreeSlots,
    selectedBlockSlots = _ref.selectedBlockSlots,
    deselectAll = _ref.deselectAll,
    openSelectedBlocks = _ref.openSelectedBlocks,
    onOpenBlockPanel = _ref.onOpenBlockPanel,
    createBookingFromSelection = _ref.createBookingFromSelection;
  if (selectedFreeSlots.length === 0 && selectedBlockSlots.length === 0) {
    return null;
  }
  return /*#__PURE__*/React.createElement("div", {
    className: "fixed bottom-6 left-1/2 z-50 -translate-x-1/2"
  }, /*#__PURE__*/React.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__*/React.createElement("button", {
    type: "button",
    onClick: deselectAll,
    className: "rounded-xl bg-red-500/85 px-4 py-2 text-sm font-semibold text-white hover:bg-red-500"
  }, tCal('pisell2.recordBoard.calendar.day.deselectAll')), selectedBlockSlots.length > 0 && /*#__PURE__*/React.createElement("button", {
    type: "button",
    onClick: openSelectedBlocks,
    className: "rounded-xl bg-zinc-500/90 px-5 py-3 text-sm font-semibold text-white hover:bg-zinc-400"
  }, tCal('pisell2.recordBoard.calendar.day.openSlot')), selectedFreeSlots.length > 0 && isFreeSelectionContiguousSameResource(selectedFreeSlots, slotStepHours) && /*#__PURE__*/React.createElement("button", {
    type: "button",
    onClick: onOpenBlockPanel,
    className: "rounded-xl bg-zinc-500/90 px-5 py-3 text-sm font-semibold text-white hover:bg-zinc-400"
  }, tCal('pisell2.recordBoard.calendar.day.block')), selectedFreeSlots.length > 0 && /*#__PURE__*/React.createElement("button", {
    type: "button",
    onClick: createBookingFromSelection,
    className: "rounded-xl bg-violet-600 px-6 py-3 text-sm font-semibold text-white hover:bg-violet-500"
  }, tCal('pisell2.recordBoard.calendar.day.createBooking'))));
}