@bowlos/reservations 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/HEADLESS.md +205 -6
  2. package/README.md +24 -10
  3. package/dist/account-CO8xzUs_.d.ts +54 -0
  4. package/dist/account-SqT7et4C.d.cts +54 -0
  5. package/dist/catalog-BxyPJdBL.d.ts +160 -0
  6. package/dist/catalog-D1VoVaNe.d.cts +160 -0
  7. package/dist/{chunk-3GAXATYP.js → chunk-FV6SROO2.js} +22 -4
  8. package/dist/chunk-FV6SROO2.js.map +1 -0
  9. package/dist/{chunk-32FTBLXQ.js → chunk-S5T4OCBY.js} +25 -3
  10. package/dist/chunk-S5T4OCBY.js.map +1 -0
  11. package/dist/components.cjs +32 -91
  12. package/dist/components.cjs.map +1 -1
  13. package/dist/components.d.cts +36 -57
  14. package/dist/components.d.ts +36 -57
  15. package/dist/components.js +32 -79
  16. package/dist/components.js.map +1 -1
  17. package/dist/{data-ymW_rWbz.d.cts → data-BKlgn8Ln.d.cts} +72 -1
  18. package/dist/{data-ymW_rWbz.d.ts → data-BKlgn8Ln.d.ts} +72 -1
  19. package/dist/index.cjs +45 -0
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +4 -4
  22. package/dist/index.d.ts +4 -4
  23. package/dist/index.js +18 -3
  24. package/dist/index.js.map +1 -1
  25. package/dist/payments.d.cts +1 -1
  26. package/dist/payments.d.ts +1 -1
  27. package/dist/{react-Bh0z-Lnb.d.ts → react-B1uSOozS.d.ts} +2 -2
  28. package/dist/{react-DHvo_ZHf.d.cts → react-Bc_6yi9q.d.cts} +2 -2
  29. package/dist/react.cjs +73 -0
  30. package/dist/react.cjs.map +1 -1
  31. package/dist/react.d.cts +36 -6
  32. package/dist/react.d.ts +36 -6
  33. package/dist/react.js +37 -4
  34. package/dist/react.js.map +1 -1
  35. package/package.json +2 -2
  36. package/templates/center-site/package.json +1 -1
  37. package/dist/catalog-BGPCoIOm.d.ts +0 -93
  38. package/dist/catalog-eofYl46p.d.cts +0 -93
  39. package/dist/chunk-32FTBLXQ.js.map +0 -1
  40. package/dist/chunk-3GAXATYP.js.map +0 -1
  41. package/dist/errors-IIK7xibp.d.cts +0 -54
  42. package/dist/errors-IIK7xibp.d.ts +0 -54
@@ -1,8 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
- import { N as PricingMode, J as PaymentIntentInfo, l as Customer } from './data-ymW_rWbz.cjs';
4
- import { c as UseAccountResult } from './react-DHvo_ZHf.cjs';
5
- import './errors-IIK7xibp.cjs';
3
+ import { U as PricingMode, S as PaymentIntentInfo, l as Customer } from './data-BKlgn8Ln.cjs';
4
+ import { c as UseAccountResult } from './react-Bc_6yi9q.cjs';
5
+ import { g as CatalogItem } from './catalog-D1VoVaNe.cjs';
6
+ export { h as CatalogResult, i as CatalogSection } from './catalog-D1VoVaNe.cjs';
6
7
 
7
8
  /**
8
9
  * Themeable design tokens for the `@bowlos/reservations/components` layer.
@@ -423,75 +424,53 @@ interface FlashSaleIndexProps {
423
424
  */
424
425
  declare function FlashSaleIndex({ brandId, onOpen, labels, className }: FlashSaleIndexProps): react_jsx_runtime.JSX.Element;
425
426
 
