import React from 'react';
import { tCal } from "../calendarI18n";
import { OverflowListModalVirtualList } from "./OverflowListModal";
/**
 * 全局溢出预约列表弹层（日视图 lane 与月/周/资源 `+N` 点开后）。
 * 日视图列表行可走宿主 RoomCard；其它视图使用内置列表行。
 */
export function BookingCalendarOverflowListLayer(_ref) {
  var overflowPanelRef = _ref.overflowPanelRef,
    isLight = _ref.isLight,
    modal = _ref.modal,
    onClose = _ref.onClose,
    onPickItem = _ref.onPickItem,
    renderBooking = _ref.renderBooking,
    onDragStart = _ref.onDragStart;
  var isDayLaneOverflow = Boolean(modal.scope && String(modal.scope).startsWith('day-lane-overflow-'));
  return /*#__PURE__*/React.createElement("div", {
    className: "fixed inset-0 z-[69] bg-black/45 backdrop-blur-sm flex items-center justify-center p-4"
  }, /*#__PURE__*/React.createElement("div", {
    ref: overflowPanelRef,
    className: "flex w-full max-w-[520px] max-h-[72vh] flex-col overflow-hidden rounded-3xl border p-5 shadow-2xl ".concat(isLight ? 'theme-panel theme-border soft-shadow' : 'border-zinc-700 bg-[#121217]')
  }, /*#__PURE__*/React.createElement("div", {
    className: "mb-4 flex shrink-0 items-start justify-between"
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
    className: "text-xl font-semibold"
  }, tCal('pisell2.recordBoard.calendar.overflow.bookingsForDay')), /*#__PURE__*/React.createElement("div", {
    className: "mt-1 text-sm text-zinc-400"
  }, modal.title)), /*#__PURE__*/React.createElement("button", {
    type: "button",
    onClick: onClose,
    className: "rounded-xl border border-zinc-700 px-3 py-2 text-zinc-300"
  }, tCal('pisell2.recordBoard.calendar.common.close'))), /*#__PURE__*/React.createElement("div", {
    className: "min-h-0 overflow-y-auto px-0.5"
  }, /*#__PURE__*/React.createElement(OverflowListModalVirtualList, {
    items: modal.items,
    dateKey: modal.date,
    onPickItem: onPickItem,
    onClose: onClose,
    showStatusUi: isDayLaneOverflow,
    isDayLaneOverflow: isDayLaneOverflow,
    isLight: isLight,
    renderBooking: isDayLaneOverflow ? renderBooking : undefined,
    onDragStart: onDragStart
  }))));
}