var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.ts
var bookingCalendarConstants_exports = {};
__export(bookingCalendarConstants_exports, {
  CALENDAR_EMPTY_DASHED_SLOT_CLASSNAME: () => CALENDAR_EMPTY_DASHED_SLOT_CLASSNAME,
  DAY_BOOKING_CARD_MIN_PX: () => DAY_BOOKING_CARD_MIN_PX,
  DAY_BOOKING_MICRO_PX: () => DAY_BOOKING_MICRO_PX,
  DAY_BOOKING_NARROW_PX: () => DAY_BOOKING_NARROW_PX,
  DAY_OVERLAY_INNER_BOTTOM: () => DAY_OVERLAY_INNER_BOTTOM,
  DAY_OVERLAY_INNER_TOP: () => DAY_OVERLAY_INNER_TOP,
  DAY_OVERLAY_LANE_GAP: () => DAY_OVERLAY_LANE_GAP,
  DAY_OVERLAY_LANE_MIN_PX: () => DAY_OVERLAY_LANE_MIN_PX,
  DAY_OVERLAY_VISIBLE_BOOKING_CAP: () => DAY_OVERLAY_VISIBLE_BOOKING_CAP,
  DAY_VIEW_COL_BUFFER: () => DAY_VIEW_COL_BUFFER,
  DAY_VIEW_ROW_BUFFER_PX: () => DAY_VIEW_ROW_BUFFER_PX,
  DEFAULT_CALENDAR_TIMELINE: () => DEFAULT_CALENDAR_TIMELINE,
  MONTH_OVERFLOW_POPOVER_CARD_H: () => MONTH_OVERFLOW_POPOVER_CARD_H,
  MONTH_OVERFLOW_POPOVER_ITEM_H: () => MONTH_OVERFLOW_POPOVER_ITEM_H,
  MONTH_OVERFLOW_POPOVER_LIST_MAX_H: () => MONTH_OVERFLOW_POPOVER_LIST_MAX_H,
  MONTH_OVERFLOW_POPOVER_ROW_GAP: () => MONTH_OVERFLOW_POPOVER_ROW_GAP,
  OVERFLOW_MODAL_CARD_H: () => OVERFLOW_MODAL_CARD_H,
  OVERFLOW_MODAL_LIST_MAX_H: () => OVERFLOW_MODAL_LIST_MAX_H,
  OVERFLOW_MODAL_ROW_GAP: () => OVERFLOW_MODAL_ROW_GAP,
  OVERFLOW_MODAL_ROW_H: () => OVERFLOW_MODAL_ROW_H,
  RESOURCE_VIEW_BOOKING_CARD_EST_PX: () => RESOURCE_VIEW_BOOKING_CARD_EST_PX,
  RESOURCE_VIEW_CELL_PADDING_Y_PX: () => RESOURCE_VIEW_CELL_PADDING_Y_PX,
  RESOURCE_VIEW_FULLY_BOOKED_BLOCK_PX: () => RESOURCE_VIEW_FULLY_BOOKED_BLOCK_PX,
  RESOURCE_VIEW_MORE_TILE_MIN_PX: () => RESOURCE_VIEW_MORE_TILE_MIN_PX,
  dayColWidth: () => dayColWidth,
  dayCourtOverlayRowHeightPx: () => dayCourtOverlayRowHeightPx,
  dayHeaderHeight: () => dayHeaderHeight,
  dayRowHeight: () => dayRowHeight,
  estimateResourceViewCourtCellHeightPx: () => estimateResourceViewCourtCellHeightPx,
  frozenColWidth: () => frozenColWidth,
  groupRowHeight: () => groupRowHeight,
  resourceViewDayColWidth: () => resourceViewDayColWidth,
  timeSliceMinutes: () => timeSliceMinutes
});
module.exports = __toCommonJS(bookingCalendarConstants_exports);
var timeSliceMinutes = 60;
var DEFAULT_CALENDAR_TIMELINE = { start: "02:00", end: "02:00" };
var frozenColWidth = 132;
var dayColWidth = 92;
var resourceViewDayColWidth = 102;
var CALENDAR_EMPTY_DASHED_SLOT_CLASSNAME = "flex min-h-0 flex-1 w-full flex-col items-center justify-center rounded-lg border border-dashed px-2 py-1 text-xs";
var dayRowHeight = 44;
var RESOURCE_VIEW_BOOKING_CARD_EST_PX = 48;
var RESOURCE_VIEW_MORE_TILE_MIN_PX = 48;
var RESOURCE_VIEW_CELL_PADDING_Y_PX = 8;
var RESOURCE_VIEW_FULLY_BOOKED_BLOCK_PX = 28;
var groupRowHeight = 38;
var dayHeaderHeight = 56;
var DAY_BOOKING_CARD_MIN_PX = 64;
var DAY_OVERLAY_LANE_MIN_PX = DAY_BOOKING_CARD_MIN_PX;
var DAY_OVERLAY_INNER_TOP = 8;
var DAY_OVERLAY_INNER_BOTTOM = 8;
var DAY_OVERLAY_LANE_GAP = 2;
var DAY_OVERLAY_VISIBLE_BOOKING_CAP = 3;
function dayCourtOverlayRowHeightPx(displayLaneCount) {
  const n = Math.max(1, displayLaneCount);
  return DAY_OVERLAY_INNER_TOP + DAY_OVERLAY_INNER_BOTTOM + n * DAY_OVERLAY_LANE_MIN_PX + (n - 1) * DAY_OVERLAY_LANE_GAP;
}
function estimateResourceViewCourtCellHeightPx(summary) {
  var _a;
  const pad = RESOURCE_VIEW_CELL_PADDING_Y_PX;
  if (summary.fullyBooked) {
    return RESOURCE_VIEW_FULLY_BOOKED_BLOCK_PX + pad;
  }
  const n = ((_a = summary.items) == null ? void 0 : _a.length) ?? 0;
  if (n === 0) {
    return dayRowHeight;
  }
  const previewCount = Math.min(3, n);
  const moreCount = Math.max(0, n - 3);
  const showMoreTile = moreCount > 0 && previewCount > 0;
  const gap = 4;
  let content = previewCount * RESOURCE_VIEW_BOOKING_CARD_EST_PX + (previewCount > 1 ? (previewCount - 1) * gap : 0);
  if (showMoreTile) {
    content += gap + RESOURCE_VIEW_MORE_TILE_MIN_PX;
  }
  return pad + content;
}
var DAY_BOOKING_NARROW_PX = 88;
var DAY_BOOKING_MICRO_PX = 32;
var DAY_VIEW_COL_BUFFER = 5;
var DAY_VIEW_ROW_BUFFER_PX = 240;
var MONTH_OVERFLOW_POPOVER_CARD_H = 64;
var MONTH_OVERFLOW_POPOVER_ROW_GAP = 8;
var MONTH_OVERFLOW_POPOVER_ITEM_H = MONTH_OVERFLOW_POPOVER_CARD_H + MONTH_OVERFLOW_POPOVER_ROW_GAP;
var MONTH_OVERFLOW_POPOVER_LIST_MAX_H = 280;
var OVERFLOW_MODAL_CARD_H = 100;
var OVERFLOW_MODAL_ROW_GAP = 8;
var OVERFLOW_MODAL_ROW_H = OVERFLOW_MODAL_CARD_H + OVERFLOW_MODAL_ROW_GAP;
var OVERFLOW_MODAL_LIST_MAX_H = 420;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  CALENDAR_EMPTY_DASHED_SLOT_CLASSNAME,
  DAY_BOOKING_CARD_MIN_PX,
  DAY_BOOKING_MICRO_PX,
  DAY_BOOKING_NARROW_PX,
  DAY_OVERLAY_INNER_BOTTOM,
  DAY_OVERLAY_INNER_TOP,
  DAY_OVERLAY_LANE_GAP,
  DAY_OVERLAY_LANE_MIN_PX,
  DAY_OVERLAY_VISIBLE_BOOKING_CAP,
  DAY_VIEW_COL_BUFFER,
  DAY_VIEW_ROW_BUFFER_PX,
  DEFAULT_CALENDAR_TIMELINE,
  MONTH_OVERFLOW_POPOVER_CARD_H,
  MONTH_OVERFLOW_POPOVER_ITEM_H,
  MONTH_OVERFLOW_POPOVER_LIST_MAX_H,
  MONTH_OVERFLOW_POPOVER_ROW_GAP,
  OVERFLOW_MODAL_CARD_H,
  OVERFLOW_MODAL_LIST_MAX_H,
  OVERFLOW_MODAL_ROW_GAP,
  OVERFLOW_MODAL_ROW_H,
  RESOURCE_VIEW_BOOKING_CARD_EST_PX,
  RESOURCE_VIEW_CELL_PADDING_Y_PX,
  RESOURCE_VIEW_FULLY_BOOKED_BLOCK_PX,
  RESOURCE_VIEW_MORE_TILE_MIN_PX,
  dayColWidth,
  dayCourtOverlayRowHeightPx,
  dayHeaderHeight,
  dayRowHeight,
  estimateResourceViewCourtCellHeightPx,
  frozenColWidth,
  groupRowHeight,
  resourceViewDayColWidth,
  timeSliceMinutes
});