426
- /** A selectable offer, tagged by kind so the consumer can route it. */
427
- type CatalogOffer = {
428
- kind: "product";
429
- id: string;
430
- name: string;
431
- attractionName: string;
432
- attractionTypeKey: string;
433
- durationMinutes: number;
434
- pricingMode: string;
435
- } | {
436
- kind: "event";
437
- id: string;
438
- name: string;
439
- date: string;
440
- description: string | null;
441
- } | {
442
- kind: "package";
443
- id: string;
444
- name: string;
445
- priceCents: number;
446
- description: string | null;
447
- } | {
448
- kind: "membership";
449
- id: string;
450
- name: string;
451
- priceCents: number;
452
- description: string | null;
453
- } | {
454
- kind: "gamecard";
455
- id: string;
456
- name: string;
457
- priceCents: number;
458
- description: string | null;
459
- };
427
+ /**
428
+ * v0.22.0 (BREAKING): `<BookingCatalog>` is now built on the canonical
429
+ * visibility-aware catalog read (`useCatalog` / `listPublicCatalog`) — the
430
+ * same read the white-label web and mobile surfaces consume — so the Center
431
+ * admin's per-surface visibility toggles finally apply to the drop-in.
432
+ *
433
+ * `onSelect` now receives a `CatalogItem` (route by `item.action.type` with
434
+ * the IDs in `item.action.payload`) instead of the old per-kind
435
+ * `CatalogOffer` union. See HEADLESS.md → "The canonical catalog" for the
436
+ * routing table; the drop-in and a headless site now route identically.
437
+ */
460
438
  interface BookingCatalogLabels {
461
439
  heading: string;
462
440
  loading: string;
463
441
  empty: string;
464
- bowling: string;
465
- otherAttractions: string;
466
- events: string;
467
- packages: string;
468
- memberships: string;
469
- gamePasses: string;
470
442
  select: string;
471
- minutesAbbrev: string;
472
- perMonth: string;
473
443
  }
474
444
  interface BookingCatalogProps {
475
- /** Brand (packages + game passes) and Center (products + events + memberships). */
476
445
  brandId: string;
477
446
  centerId: string;
478
447
  /**
479
- * Called when a customer picks an offer. Route by `offer.kind`: a `product`
480
- * or `event` → your `<BookingFlow>` (preset the event's date); a `package` /
481
- * `membership` / `gamecard` → its buy page.
448
+ * The surface whose admin visibility rules apply. Defaults to
449
+ * "sdk_custom_site" (a center's own SDK-built site).
450
+ */
451
+ surface?: "sdk_custom_site" | "white_label_web" | "mobile_app";
452
+ /**
453
+ * Called when a customer picks an item. Route by `item.action.type`:
454
+ * `book_reservation` → your `<BookingFlow>` (payload.productId);
455
+ * `view_event` / `buy_ticket` → the event landing by payload.slug;
456
+ * `buy_package` / `buy_membership` / `buy_game_pass` → that buy flow
457
+ * (payload.packageId / templateId).
482
458
  */
483
- onSelect: (offer: CatalogOffer) => void;
459
+ onSelect: (item: CatalogItem) => void;
484
460
  labels?: Partial<BookingCatalogLabels>;
461
+ /** Override a section heading by its category key (backend labels are
462
+ * the default), e.g. `{ game_passes: "Punch cards" }`. */
463
+ sectionLabels?: Partial<Record<string, string>>;
485
464
  className?: string;
486
465
  }
487
466
  /**
488
- * The categorized catalog of everything a Center sells online — Bowling, Other
489
- * attractions, Events, Packages, Memberships, Game passes — each offer under its
490
- * heading. Picking one hands off via `onSelect`. No prices cross the wire for
491
- * gated surfaces; this only lists public offers. Must render inside a
492
- * `<BowlosProvider>`; theme with `<BowlosTheme>`.
467
+ * The categorized catalog of everything a Center sells online, exactly as the
468
+ * Center admin's Public Catalog page configured it for this surface. Picking
469
+ * an item hands off via `onSelect`. Indicative prices only (`priceLabel`);
470
+ * binding prices come from the per-category previews after login. Must render
471
+ * inside a `<BowlosProvider>`; theme with `<BowlosTheme>`.
493
472
  */
494
- declare function BookingCatalog({ brandId, centerId, onSelect, labels, className }: BookingCatalogProps): react_jsx_runtime.JSX.Element;
473
+ declare function BookingCatalog({ brandId, centerId, surface, onSelect, labels, sectionLabels, className, }: BookingCatalogProps): react_jsx_runtime.JSX.Element;
495
474
 
496
475
  /**
497
476
  * Shared primitives for the `@bowlos/reservations/components` layer.
@@ -508,4 +487,4 @@ declare function formatCents(cents: number): string;
508
487
  /** A min–max money range, collapsing to one value when they're equal. */
