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_VIEW_BANNER_GAP: () => MONTH_VIEW_BANNER_GAP,
  MONTH_VIEW_BANNER_H: () => MONTH_VIEW_BANNER_H,
  MONTH_VIEW_BANNER_PAD_Y: () => MONTH_VIEW_BANNER_PAD_Y,
  MONTH_VIEW_DAY_HEADER_H: () => MONTH_VIEW_DAY_HEADER_H,
  MONTH_VIEW_MAX_LANE: () => MONTH_VIEW_MAX_LANE,
  MONTH_VIEW_MORE_TILE_PX: () => MONTH_VIEW_MORE_TILE_PX,
  OVERFLOW_MODAL_DAY_CARD_H: () => OVERFLOW_MODAL_DAY_CARD_H,
  OVERFLOW_MODAL_DAY_ROW_H: () => OVERFLOW_MODAL_DAY_ROW_H,
  OVERFLOW_MODAL_LIST_MAX_H: () => OVERFLOW_MODAL_LIST_MAX_H,
  OVERFLOW_MODAL_ROW_GAP: () => OVERFLOW_MODAL_ROW_GAP,
  OVERFLOW_MODAL_SIMPLE_CARD_H: () => OVERFLOW_MODAL_SIMPLE_CARD_H,
  OVERFLOW_MODAL_SIMPLE_ROW_H: () => OVERFLOW_MODAL_SIMPLE_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_MAX_LANE: () => RESOURCE_VIEW_MAX_LANE,
  RESOURCE_VIEW_MORE_TILE_MIN_PX: () => RESOURCE_VIEW_MORE_TILE_MIN_PX,
  WEEK_VIEW_MAX_LANE: () => WEEK_VIEW_MAX_LANE,
  dayColWidth: () => dayColWidth,
  dayCourtOverlayRowHeightPx: () => dayCourtOverlayRowHeightPx,
  dayHeaderHeight: () => dayHeaderHeight,
  dayRowHeight: () => dayRowHeight,
  estimateResourceViewCourtCellHeightPx: () => estimateResourceViewCourtCellHeightPx,
  frozenColWidth: () => frozenColWidth,
  groupRowHeight: () => groupRowHeight,
  monthViewEffectiveMaxLanes: () => monthViewEffectiveMaxLanes,
  monthWeekBannerContentHeightPx: () => monthWeekBannerContentHeightPx,
  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 RESOURCE_VIEW_MAX_LANE = 3;
var WEEK_VIEW_MAX_LANE = 2;
var MONTH_VIEW_MAX_LANE = 3;
var MONTH_VIEW_BANNER_H = 22;
var MONTH_VIEW_BANNER_GAP = 2;
var MONTH_VIEW_BANNER_PAD_Y = 2;
var MONTH_VIEW_DAY_HEADER_H = 52;
var MONTH_VIEW_MORE_TILE_PX = 22;
function monthWeekBannerContentHeightPx(visibleLanes, hasOverflow) {
  let h = MONTH_VIEW_BANNER_PAD_Y;
  if (visibleLanes > 0) {
    h += visibleLanes * MONTH_VIEW_BANNER_H + Math.max(0, visibleLanes - 1) * MONTH_VIEW_BANNER_GAP;
  }
  if (hasOverflow) {
    h += MONTH_VIEW_BANNER_GAP + MONTH_VIEW_MORE_TILE_PX;
  }
  return h;
}
function monthViewEffectiveMaxLanes(bannerZoneHeightPx, totalLaneCount) {
  if (totalLaneCount <= 0) return 0;
  const cap = Math.min(MONTH_VIEW_MAX_LANE, totalLaneCount);
  for (let visible = cap; visible >= 1; visible -= 1) {
    const hasOverflow = totalLaneCount > visible;
    if (monthWeekBannerContentHeightPx(visible, hasOverflow) <= bannerZoneHeightPx) {
      return visible;
    }
  }
  return 1;
}
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 OVERFLOW_MODAL_SIMPLE_CARD_H = 56;
var OVERFLOW_MODAL_DAY_CARD_H = 80;
var OVERFLOW_MODAL_ROW_GAP = 8;
var OVERFLOW_MODAL_SIMPLE_ROW_H = OVERFLOW_MODAL_SIMPLE_CARD_H + OVERFLOW_MODAL_ROW_GAP;
var OVERFLOW_MODAL_DAY_ROW_H = OVERFLOW_MODAL_DAY_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_VIEW_BANNER_GAP,
  MONTH_VIEW_BANNER_H,
  MONTH_VIEW_BANNER_PAD_Y,
  MONTH_VIEW_DAY_HEADER_H,
  MONTH_VIEW_MAX_LANE,
  MONTH_VIEW_MORE_TILE_PX,
  OVERFLOW_MODAL_DAY_CARD_H,
  OVERFLOW_MODAL_DAY_ROW_H,
  OVERFLOW_MODAL_LIST_MAX_H,
  OVERFLOW_MODAL_ROW_GAP,
  OVERFLOW_MODAL_SIMPLE_CARD_H,
  OVERFLOW_MODAL_SIMPLE_ROW_H,
  RESOURCE_VIEW_BOOKING_CARD_EST_PX,
  RESOURCE_VIEW_CELL_PADDING_Y_PX,
  RESOURCE_VIEW_FULLY_BOOKED_BLOCK_PX,
  RESOURCE_VIEW_MAX_LANE,
  RESOURCE_VIEW_MORE_TILE_MIN_PX,
  WEEK_VIEW_MAX_LANE,
  dayColWidth,
  dayCourtOverlayRowHeightPx,
  dayHeaderHeight,
  dayRowHeight,
  estimateResourceViewCourtCellHeightPx,
  frozenColWidth,
  groupRowHeight,
  monthViewEffectiveMaxLanes,
  monthWeekBannerContentHeightPx,
  resourceViewDayColWidth,
  timeSliceMinutes
});
