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/venueBooking/components/Content/index.tsx
var Content_exports = {};
__export(Content_exports, {
  default: () => Content
});
module.exports = __toCommonJS(Content_exports);
var import_react = __toESM(require("react"));
var import_context = require("../../context");
var import_Header = __toESM(require("../Header"));
var import_Footer = __toESM(require("../Footer"));
var import_VenueSelection = __toESM(require("../VenueSelection"));
var import_Addons = __toESM(require("../Addons"));
var import_Checkout = __toESM(require("../Checkout"));
var import_Cart = __toESM(require("../Cart"));
function Content() {
  const { currentStep, viewModel, handlePrimaryAction, isSubmittingOrder } = (0, import_context.useVenueBookingContext)();
  const stepRegistry = {
    "select-venue": /* @__PURE__ */ import_react.default.createElement(import_VenueSelection.default, null),
    addons: /* @__PURE__ */ import_react.default.createElement(import_Addons.default, null),
    checkout: /* @__PURE__ */ import_react.default.createElement(import_Checkout.default, null)
  };
  const stepHeaderRef = (0, import_react.useRef)(null);
  (0, import_react.useEffect)(() => {
    const wrap = stepHeaderRef.current;
    if (!wrap) return void 0;
    const scope = wrap.closest(".venue-booking-scope");
    if (!scope) return void 0;
    function update() {
      if (!wrap) return;
      scope == null ? void 0 : scope.style.setProperty("--vb-grid-sticky-top", `${wrap.offsetHeight}px`);
    }
    update();
    const ro = typeof ResizeObserver !== "undefined" ? new ResizeObserver(update) : null;
    ro == null ? void 0 : ro.observe(wrap);
    window.addEventListener("resize", update);
    return () => {
      ro == null ? void 0 : ro.disconnect();
      window.removeEventListener("resize", update);
    };
  }, []);
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("style", null, `
        @keyframes slideLeft { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: translateX(0); } }
        @keyframes slideRight { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: translateX(0); } }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
        /* 骨架屏光条：从左到右扫过营造数据加载感 */
        @keyframes vbShimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
        .vb-skeleton-shimmer {
          position: absolute;
          inset: 0;
          background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
          animation: vbShimmer 1.4s ease-in-out infinite;
          pointer-events: none;
        }

        /* 作用域 reset：修复宿主环境 preflight: false 导致浏览器默认样式泄入 */
        .venue-booking-scope *,
        .venue-booking-scope *::before,
        .venue-booking-scope *::after {
          box-sizing: border-box;
        }
        .venue-booking-scope {
          --vb-primary: var(--theme-color, #ea1018);
          --vb-primary-light: color-mix(in srgb, var(--vb-primary) 12%, #fff);
          --vb-grid-sticky-top: 0px;
          font-size: 16px;
          line-height: 1.5;
        }
        .venue-booking-scope .vb-primary-text { color: var(--vb-primary); }
        .venue-booking-scope button {
          border: none;
          outline: none;
          background: transparent;
          font: inherit;
          color: inherit;
          padding: 0;
          cursor: pointer;
        }
        /* 仅重置无 class 的原生输入框，避免覆盖 Tailwind 组件显式边框 */
        .venue-booking-scope input:not([class]),
        .venue-booking-scope textarea:not([class]) {
          border: none;
          outline: none;
          font: inherit;
          color: inherit;
        }

        /* 购物车内 Promotion 区块：缩小标题字号，与 SubTotal 统一为 16px */
        .venue-booking-scope .pisell-lowcode__appointment-booking-voucher-container .voucher-title .voucher-title-left {
          font-size: 16px;
          font-weight: 600;
          line-height: 24px;
        }
        .venue-booking-scope .pisell-lowcode__appointment-booking-voucher-container .voucher-title .voucher-title-right {
          font-size: 14px;
          font-weight: 500;
        }

        /* 桌面端 embedded-footer 粘在侧边栏底部 */
        .venue-booking-scope .pisell-venue-booking-cart-embedded-footer {
          position: sticky;
          bottom: 0;
          z-index: 5;
          background: #fff;
          border-radius: 0 0 28px 28px;
        }
      `), /* @__PURE__ */ import_react.default.createElement("main", { className: "mx-auto max-w-[1500px] md:px-6 md:pt-6 lg:pb-12 h-full overscroll-none" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "space-y-2 md:space-y-4", style: { minHeight: "100%" } }, /* @__PURE__ */ import_react.default.createElement("div", { ref: stepHeaderRef, className: "sticky top-0 z-40" }, /* @__PURE__ */ import_react.default.createElement(import_Header.default, null)), /* @__PURE__ */ import_react.default.createElement("div", { className: "grid max-w-full gap-2 md:gap-4 lg:grid-cols-[minmax(0,1fr)_390px] xl:grid-cols-[minmax(0,1fr)_420px]" }, /* @__PURE__ */ import_react.default.createElement("section", { className: "min-w-0 space-y-3 overscroll-none md:space-y-5" }, stepRegistry[currentStep]), /* @__PURE__ */ import_react.default.createElement(
    "aside",
    {
      className: "hidden lg:block sticky self-start z-10 rounded-[28px] bg-white shadow-[0_10px_40px_rgba(20,20,20,0.06)] ring-1 ring-black/6",
      style: { top: "calc(var(--vb-grid-sticky-top, 0px) + 1.5rem)" }
    },
    /* @__PURE__ */ import_react.default.createElement(
      import_Cart.default,
      {
        embedded: true,
        open: true,
        items: viewModel.cartItems,
        summary: viewModel.summary,
        onCancel: () => {
        },
        onNext: handlePrimaryAction,
        confirmLoading: isSubmittingOrder
      }
    )
  ))), /* @__PURE__ */ import_react.default.createElement("div", { className: "sticky bottom-0 z-50 block lg:hidden" }, /* @__PURE__ */ import_react.default.createElement(import_Footer.default, null))));
}