509
488
  declare function formatCentsRange(minCents: number, maxCents: number): string;
510
489
 
511
- export { AccountDashboard, type AccountDashboardLabels, type AccountDashboardProps, AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AccountSection, AuthForm, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateRenderContext, BOWLOS_DEFAULT_THEME, BookingCatalog, type BookingCatalogLabels, type BookingCatalogProps, BookingFlow, type BookingFlowLabels, type BookingFlowProps, BowlosTheme, type BowlosThemeTokens, type CatalogOffer, type FlashBrand, FlashSale, FlashSaleIndex, type FlashSaleIndexItem, type FlashSaleIndexLabels, type FlashSaleIndexProps, type FlashSaleIndexView, type FlashSaleItem, type FlashSaleLabels, type FlashSaleProps, type FlashSaleView, type MyCreditEntry, type MyCredits, type MyLoyalty, type MyMembershipSummary, type MyPass, type MyReservationSummary, formatCents, formatCentsRange };
490
+ export { AccountDashboard, type AccountDashboardLabels, type AccountDashboardProps, AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AccountSection, AuthForm, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateRenderContext, BOWLOS_DEFAULT_THEME, BookingCatalog, type BookingCatalogLabels, type BookingCatalogProps, BookingFlow, type BookingFlowLabels, type BookingFlowProps, BowlosTheme, type BowlosThemeTokens, CatalogItem, type FlashBrand, FlashSale, FlashSaleIndex, type FlashSaleIndexItem, type FlashSaleIndexLabels, type FlashSaleIndexProps, type FlashSaleIndexView, type FlashSaleItem, type FlashSaleLabels, type FlashSaleProps, type FlashSaleView, type MyCreditEntry, type MyCredits, type MyLoyalty, type MyMembershipSummary, type MyPass, type MyReservationSummary, formatCents, formatCentsRange };
@@ -1,8 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
- import { N as PricingMode, J as PaymentIntentInfo, l as Customer } from './data-ymW_rWbz.js';
4
- import { c as UseAccountResult } from './react-Bh0z-Lnb.js';
5
- import './errors-IIK7xibp.js';
3
+ import { U as PricingMode, S as PaymentIntentInfo, l as Customer } from './data-BKlgn8Ln.js';
4
+ import { c as UseAccountResult } from './react-B1uSOozS.js';
5
+ import { g as CatalogItem } from './catalog-BxyPJdBL.js';
6
+ export { h as CatalogResult, i as CatalogSection } from './catalog-BxyPJdBL.js';
6
7
 
7
8
  /**
8
9
  * Themeable design tokens for the `@bowlos/reservations/components` layer.
@@ -423,75 +424,53 @@ interface FlashSaleIndexProps {
423
424
  */
424
425
  declare function FlashSaleIndex({ brandId, onOpen, labels, className }: FlashSaleIndexProps): react_jsx_runtime.JSX.Element;
425
426
 
426
- /** A selectable offer, tagged by kind so the consumer can route it. */
427
- type CatalogOffer = {
428
- kind: "product";
429
- id: string;
430
- name: string;
431
- attractionName: string;
432
- attractionTypeKey: string;
433
- durationMinutes: number;
434
- pricingMode: string;
435
- } | {
436
- kind: "event";
437
- id: string;
438
- name: string;
439
- date: string;
440
- description: string | null;
441
- } | {
442
- kind: "package";
443
- id: string;
444
- name: string;
445
- priceCents: number;
446
- description: string | null;
447
- } | {
448
- kind: "membership";
449
- id: string;
450
- name: string;
451
- priceCents: number;
452
- description: string | null;
453
- } | {
454
- kind: "gamecard";
455
- id: string;
456
- name: string;
457
- priceCents: number;
458
- description: string | null;
459
- };
427
+ /**
428
+ * v0.22.0 (BREAKING): `<BookingCatalog>` is now built on the canonical
429
+ * visibility-aware catalog read (`useCatalog` / `listPublicCatalog`) — the
430
+ * same read the white-label web and mobile surfaces consume — so the Center
431
+ * admin's per-surface visibility toggles finally apply to the drop-in.
432
+ *
433
+ * `onSelect` now receives a `CatalogItem` (route by `item.action.type` with
434
+ * the IDs in `item.action.payload`) instead of the old per-kind
435
+ * `CatalogOffer` union. See HEADLESS.md → "The canonical catalog" for the
436
+ * routing table; the drop-in and a headless site now route identically.
437
+ */
460
438
  interface BookingCatalogLabels {
461
439
  heading: string;
462
440
  loading: string;
463
441
  empty: string;
464
- bowling: string;
465
- otherAttractions: string;
466
- events: string;
467
- packages: string;
468
- memberships: string;
469
- gamePasses: string;
470
442
  select: string;
471
- minutesAbbrev: string;
472
- perMonth: string;
473
443
  }
474
444
  interface BookingCatalogProps {
475
- /** Brand (packages + game passes) and Center (products + events + memberships). */
476
445
  brandId: string;
477
446
  centerId: string;
478
447
  /**
479
- * Called when a customer picks an offer. Route by `offer.kind`: a `product`
480
- * or `event` → your `<BookingFlow>` (preset the event's date); a `package` /
481
- * `membership` / `gamecard` → its buy page.
448
+ * The surface whose admin visibility rules apply. Defaults to
449
+ * "sdk_custom_site" (a center's own SDK-built site).
450
+ */
451
+ surface?: "sdk_custom_site" | "white_label_web" | "mobile_app";
452
+ /**
453
+ * Called when a customer picks an item. Route by `item.action.type`:
454
+ * `book_reservation` → your `<BookingFlow>` (payload.productId);
455
+ * `view_event` / `buy_ticket` → the event landing by payload.slug;
456
+ * `buy_package` / `buy_membership` / `buy_game_pass` → that buy flow
457
+ * (payload.packageId / templateId).
482
458
  */
483
- onSelect: (offer: CatalogOffer) => void;
459
+ onSelect: (item: CatalogItem) => void;
484
460
  labels?: Partial<BookingCatalogLabels>;
461
+ /** Override a section heading by its category key (backend labels are
462
+ * the default), e.g. `{ game_passes: "Punch cards" }`. */
463
+ sectionLabels?: Partial<Record<string, string>>;
485
464
  className?: string;
486
465
  }
487
466
  /**
488
- * The categorized catalog of everything a Center sells online — Bowling, Other
489
- * attractions, Events, Packages, Memberships, Game passes — each offer under its
490
- * heading. Picking one hands off via `onSelect`. No prices cross the wire for
491
- * gated surfaces; this only lists public offers. Must render inside a
492
- * `<BowlosProvider>`; theme with `<BowlosTheme>`.
467
+ * The categorized catalog of everything a Center sells online, exactly as the
468
+ * Center admin's Public Catalog page configured it for this surface. Picking
469
+ * an item hands off via `onSelect`. Indicative prices only (`priceLabel`);
470
+ * binding prices come from the per-category previews after login. Must render
471
+ * inside a `<BowlosProvider>`; theme with `<BowlosTheme>`.
493
472
  */
494
- declare function BookingCatalog({ brandId, centerId, onSelect, labels, className }: BookingCatalogProps): react_jsx_runtime.JSX.Element;
473
+ declare function BookingCatalog({ brandId, centerId, surface, onSelect, labels, sectionLabels, className, }: BookingCatalogProps): react_jsx_runtime.JSX.Element;
495
474
 
496
475
  /**
497
476
  * Shared primitives for the `@bowlos/reservations/components` layer.
@@ -508,4 +487,4 @@ declare function formatCents(cents: number): string;
508
487
  /** A min–max money range, collapsing to one value when they're equal. */
509
488
  declare function formatCentsRange(minCents: number, maxCents: number): string;
510
489
 
511
- export { AccountDashboard, type AccountDashboardLabels, type AccountDashboardProps, AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AccountSection, AuthForm, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateRenderContext, BOWLOS_DEFAULT_THEME, BookingCatalog, type BookingCatalogLabels, type BookingCatalogProps, BookingFlow, type BookingFlowLabels, type BookingFlowProps, BowlosTheme, type BowlosThemeTokens, type CatalogOffer, type FlashBrand, FlashSale, FlashSaleIndex, type FlashSaleIndexItem, type FlashSaleIndexLabels, type FlashSaleIndexProps, type FlashSaleIndexView, type FlashSaleItem, type FlashSaleLabels, type FlashSaleProps, type FlashSaleView, type MyCreditEntry, type MyCredits, type MyLoyalty, type MyMembershipSummary, type MyPass, type MyReservationSummary, formatCents, formatCentsRange };
490
+ export { AccountDashboard, type AccountDashboardLabels, type AccountDashboardProps, AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AccountSection, AuthForm, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateRenderContext, BOWLOS_DEFAULT_THEME, BookingCatalog, type BookingCatalogLabels, type BookingCatalogProps, BookingFlow, type BookingFlowLabels, type BookingFlowProps, BowlosTheme, type BowlosThemeTokens, CatalogItem, type FlashBrand, FlashSale, FlashSaleIndex, type FlashSaleIndexItem, type FlashSaleIndexLabels, type FlashSaleIndexProps, type FlashSaleIndexView, type FlashSaleItem, type FlashSaleLabels, type FlashSaleProps, type FlashSaleView, type MyCreditEntry, type MyCredits, type MyLoyalty, type MyMembershipSummary, type MyPass, type MyReservationSummary, formatCents, formatCentsRange };
@@ -1,5 +1,5 @@
1
- import { useAccount, useAvailability, useBookingPreview, useAddons, useStartTimes, useBookingFlow, useMyReservations, useMyMemberships, useMyLoyalty, useMyCredits, useMyPasses, useFlashSale, useFlashSales, useProducts, useEvents, usePackages, usePublicMemberships, useGameCards } from './chunk-3GAXATYP.js';
2
- import { availableUnitCount } from './chunk-32FTBLXQ.js';
1
+ import { useAccount, useAvailability, useBookingPreview, useAddons, useStartTimes, useBookingFlow, useMyReservations, useMyMemberships, useMyLoyalty, useMyCredits, useMyPasses, useFlashSale, useFlashSales, useCatalog } from './chunk-FV6SROO2.js';
2
+ import { availableUnitCount } from './chunk-S5T4OCBY.js';
3
3
  import { styles, formatCents, formatMinuteLabel, token, minutesToTime, useCountdown, formatCentsRange } from './chunk-Y3YSDO3H.js';
4
4
  export { BOWLOS_DEFAULT_THEME, BowlosTheme, formatCents, formatCentsRange } from './chunk-Y3YSDO3H.js';
5
5
  import { useState, useEffect, useMemo, useRef } from 'react';
@@ -827,100 +827,53 @@ var DEFAULT_LABELS7 = {
827
827
  heading: "What would you like to book?",
828
828
  loading: "Loading\u2026",
829
829
  empty: "Nothing is available to book online right now.",
830
- bowling: "Bowling",
831
- otherAttractions: "Other attractions",
832
- events: "Events",
833
- packages: "Packages",
834
- memberships: "Memberships",
835
- gamePasses: "Game passes",
836
- select: "Select",
837
- minutesAbbrev: "min",
838
- perMonth: "/mo"
830
+ select: "Select"
839
831
  };
840
- function BookingCatalog({ brandId, centerId, onSelect, labels, className }) {
832
+ function BookingCatalog({
833
+ brandId,
834
+ centerId,
835
+ surface = "sdk_custom_site",
836
+ onSelect,
837
+ labels,
838
+ sectionLabels,
839
+ className
840
+ }) {
841
841
  const t = { ...DEFAULT_LABELS7, ...labels };
842
842
  const s = styles();
843
- const products = useProducts({ centerId });
844
- const events = useEvents({ centerId });
845
- const packages = usePackages({ brandId, centerId });
846
- const memberships = usePublicMemberships({ centerId });
847
- const gameCards = useGameCards({ brandId, centerId });
848
- const reads = [products, events, packages, memberships, gameCards];
849
- const anyLoading = reads.some((r) => r.loading && !r.data);
850
- const productRows = products.data ?? [];
851
- const bowling = productRows.filter((p) => p.attractionTypeKey === "bowling").map((p) => ({ kind: "product", ...p }));
852
- const other = productRows.filter((p) => p.attractionTypeKey !== "bowling").map((p) => ({ kind: "product", ...p }));
853
- const eventOffers = (events.data ?? []).map((e) => ({
854
- kind: "event",
855
- id: e.id,
856
- name: e.name,
857
- date: e.date,
858
- description: e.description
859
- }));
860
- const packageOffers = (packages.data ?? []).map((p) => ({
861
- kind: "package",
862
- id: p.id,
863
- name: p.name,
864
- priceCents: p.basePriceCents,
865
- description: p.description
866
- }));
867
- const membershipOffers = (memberships.data ?? []).map((m) => ({
868
- kind: "membership",
869
- id: m.id,
870
- name: m.name,
871
- priceCents: m.recurringPriceCents,
872
- description: m.description
873
- }));
874
- const gameCardOffers = (gameCards.data ?? []).map((g) => ({
875
- kind: "gamecard",
876
- id: g.id,
877
- name: g.name,
878
- priceCents: g.priceCents,
879
- description: g.description
880
- }));
881
- const sections = [
882
- { title: t.bowling, offers: bowling },
883
- { title: t.otherAttractions, offers: other },
884
- { title: t.events, offers: eventOffers },
885
- { title: t.packages, offers: packageOffers },
886
- { title: t.memberships, offers: membershipOffers },
887
- { title: t.gamePasses, offers: gameCardOffers }
888
- ].filter((sec) => sec.offers.length > 0);
843
+ const catalog = useCatalog({ brandId, centerId, surface });
844
+ const sections = (catalog.data?.sections ?? []).filter(
845
+ (sec) => sec.items.length > 0
846
+ );
889
847
  let body;
890
- if (anyLoading) {
848
+ if (catalog.loading && !catalog.data) {
891
849
  body = /* @__PURE__ */ jsx("p", { style: s.muted, children: t.loading });
892
850
  } else if (sections.length === 0) {
893
851
  body = /* @__PURE__ */ jsx("p", { style: s.muted, children: t.empty });
894
852
  } else {
895
853
  body = sections.map((sec) => /* @__PURE__ */ jsxs("section", { style: { marginTop: "0.5rem" }, children: [
896
- /* @__PURE__ */ jsx("h4", { style: s.sectionTitle, children: sec.title }),
897
- sec.offers.map((offer) => /* @__PURE__ */ jsxs("div", { style: s.listItem, children: [
854
+ /* @__PURE__ */ jsx("h4", { style: s.sectionTitle, children: sectionLabels?.[sec.key] ?? sec.label }),
855
+ sec.items.map((item) => /* @__PURE__ */ jsxs("div", { style: s.listItem, children: [
898
856
  /* @__PURE__ */ jsxs("div", { children: [
899
- /* @__PURE__ */ jsx("p", { style: s.listTitle, children: offer.name }),
900
- /* @__PURE__ */ jsx("p", { style: s.listMeta, children: subtitle(offer, t) })
857
+ /* @__PURE__ */ jsx("p", { style: s.listTitle, children: item.title }),
858
+ /* @__PURE__ */ jsx("p", { style: s.listMeta, children: item.priceLabel ?? item.subtitle ?? "" })
901
859
  ] }),
902
- /* @__PURE__ */ jsx("button", { type: "button", style: s.primaryBtn, onClick: () => onSelect(offer), children: t.select })
903
- ] }, `${offer.kind}:${offer.id}`))
904
- ] }, sec.title));
860
+ /* @__PURE__ */ jsx(
861
+ "button",
862
+ {
863
+ type: "button",
864
+ style: s.primaryBtn,
865
+ onClick: () => onSelect(item),
866
+ children: t.select
867
+ }
868
+ )
869
+ ] }, item.id))
870
+ ] }, sec.key));
905
871
  }
906
872
  return /* @__PURE__ */ jsxs("div", { className, style: s.card, children: [
907
873
  /* @__PURE__ */ jsx("h3", { style: s.heading, children: t.heading }),
908
874
  body
909
875
  ] });
910
876
  }
911
- function subtitle(offer, t) {
912
- switch (offer.kind) {
913
- case "product":
914
- return `${offer.attractionName} \xB7 ${offer.durationMinutes} ${t.minutesAbbrev}`;
915
- case "event":
916
- return offer.date;
917
- case "membership":
918
- return `${formatCents(offer.priceCents)}${t.perMonth}`;
919
- case "package":
920
- case "gamecard":
921
- return formatCents(offer.priceCents);
922
- }
923
- }
924
877
 
925
878
  export { AccountDashboard, AccountMenu, AuthForm, AuthGate, BookingCatalog, BookingFlow, FlashSale, FlashSaleIndex };
926
879
  //# sourceMappingURL=components.js.map