@bigz-app/booking-widget 1.4.0 → 1.4.1

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.
package/dist/index.cjs CHANGED
@@ -256,6 +256,7 @@ const de$1 = {
256
256
  "events.availableFrom": "Freie Plätze ab {{date}}",
257
257
  "events.noAvailableDates": "Keine Termine frei",
258
258
  "events.previewSectionTitle": "Specials & nächste Termine",
259
+ "events.seeMoreDates": "Weitere Termine ansehen...",
259
260
  // Event instances
260
261
  "instances.title": "Terminauswahl",
261
262
  "instances.noAvailable": "Keine verfügbaren Termine",
@@ -309,6 +310,10 @@ const de$1 = {
309
310
  "booking.maxSpotsReached": "Maximal {{count}} Plätze verfügbar.",
310
311
  "booking.comment": "Kommentar (optional)",
311
312
  "booking.commentPlaceholder": "Zusätzliche Anmerkungen zur Buchung...",
313
+ "booking.stepDate": "Termin",
314
+ "booking.stepUpsells": "Extras",
315
+ "booking.stepDetails": "Angaben",
316
+ "booking.stepPayment": "Zahlung",
312
317
  // Booking summary
313
318
  "summary.title": "Buchungszusammenfassung",
314
319
  "summary.subtotal": "Zwischensumme:",
@@ -441,6 +446,7 @@ const de$1 = {
441
446
  "upsells.selectedPlural": "{{count}} Extras ausgewählt",
442
447
  "upsells.savePercent": "{{percent}}% sparen",
443
448
  "booking.paymentUnavailable": "Online-Zahlung ist für diese Buchung nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
449
+ "booking.depositNotConfigured": "Online-Anzahlung ist für dieses Event nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
444
450
  "upsells.spotsFree": "{{count}} Plätze frei",
445
451
  "upsells.notAvailable": "Nicht verfügbar",
446
452
  "upsells.reason.outOfStock": "{{productName}} ist nicht auf Lager",
@@ -466,6 +472,9 @@ const de$1 = {
466
472
  "promo.giftCode": "Dein Geschenk-Code",
467
473
  "promo.copied": "Kopiert!",
468
474
  "promo.copy": "Kopieren",
475
+ "trust.securePayment": "Sichere Zahlung",
476
+ "trust.paypal": "PayPal",
477
+ "trust.stripe": "Stripe",
469
478
  };
470
479
 
471
480
  const en = {
@@ -536,6 +545,7 @@ const en = {
536
545
  "events.availableFrom": "Available from {{date}}",
537
546
  "events.noAvailableDates": "No dates available",
538
547
  "events.previewSectionTitle": "Specials & upcoming dates",
548
+ "events.seeMoreDates": "See more dates...",
539
549
  // Event instances
540
550
  "instances.title": "Select a date",
541
551
  "instances.noAvailable": "No available dates",
@@ -589,6 +599,10 @@ const en = {
589
599
  "booking.maxSpotsReached": "Maximum {{count}} spots available.",
590
600
  "booking.comment": "Comment (optional)",
591
601
  "booking.commentPlaceholder": "Additional notes for the booking...",
602
+ "booking.stepDate": "Date",
603
+ "booking.stepUpsells": "Extras",
604
+ "booking.stepDetails": "Details",
605
+ "booking.stepPayment": "Payment",
592
606
  // Booking summary
593
607
  "summary.title": "Booking Summary",
594
608
  "summary.subtotal": "Subtotal:",
@@ -721,6 +735,7 @@ const en = {
721
735
  "upsells.selectedPlural": "{{count}} extras selected",
722
736
  "upsells.savePercent": "Save {{percent}}%",
723
737
  "booking.paymentUnavailable": "Online payment is not available for this booking. Please contact us to complete your reservation.",
738
+ "booking.depositNotConfigured": "Online deposit payment is not available for this event. Please contact us to complete your reservation.",
724
739
  "upsells.spotsFree": "{{count}} spots available",
725
740
  "upsells.notAvailable": "Not available",
726
741
  "upsells.reason.outOfStock": "{{productName}} is out of stock",
@@ -746,6 +761,9 @@ const en = {
746
761
  "promo.giftCode": "Your gift code",
747
762
  "promo.copied": "Copied!",
748
763
  "promo.copy": "Copy",
764
+ "trust.securePayment": "Secure payment",
765
+ "trust.paypal": "PayPal",
766
+ "trust.stripe": "Stripe",
749
767
  };
750
768
 
751
769
  const es = {
@@ -816,6 +834,7 @@ const es = {
816
834
  "events.availableFrom": "Disponible desde {{date}}",
817
835
  "events.noAvailableDates": "Sin fechas disponibles",
818
836
  "events.previewSectionTitle": "Especiales & próximas fechas",
837
+ "events.seeMoreDates": "Ver más fechas...",
819
838
  // Event instances
820
839
  "instances.title": "Seleccionar fecha",
821
840
  "instances.noAvailable": "Sin fechas disponibles",
@@ -869,6 +888,10 @@ const es = {
869
888
  "booking.maxSpotsReached": "Máximo {{count}} plazas disponibles.",
870
889
  "booking.comment": "Comentario (opcional)",
871
890
  "booking.commentPlaceholder": "Notas adicionales para la reserva...",
891
+ "booking.stepDate": "Fecha",
892
+ "booking.stepUpsells": "Extras",
893
+ "booking.stepDetails": "Datos",
894
+ "booking.stepPayment": "Pago",
872
895
  // Booking summary
873
896
  "summary.title": "Resumen de la reserva",
874
897
  "summary.subtotal": "Subtotal:",
@@ -1001,6 +1024,7 @@ const es = {
1001
1024
  "upsells.selectedPlural": "{{count}} extras seleccionados",
1002
1025
  "upsells.savePercent": "Ahorra {{percent}}%",
1003
1026
  "booking.paymentUnavailable": "El pago en línea no está disponible para esta reserva. Contáctanos para completarla.",
1027
+ "booking.depositNotConfigured": "El pago de depósito en línea no está disponible para este evento. Contáctanos para completar la reserva.",
1004
1028
  "upsells.spotsFree": "{{count}} plazas disponibles",
1005
1029
  "upsells.notAvailable": "No disponible",
1006
1030
  "upsells.reason.outOfStock": "{{productName}} está agotado",
@@ -1026,6 +1050,9 @@ const es = {
1026
1050
  "promo.giftCode": "Tu codigo de regalo",
1027
1051
  "promo.copied": "Copiado!",
1028
1052
  "promo.copy": "Copiar",
1053
+ "trust.securePayment": "Pago seguro",
1054
+ "trust.paypal": "PayPal",
1055
+ "trust.stripe": "Stripe",
1029
1056
  };
1030
1057
 
1031
1058
  const pt = {
@@ -1096,6 +1123,7 @@ const pt = {
1096
1123
  "events.availableFrom": "Disponível a partir de {{date}}",
1097
1124
  "events.noAvailableDates": "Sem datas disponíveis",
1098
1125
  "events.previewSectionTitle": "Especiais & próximas datas",
1126
+ "events.seeMoreDates": "Ver mais datas...",
1099
1127
  // Event instances
1100
1128
  "instances.title": "Selecionar data",
1101
1129
  "instances.noAvailable": "Sem datas disponíveis",
@@ -1149,6 +1177,10 @@ const pt = {
1149
1177
  "booking.maxSpotsReached": "Máximo {{count}} lugares disponíveis.",
1150
1178
  "booking.comment": "Comentário (opcional)",
1151
1179
  "booking.commentPlaceholder": "Notas adicionais para a reserva...",
1180
+ "booking.stepDate": "Data",
1181
+ "booking.stepUpsells": "Extras",
1182
+ "booking.stepDetails": "Dados",
1183
+ "booking.stepPayment": "Pagamento",
1152
1184
  // Booking summary
1153
1185
  "summary.title": "Resumo da reserva",
1154
1186
  "summary.subtotal": "Subtotal:",
@@ -1281,6 +1313,7 @@ const pt = {
1281
1313
  "upsells.selectedPlural": "{{count}} extras selecionados",
1282
1314
  "upsells.savePercent": "Poupa {{percent}}%",
1283
1315
  "booking.paymentUnavailable": "O pagamento online não está disponível para esta reserva. Contacta-nos para concluir a reserva.",
1316
+ "booking.depositNotConfigured": "O pagamento de depósito online não está disponível para este evento. Contacta-nos para concluir a reserva.",
1284
1317
  "upsells.spotsFree": "{{count}} lugares disponíveis",
1285
1318
  "upsells.notAvailable": "Não disponível",
1286
1319
  "upsells.reason.outOfStock": "{{productName}} está esgotado",
@@ -1306,6 +1339,9 @@ const pt = {
1306
1339
  "promo.giftCode": "O teu codigo de oferta",
1307
1340
  "promo.copied": "Copiado!",
1308
1341
  "promo.copy": "Copiar",
1342
+ "trust.securePayment": "Pagamento seguro",
1343
+ "trust.paypal": "PayPal",
1344
+ "trust.stripe": "Stripe",
1309
1345
  };
1310
1346
 
1311
1347
  const sv = {
@@ -1376,6 +1412,7 @@ const sv = {
1376
1412
  "events.availableFrom": "Lediga platser från {{date}}",
1377
1413
  "events.noAvailableDates": "Inga datum lediga",
1378
1414
  "events.previewSectionTitle": "Specials & kommande datum",
1415
+ "events.seeMoreDates": "Se fler datum...",
1379
1416
  // Event instances
1380
1417
  "instances.title": "Välj datum",
1381
1418
  "instances.noAvailable": "Inga tillgängliga datum",
@@ -1429,6 +1466,10 @@ const sv = {
1429
1466
  "booking.maxSpotsReached": "Maximalt {{count}} platser tillgängliga.",
1430
1467
  "booking.comment": "Kommentar (valfritt)",
1431
1468
  "booking.commentPlaceholder": "Ytterligare anteckningar för bokningen...",
1469
+ "booking.stepDate": "Datum",
1470
+ "booking.stepUpsells": "Tillägg",
1471
+ "booking.stepDetails": "Uppgifter",
1472
+ "booking.stepPayment": "Betalning",
1432
1473
  // Booking summary
1433
1474
  "summary.title": "Bokningssammanfattning",
1434
1475
  "summary.subtotal": "Delsumma:",
@@ -1561,6 +1602,7 @@ const sv = {
1561
1602
  "upsells.selectedPlural": "{{count}} tillägg valda",
1562
1603
  "upsells.savePercent": "Spara {{percent}}%",
1563
1604
  "booking.paymentUnavailable": "Onlinebetalning är inte tillgänglig för denna bokning. Kontakta oss för att slutföra bokningen.",
1605
+ "booking.depositNotConfigured": "Online deposition är inte tillgänglig för detta evenemang. Kontakta oss för att slutföra bokningen.",
1564
1606
  "upsells.spotsFree": "{{count}} platser lediga",
1565
1607
  "upsells.notAvailable": "Inte tillgängligt",
1566
1608
  "upsells.reason.outOfStock": "{{productName}} är slut i lager",
@@ -1586,6 +1628,9 @@ const sv = {
1586
1628
  "promo.giftCode": "Din presentkod",
1587
1629
  "promo.copied": "Kopierad!",
1588
1630
  "promo.copy": "Kopiera",
1631
+ "trust.securePayment": "Säker betalning",
1632
+ "trust.paypal": "PayPal",
1633
+ "trust.stripe": "Stripe",
1589
1634
  };
1590
1635
 
1591
1636
  const SUPPORTED_LOCALES = ["de", "en", "es", "sv", "pt"];
@@ -7284,6 +7329,55 @@ function Accordion({ title, priceInfo, children, isOpen, onToggle, }) {
7284
7329
  }, children: children }))] }));
7285
7330
  }
7286
7331
 
7332
+ function FlowProgress({ currentStep, hasUpsellsStep }) {
7333
+ const t = useTranslations();
7334
+ const steps = hasUpsellsStep
7335
+ ? [
7336
+ { key: "date", label: t("booking.stepDate") },
7337
+ { key: "upsells", label: t("booking.stepUpsells") },
7338
+ { key: "details", label: t("booking.stepDetails") },
7339
+ { key: "payment", label: t("booking.stepPayment") },
7340
+ ]
7341
+ : [
7342
+ { key: "date", label: t("booking.stepDate") },
7343
+ { key: "details", label: t("booking.stepDetails") },
7344
+ { key: "payment", label: t("booking.stepPayment") },
7345
+ ];
7346
+ const activeIndex = Math.max(steps.findIndex((step) => step.key === currentStep), 0);
7347
+ const progressPercent = steps.length > 1 ? (activeIndex / (steps.length - 1)) * 100 : 100;
7348
+ return (jsxRuntime.jsxs("div", { style: {
7349
+ backgroundColor: "var(--bw-surface-color)",
7350
+ border: "1px solid var(--bw-border-color)",
7351
+ borderRadius: "var(--bw-border-radius)",
7352
+ padding: "12px 14px",
7353
+ marginBottom: "16px",
7354
+ }, children: [jsxRuntime.jsx("div", { style: {
7355
+ display: "flex",
7356
+ justifyContent: "space-between",
7357
+ alignItems: "center",
7358
+ marginBottom: "10px",
7359
+ fontFamily: "var(--bw-font-family)",
7360
+ gap: "8px",
7361
+ }, children: steps.map((step, index) => (jsxRuntime.jsxs("span", { style: {
7362
+ fontSize: "12px",
7363
+ fontWeight: 700,
7364
+ color: index <= activeIndex ? "var(--bw-highlight-color)" : "var(--bw-text-muted)",
7365
+ whiteSpace: "nowrap",
7366
+ }, children: [index + 1, ". ", step.label] }, step.key))) }), jsxRuntime.jsx("div", { style: {
7367
+ width: "100%",
7368
+ height: "8px",
7369
+ borderRadius: "999px",
7370
+ backgroundColor: "var(--bw-background-color)",
7371
+ border: "1px solid var(--bw-border-color)",
7372
+ overflow: "hidden",
7373
+ }, children: jsxRuntime.jsx("div", { style: {
7374
+ width: `${progressPercent}%`,
7375
+ height: "100%",
7376
+ backgroundColor: "var(--bw-highlight-color)",
7377
+ transition: "width 0.25s ease",
7378
+ } }) })] }));
7379
+ }
7380
+
7287
7381
  // Spinner icon (kept local as it has animation style)
7288
7382
  const IconSpinner = ({ size = 16, color = "currentColor" }) => (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { animation: "spin 1s linear infinite" }, children: jsxRuntime.jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }));
7289
7383
  function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVoucherValidated, appliedVouchers, onRemoveVoucher, disabled = false, }) {
@@ -11498,6 +11592,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11498
11592
  const { locale } = useLocale();
11499
11593
  const timezone = useTimezone();
11500
11594
  const roundEnabled = systemConfig?.roundPricesEnabled !== false;
11595
+ const widgetPaymentMode = systemConfig?.widgetPaymentMode ?? "all";
11501
11596
  const participantFieldsConfig = eventDetails.participantFieldsConfig ?? DEFAULT_PARTICIPANT_FIELDS_CONFIG;
11502
11597
  const participantLevelOptions = eventDetails.participantLevelOptions ?? ["beginner", "advanced"];
11503
11598
  const roundDiscountUp = (minorUnits) => Math.ceil(minorUnits / 100) * 100;
@@ -11511,6 +11606,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11511
11606
  const [paymentOption, setPaymentOption] = React.useState(() => persistedState?.paymentOption ?? "deposit");
11512
11607
  // Per-participant upsell selections: participantIndex -> array of upsell package IDs
11513
11608
  const [participantUpsells, setParticipantUpsells] = React.useState(() => persistedState?.participantUpsells ?? {});
11609
+ const [showPaymentValidationHint, setShowPaymentValidationHint] = React.useState(false);
11514
11610
  const wasOpenRef = React.useRef(false);
11515
11611
  const form = useForm({
11516
11612
  resolver: t(createBookingFormSchema(t$1, participantFieldsConfig)),
@@ -11634,12 +11730,22 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11634
11730
  const totalDiscount = calculateTotalDiscount();
11635
11731
  const totalAmount = calculateTotal();
11636
11732
  const depositAmount = calculateDeposit();
11637
- // Deposit stays fixed unless the discounted total is lower than the deposit
11638
- // (discount applies to total price, not to the deposit itself)
11639
- const hasDepositOption = depositAmount > 0 && depositAmount < totalAmount;
11640
- const paymentAmount = hasDepositOption && paymentOption === "deposit"
11641
- ? Math.min(depositAmount, totalAmount)
11642
- : totalAmount;
11733
+ const allowsDepositInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "deposits_only";
11734
+ const allowsFullInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "full_only";
11735
+ const hasConfiguredDeposit = depositAmount > 0;
11736
+ const hasDepositChoice = allowsDepositInWidget && hasConfiguredDeposit && depositAmount < totalAmount;
11737
+ const depositsOnlyBlocked = widgetPaymentMode === "deposits_only" && !hasConfiguredDeposit;
11738
+ React.useEffect(() => {
11739
+ if (widgetPaymentMode === "deposits_only") {
11740
+ setPaymentOption("deposit");
11741
+ }
11742
+ else if (widgetPaymentMode === "full_only") {
11743
+ setPaymentOption("full");
11744
+ }
11745
+ }, [widgetPaymentMode]);
11746
+ const paymentAmount = allowsFullInWidget && (!hasDepositChoice || paymentOption === "full" || !allowsDepositInWidget)
11747
+ ? totalAmount
11748
+ : Math.min(depositAmount, totalAmount);
11643
11749
  // Convert per-participant upsells to UpsellSelection[] format for API
11644
11750
  // Includes participantIndices to track which participants selected each upsell
11645
11751
  const aggregatedUpsellSelections = React.useCallback(() => {
@@ -11798,7 +11904,39 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11798
11904
  onClose();
11799
11905
  };
11800
11906
  // Footer navigation
11801
- const footerContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { type: "button", onClick: checkoutStep === "payment" ? () => setCheckoutStep("details") : handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: checkoutStep === "payment" ? t$1("button.backToDetails") : t$1("common.back") }), checkoutStep === "details" && (jsxRuntime.jsx("button", { type: "button", onClick: () => setCheckoutStep("payment"), disabled: !isReadyForPayment() || !hasPaymentProvider, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), children: t$1("button.continueToPayment") }))] }));
11907
+ const canContinueToPayment = isReadyForPayment();
11908
+ const handleContinueToPayment = async () => {
11909
+ if (canContinueToPayment && hasPaymentProvider) {
11910
+ setShowPaymentValidationHint(false);
11911
+ setCheckoutStep("payment");
11912
+ return;
11913
+ }
11914
+ const participantErrors = await form.trigger("participants");
11915
+ const customerErrors = await form.trigger(["customerName", "customerEmail", "acceptTerms"]);
11916
+ if (!participantErrors || !customerErrors) {
11917
+ setShowPaymentValidationHint(true);
11918
+ }
11919
+ };
11920
+ React.useEffect(() => {
11921
+ if (showPaymentValidationHint && canContinueToPayment) {
11922
+ setShowPaymentValidationHint(false);
11923
+ }
11924
+ }, [showPaymentValidationHint, canContinueToPayment]);
11925
+ const footerContent = (jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "6px" }, children: [checkoutStep === "details" && (jsxRuntime.jsx("div", { style: {
11926
+ minHeight: "14px",
11927
+ fontSize: "11px",
11928
+ color: "var(--bw-error-color)",
11929
+ textAlign: "center",
11930
+ fontFamily: "var(--bw-font-family)",
11931
+ opacity: showPaymentValidationHint ? 1 : 0,
11932
+ transition: "opacity 0.15s ease",
11933
+ pointerEvents: "none",
11934
+ }, children: t$1("payment.fillRequired") })), jsxRuntime.jsxs("div", { style: { display: "flex", gap: "12px", width: "100%" }, children: [jsxRuntime.jsx("button", { type: "button", onClick: checkoutStep === "payment" ? () => setCheckoutStep("details") : handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: checkoutStep === "payment" ? t$1("button.backToDetails") : t$1("common.back") }), checkoutStep === "details" && (jsxRuntime.jsx("button", { type: "button", onClick: handleContinueToPayment, disabled: !hasPaymentProvider, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth, !canContinueToPayment
11935
+ ? {
11936
+ opacity: 0.55,
11937
+ cursor: "pointer",
11938
+ }
11939
+ : undefined), children: t$1("button.continueToPayment") }))] })] }));
11802
11940
  if (!eventDetails.bookingOpen) {
11803
11941
  return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.notPossible"), children: jsxRuntime.jsx("div", { style: {
11804
11942
  display: "flex",
@@ -11815,7 +11953,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11815
11953
  fontFamily: "var(--bw-font-family)",
11816
11954
  }, children: t$1("booking.notPossible") }), jsxRuntime.jsx("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t$1("booking.notPossibleMessage") })] }) }) }));
11817
11955
  }
11818
- return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: jsxRuntime.jsxs("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [checkoutStep === "details" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), jsxRuntime.jsxs("div", { style: {
11956
+ return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: jsxRuntime.jsxs("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [jsxRuntime.jsx(FlowProgress, { currentStep: checkoutStep === "details" ? "details" : "payment", hasUpsellsStep: upsells.length > 0 }), checkoutStep === "details" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), jsxRuntime.jsxs("div", { style: {
11819
11957
  display: "grid",
11820
11958
  gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))",
11821
11959
  gap: "12px",
@@ -11941,7 +12079,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11941
12079
  }, children: t$1("summary.giftCard", { code: giftCard.code }) }), jsxRuntime.jsxs("span", { style: { color: "var(--bw-success-color)", fontFamily: "var(--bw-font-family)" }, children: ["-", formatCurrency(giftCard.balanceToUse || giftCard.discountAmount)] })] }, giftCard.code)))] })), jsxRuntime.jsxs("div", { style: {
11942
12080
  borderTop: "1px solid var(--bw-border-color)",
11943
12081
  paddingTop: "12px",
11944
- }, children: [hasDepositOption && (jsxRuntime.jsxs("div", { style: {
12082
+ }, children: [hasDepositChoice && (jsxRuntime.jsxs("div", { style: {
11945
12083
  display: "flex",
11946
12084
  justifyContent: "space-between",
11947
12085
  alignItems: "center",
@@ -11951,7 +12089,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11951
12089
  color: "var(--bw-text-muted)",
11952
12090
  fontFamily: "var(--bw-font-family)",
11953
12091
  fontWeight: 500,
11954
- }, children: formatCurrency(totalAmount) })] })), hasDepositOption && (jsxRuntime.jsxs("div", { style: {
12092
+ }, children: formatCurrency(totalAmount) })] })), hasDepositChoice && widgetPaymentMode === "all" && (jsxRuntime.jsxs("div", { style: {
11955
12093
  display: "flex",
11956
12094
  gap: "8px",
11957
12095
  marginBottom: "16px",
@@ -12007,19 +12145,19 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
12007
12145
  alignItems: "center",
12008
12146
  fontSize: "18px",
12009
12147
  fontWeight: 600,
12010
- }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: hasDepositOption && paymentOption === "deposit"
12148
+ }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: hasDepositChoice && paymentOption === "deposit"
12011
12149
  ? t$1("summary.payToday")
12012
12150
  : t$1("summary.totalAmount") }), jsxRuntime.jsx("span", { style: {
12013
12151
  color: "var(--bw-highlight-color)",
12014
12152
  fontFamily: "var(--bw-font-family)",
12015
12153
  fontWeight: 700,
12016
- }, children: formatCurrency(paymentAmount) })] }), hasDepositOption && paymentOption === "deposit" && (jsxRuntime.jsx("div", { style: {
12154
+ }, children: formatCurrency(paymentAmount) })] }), hasDepositChoice && paymentOption === "deposit" && (jsxRuntime.jsx("div", { style: {
12017
12155
  fontSize: "12px",
12018
12156
  color: "var(--bw-text-muted)",
12019
12157
  fontFamily: "var(--bw-font-family)",
12020
12158
  marginTop: "8px",
12021
12159
  textAlign: "right",
12022
- }, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), !hasPaymentProvider && (jsxRuntime.jsx("div", { style: cardStyles$1, children: jsxRuntime.jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && (systemConfig?.paymentProvider === "mollie" ? (jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), jsxRuntime.jsx(MolliePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, upsellSelections: aggregatedUpsellSelections(), mollieProfileId: systemConfig?.mollieProfileId, mollieTestmode: systemConfig?.mollieTestmode })] })) : (jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), jsxRuntime.jsx(StripePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, systemConfig: systemConfig ?? null, stripePromise: stripePromise, stripeAppearance: stripeAppearance, upsellSelections: aggregatedUpsellSelections() })] })))] }))] }) }));
12160
+ }, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), depositsOnlyBlocked && (jsxRuntime.jsx("div", { style: cardStyles$1, children: jsxRuntime.jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.depositNotConfigured") }) })), !hasPaymentProvider && !depositsOnlyBlocked && (jsxRuntime.jsx("div", { style: cardStyles$1, children: jsxRuntime.jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && !depositsOnlyBlocked && (systemConfig?.paymentProvider === "mollie" ? (jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), jsxRuntime.jsx(MolliePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, upsellSelections: aggregatedUpsellSelections(), mollieProfileId: systemConfig?.mollieProfileId, mollieTestmode: systemConfig?.mollieTestmode })] })) : (jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), jsxRuntime.jsx(StripePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, systemConfig: systemConfig ?? null, stripePromise: stripePromise, stripeAppearance: stripeAppearance, upsellSelections: aggregatedUpsellSelections() })] })))] }))] }) }));
12023
12161
  }
12024
12162
 
12025
12163
  /**
@@ -12867,6 +13005,40 @@ const ImageCarousel = ({ images, eventName }) => {
12867
13005
  } }))] }));
12868
13006
  };
12869
13007
 
13008
+ function PaymentLogosStrip() {
13009
+ const logoHeight = 20;
13010
+ const logoCellStyle = {
13011
+ display: "inline-flex",
13012
+ alignItems: "center",
13013
+ justifyContent: "center",
13014
+ padding: "0px 6px",
13015
+ minHeight: "29px", // +7px from previous 22px
13016
+ borderRadius: "6px",
13017
+ };
13018
+ return (jsxRuntime.jsxs("div", { style: {
13019
+ padding: "6px 14px 10px 14px",
13020
+ backgroundColor: "color-mix(in srgb, var(--bw-text-color) 100%, var(--bw-surface-color) 18%)",
13021
+ display: "flex",
13022
+ alignItems: "center",
13023
+ justifyContent: "center",
13024
+ borderRadius: "var(--bw-border-radius)",
13025
+ gap: "4px",
13026
+ flexWrap: "wrap",
13027
+ width: "fit-content",
13028
+ margin: "20px auto",
13029
+ }, children: [jsxRuntime.jsxs("span", { style: logoCellStyle, children: [jsxRuntime.jsx("span", { style: { color: "#003087", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Pay" }), jsxRuntime.jsx("span", { style: { color: "#009cde", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Pal" })] }), jsxRuntime.jsx("span", { style: logoCellStyle, children: jsxRuntime.jsxs("svg", { width: "34", height: logoHeight, viewBox: "0 0 34 20", "aria-label": "Maestro", children: [jsxRuntime.jsx("circle", { cx: "13", cy: "10", r: "8", fill: "#eb001b" }), jsxRuntime.jsx("circle", { cx: "21", cy: "10", r: "8", fill: "#00a2e5", fillOpacity: "0.92" })] }) }), jsxRuntime.jsx("span", { style: logoCellStyle, children: jsxRuntime.jsx("span", { style: { color: "#1434CB", fontSize: "14px", fontStyle: "italic", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "VISA" }) }), jsxRuntime.jsx("span", { style: logoCellStyle, children: jsxRuntime.jsx("span", { style: { color: "purple", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Klarna" }) }), jsxRuntime.jsx("span", { style: logoCellStyle, children: jsxRuntime.jsxs("svg", { width: "74", height: logoHeight, viewBox: "0 0 74 20", "aria-label": "Amazon Pay", children: [jsxRuntime.jsx("text", { x: "0", y: "14", fontSize: "12", fill: "#111827", fontFamily: "Arial, sans-serif", children: "amazon" }), jsxRuntime.jsx("text", { x: "45", y: "14", fontSize: "12", fill: "#111827", fontFamily: "Arial, sans-serif", children: "pay" }), jsxRuntime.jsx("path", { d: "M5 15 C17 20, 35 20, 48 15", stroke: "#f59e0b", strokeWidth: "1.6", fill: "none", strokeLinecap: "round" })] }) }), jsxRuntime.jsxs("span", { style: logoCellStyle, children: [jsxRuntime.jsx("span", { style: {
13030
+ fontSize: "16px",
13031
+ fontWeight: 800,
13032
+ fontFamily: "Arial, sans-serif",
13033
+ lineHeight: 1,
13034
+ background: "conic-gradient(from 25deg, #4285F4 0 24%, #DB4437 24% 48%, #F4B400 48% 73%, #0F9D58 73% 100%)",
13035
+ WebkitBackgroundClip: "text",
13036
+ backgroundClip: "text",
13037
+ color: "transparent",
13038
+ WebkitTextFillColor: "transparent",
13039
+ }, children: "G" }), jsxRuntime.jsx("span", { style: { color: "#5f6368", fontSize: "14px", fontWeight: 600, fontFamily: "Arial, sans-serif", marginLeft: "3px", lineHeight: 1 }, children: "Pay" })] }), jsxRuntime.jsx("span", { style: logoCellStyle, children: jsxRuntime.jsxs("svg", { width: "60", height: logoHeight, viewBox: "0 0 60 20", "aria-label": "Apple Pay", children: [jsxRuntime.jsx("text", { x: "0", y: "14.5", fontSize: "14.5", fill: "#111827", fontFamily: "-apple-system, BlinkMacSystemFont, Arial, sans-serif", children: "\uF8FF" }), jsxRuntime.jsx("text", { x: "14", y: "14.5", fontSize: "14.5", fill: "#111827", fontFamily: "-apple-system, BlinkMacSystemFont, Arial, sans-serif", children: "Pay" })] }) })] }));
13040
+ }
13041
+
12870
13042
  function VoucherPurchaseCard({ config, minEventPrice, fallbackImages = [], onClick, standalone = false, }) {
12871
13043
  const t = useTranslations();
12872
13044
  const [activeSlideIndex, setActiveSlideIndex] = React.useState(0);
@@ -13986,7 +14158,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
13986
14158
  display: "flex",
13987
14159
  flexDirection: "column",
13988
14160
  justifyContent: "space-between",
13989
- height: "490px",
14161
+ height: "540px",
13990
14162
  }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { className: "event-type-title", style: {
13991
14163
  fontSize: "clamp(1.1rem, 2.5vw, 24px)",
13992
14164
  fontWeight: 700,
@@ -14056,19 +14228,9 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14056
14228
  }) }) })) : (jsxRuntime.jsx("div", { className: "event-type-desc", style: {
14057
14229
  margin: "10px 0",
14058
14230
  height: "7.5em", // Same height as highlights
14059
- }, children: "\u00A0" })) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: "event-type-price", style: {
14060
- fontWeight: 700,
14061
- color: "var(--bw-text-color)",
14062
- fontFamily: "var(--bw-font-family)",
14063
- textAlign: "right",
14064
- }, children: jsxRuntime.jsx("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), jsxRuntime.jsx("div", { className: "event-type-price", style: {
14065
- fontSize: "clamp(1.72rem, 4vw, 32px)",
14066
- fontWeight: 700,
14067
- color: "var(--bw-text-color)",
14068
- fontFamily: "var(--bw-font-family)",
14069
- textAlign: "right",
14070
- }, children: jsxRuntime.jsxs("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), (() => {
14231
+ }, children: "\u00A0" })) })] }), jsxRuntime.jsxs("div", { children: [(() => {
14071
14232
  const preview = eventType.cardPreview ?? [];
14233
+ const hasMoreDates = eventType.availableInstancesCount > preview.length;
14072
14234
  return (jsxRuntime.jsxs("div", { style: {
14073
14235
  marginTop: "12px",
14074
14236
  borderTop: "1px solid var(--bw-border-color)",
@@ -14102,8 +14264,33 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14102
14264
  transition: "background 0.15s",
14103
14265
  boxSizing: "border-box",
14104
14266
  }, children: [jsxRuntime.jsxs("span", { style: { whiteSpace: "nowrap", display: "flex", alignItems: "center", gap: "3px" }, children: [item.isSpecial && (jsxRuntime.jsx("span", { style: { color: "var(--bw-highlight-color)", fontSize: "11px", lineHeight: 1 }, children: "\u2605" })), formatWeekday(item.startTime, timezone, locale), " ", formatDate(item.startTime, timezone, locale)] }), jsxRuntime.jsx("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", opacity: 0.75 }, children: item.name }), jsxRuntime.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px", whiteSpace: "nowrap" }, children: [hasDiscount && (jsxRuntime.jsx("span", { style: { textDecoration: "line-through", opacity: 0.55, fontSize: "11px" }, children: formatCurrency(item.basePrice) })), jsxRuntime.jsx("span", { style: { fontWeight: 700, color: item.isSpecial ? "var(--bw-highlight-color)" : "var(--bw-text-color)" }, children: formatCurrency(item.price) })] }), item.specialDescription ? (jsxRuntime.jsx(InfoBadge, { text: item.specialDescription })) : (jsxRuntime.jsx("span", {}))] }, item.id));
14105
- }) })] }));
14106
- })(), jsxRuntime.jsxs("div", { style: {
14267
+ }) }), hasMoreDates && (jsxRuntime.jsx("button", { type: "button", onClick: (e) => {
14268
+ e.stopPropagation();
14269
+ onEventTypeSelect(eventType);
14270
+ }, style: {
14271
+ marginTop: "6px",
14272
+ padding: 0,
14273
+ border: "none",
14274
+ background: "none",
14275
+ color: "var(--bw-highlight-color)",
14276
+ fontFamily: "var(--bw-font-family)",
14277
+ fontSize: "13px",
14278
+ fontWeight: 600,
14279
+ cursor: "pointer",
14280
+ textDecoration: "underline",
14281
+ }, children: t("events.seeMoreDates") }))] }));
14282
+ })(), jsxRuntime.jsxs("div", { style: { marginBottom: "16px" }, children: [jsxRuntime.jsx("div", { className: "event-type-price", style: {
14283
+ fontWeight: 700,
14284
+ color: "var(--bw-text-color)",
14285
+ fontFamily: "var(--bw-font-family)",
14286
+ textAlign: "right",
14287
+ }, children: jsxRuntime.jsx("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), jsxRuntime.jsx("div", { className: "event-type-price", style: {
14288
+ fontSize: "clamp(1.72rem, 4vw, 32px)",
14289
+ fontWeight: 700,
14290
+ color: "var(--bw-text-color)",
14291
+ fontFamily: "var(--bw-font-family)",
14292
+ textAlign: "right",
14293
+ }, children: jsxRuntime.jsxs("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), jsxRuntime.jsxs("div", { style: {
14107
14294
  display: "flex",
14108
14295
  justifyContent: "flex-end",
14109
14296
  alignItems: "center",
@@ -14161,7 +14348,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14161
14348
  fontFamily: "var(--bw-font-family)",
14162
14349
  boxShadow: "var(--bw-shadow-md)",
14163
14350
  }, children: t("events.soldOut") }) }))] }, eventType.id));
14164
- }) }) })), jsxRuntime.jsx(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
14351
+ }) }) })), jsxRuntime.jsx(PaymentLogosStrip, {}), jsxRuntime.jsx(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
14165
14352
  }
14166
14353
 
14167
14354
  const getAllocationBadgeInfo = (availableSpots, maxParticipants, t) => {
@@ -14288,7 +14475,7 @@ const PriceDisplay = ({ price, yearPrices, t }) => {
14288
14475
  boxShadow: displayInfo ? "0 2px 4px rgba(0, 0, 0, 0.2)" : "none",
14289
14476
  }, children: formatCurrency(price) }));
14290
14477
  };
14291
- function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, }) {
14478
+ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, hasUpsellsStep = false, }) {
14292
14479
  const t = useTranslations();
14293
14480
  const { locale } = useLocale();
14294
14481
  const timezone = useTimezone();
@@ -14354,88 +14541,88 @@ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInst
14354
14541
  const footerNav = (jsxRuntime.jsx("button", { type: "button", onClick: handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: t("common.back") }));
14355
14542
  // Show loading state first if we're loading event instances
14356
14543
  if (isLoadingEventInstances) {
14357
- return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxRuntime.jsx("div", { style: { padding: "24px" }, children: jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: Array.from({ length: 3 }).map((_, idx) => (jsxRuntime.jsxs("div", { className: "skeleton-shimmer", style: {
14358
- backgroundColor: "var(--bw-surface-color)",
14359
- border: "1px solid var(--bw-border-color)",
14360
- borderRadius: "var(--bw-border-radius)",
14361
- overflow: "hidden",
14362
- }, children: [jsxRuntime.jsxs("div", { style: {
14363
- display: "flex",
14364
- justifyContent: "space-between",
14365
- alignItems: "center",
14366
- padding: "16px 20px",
14367
- cursor: "pointer",
14368
- borderBottom: "1px solid var(--bw-border-color)",
14369
- }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
14370
- width: "80px",
14371
- height: "20px",
14372
- backgroundColor: "var(--bw-border-color)",
14373
- borderRadius: "var(--bw-border-radius-small)",
14374
- } }), jsxRuntime.jsx("div", { style: {
14375
- width: "16px",
14376
- height: "16px",
14377
- backgroundColor: "var(--bw-border-color)",
14378
- borderRadius: "var(--bw-border-radius-small)",
14379
- } })] }), jsxRuntime.jsx("div", { style: {
14380
- width: "70px",
14381
- height: "16px",
14382
- backgroundColor: "var(--bw-highlight-color)",
14383
- opacity: 0.3,
14384
- borderRadius: "var(--bw-border-radius-small)",
14385
- } })] }), jsxRuntime.jsx("div", { style: {
14386
- display: "flex",
14387
- flexDirection: "column",
14388
- gap: "12px",
14389
- paddingTop: "12px",
14390
- padding: "12px 20px 20px 20px",
14391
- }, children: Array.from({ length: 2 }).map((_, eventIdx) => (jsxRuntime.jsxs("div", { style: {
14392
- position: "relative",
14393
- border: "1px solid var(--bw-border-color)",
14394
- backgroundColor: "var(--bw-surface-color)",
14395
- borderRadius: "var(--bw-border-radius)",
14544
+ return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxRuntime.jsxs("div", { style: { padding: "24px" }, children: [jsxRuntime.jsx(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: Array.from({ length: 3 }).map((_, idx) => (jsxRuntime.jsxs("div", { className: "skeleton-shimmer", style: {
14545
+ backgroundColor: "var(--bw-surface-color)",
14546
+ border: "1px solid var(--bw-border-color)",
14547
+ borderRadius: "var(--bw-border-radius)",
14548
+ overflow: "hidden",
14549
+ }, children: [jsxRuntime.jsxs("div", { style: {
14550
+ display: "flex",
14551
+ justifyContent: "space-between",
14552
+ alignItems: "center",
14396
14553
  padding: "16px 20px",
14397
- fontFamily: "var(--bw-font-family)",
14398
- }, children: [jsxRuntime.jsxs("div", { style: {
14399
- display: "flex",
14400
- justifyContent: "space-between",
14401
- width: "100%",
14402
- alignItems: "flex-start",
14403
- gap: "12px",
14404
- marginBottom: "4px",
14405
- }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
14406
- width: "40px",
14407
- height: "40px",
14408
- backgroundColor: "var(--bw-background-color)",
14409
- border: "1px solid var(--bw-border-color)",
14410
- borderTopWidth: "4px",
14411
- borderRadius: "var(--bw-border-radius-small)",
14412
- } }), jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [jsxRuntime.jsx("div", { style: {
14413
- width: "80px",
14414
- height: "16px",
14415
- backgroundColor: "var(--bw-border-color)",
14416
- borderRadius: "var(--bw-border-radius)",
14417
- } }), jsxRuntime.jsx("div", { style: {
14418
- width: "60px",
14419
- height: "14px",
14420
- backgroundColor: "var(--bw-border-color)",
14421
- borderRadius: "var(--bw-border-radius)",
14422
- } })] })] }), jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: jsxRuntime.jsx("div", { style: {
14423
- width: "70px",
14424
- height: "20px",
14425
- backgroundColor: "var(--bw-highlight-color)",
14426
- opacity: 0.3,
14427
- borderRadius: "var(--bw-border-radius)",
14428
- } }) })] }), jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [jsxRuntime.jsx("div", { style: {
14429
- width: "120px",
14430
- height: "16px",
14554
+ cursor: "pointer",
14555
+ borderBottom: "1px solid var(--bw-border-color)",
14556
+ }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
14557
+ width: "80px",
14558
+ height: "20px",
14431
14559
  backgroundColor: "var(--bw-border-color)",
14432
- borderRadius: "var(--bw-border-radius)",
14560
+ borderRadius: "var(--bw-border-radius-small)",
14433
14561
  } }), jsxRuntime.jsx("div", { style: {
14434
- width: "50px",
14435
- height: "20px",
14562
+ width: "16px",
14563
+ height: "16px",
14436
14564
  backgroundColor: "var(--bw-border-color)",
14437
- borderRadius: "16px",
14438
- } })] })] }, eventIdx))) })] }, idx))) }) }) }));
14565
+ borderRadius: "var(--bw-border-radius-small)",
14566
+ } })] }), jsxRuntime.jsx("div", { style: {
14567
+ width: "70px",
14568
+ height: "16px",
14569
+ backgroundColor: "var(--bw-highlight-color)",
14570
+ opacity: 0.3,
14571
+ borderRadius: "var(--bw-border-radius-small)",
14572
+ } })] }), jsxRuntime.jsx("div", { style: {
14573
+ display: "flex",
14574
+ flexDirection: "column",
14575
+ gap: "12px",
14576
+ paddingTop: "12px",
14577
+ padding: "12px 20px 20px 20px",
14578
+ }, children: Array.from({ length: 2 }).map((_, eventIdx) => (jsxRuntime.jsxs("div", { style: {
14579
+ position: "relative",
14580
+ border: "1px solid var(--bw-border-color)",
14581
+ backgroundColor: "var(--bw-surface-color)",
14582
+ borderRadius: "var(--bw-border-radius)",
14583
+ padding: "16px 20px",
14584
+ fontFamily: "var(--bw-font-family)",
14585
+ }, children: [jsxRuntime.jsxs("div", { style: {
14586
+ display: "flex",
14587
+ justifyContent: "space-between",
14588
+ width: "100%",
14589
+ alignItems: "flex-start",
14590
+ gap: "12px",
14591
+ marginBottom: "4px",
14592
+ }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
14593
+ width: "40px",
14594
+ height: "40px",
14595
+ backgroundColor: "var(--bw-background-color)",
14596
+ border: "1px solid var(--bw-border-color)",
14597
+ borderTopWidth: "4px",
14598
+ borderRadius: "var(--bw-border-radius-small)",
14599
+ } }), jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [jsxRuntime.jsx("div", { style: {
14600
+ width: "80px",
14601
+ height: "16px",
14602
+ backgroundColor: "var(--bw-border-color)",
14603
+ borderRadius: "var(--bw-border-radius)",
14604
+ } }), jsxRuntime.jsx("div", { style: {
14605
+ width: "60px",
14606
+ height: "14px",
14607
+ backgroundColor: "var(--bw-border-color)",
14608
+ borderRadius: "var(--bw-border-radius)",
14609
+ } })] })] }), jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: jsxRuntime.jsx("div", { style: {
14610
+ width: "70px",
14611
+ height: "20px",
14612
+ backgroundColor: "var(--bw-highlight-color)",
14613
+ opacity: 0.3,
14614
+ borderRadius: "var(--bw-border-radius)",
14615
+ } }) })] }), jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [jsxRuntime.jsx("div", { style: {
14616
+ width: "120px",
14617
+ height: "16px",
14618
+ backgroundColor: "var(--bw-border-color)",
14619
+ borderRadius: "var(--bw-border-radius)",
14620
+ } }), jsxRuntime.jsx("div", { style: {
14621
+ width: "50px",
14622
+ height: "20px",
14623
+ backgroundColor: "var(--bw-border-color)",
14624
+ borderRadius: "16px",
14625
+ } })] })] }, eventIdx))) })] }, idx))) })] }) }));
14439
14626
  }
14440
14627
  // Show empty state only if not loading and no event instances
14441
14628
  if (eventInstances.length === 0) {
@@ -14454,116 +14641,116 @@ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInst
14454
14641
  fontFamily: "var(--bw-font-family)",
14455
14642
  }, children: t("instances.noAvailable") }), jsxRuntime.jsx("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t("instances.noAvailableMessage") })] }) }) }));
14456
14643
  }
14457
- return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxRuntime.jsx("div", { style: { padding: "20px 10px" }, children: jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: monthYearGroups.map(({ key, label, events, minPrice, year }, idx) => {
14458
- const monthPriceDisplayInfo = getMonthPriceDisplayInfo(minPrice);
14459
- return (jsxRuntime.jsxs(React.Fragment, { children: [idx > 0 && monthYearGroups[idx - 1].year !== year && (jsxRuntime.jsx("div", { style: { height: "1px", backgroundColor: "var(--bw-border-color)", margin: "4px 0" } })), jsxRuntime.jsx(Accordion, { title: label, priceInfo: jsxRuntime.jsx("div", { style: {
14460
- fontSize: "16px",
14461
- fontWeight: 500,
14462
- marginLeft: "auto",
14463
- padding: "4px 8px",
14464
- borderRadius: "var(--bw-border-radius-small)",
14465
- backgroundColor: monthPriceDisplayInfo
14466
- ? monthPriceDisplayInfo.backgroundColor
14467
- : "#14532d",
14468
- color: monthPriceDisplayInfo
14469
- ? monthPriceDisplayInfo.textColor
14470
- : "#4ade80",
14471
- boxShadow: monthPriceDisplayInfo
14472
- ? "0 2px 4px rgba(0, 0, 0, 0.2)"
14473
- : undefined,
14474
- }, children: `${t("common.from")} ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", paddingTop: "12px" }, children: events.map((event) => {
14475
- const availableSpots = event.maxParticipants - event.participantCount;
14476
- const isFullyBooked = availableSpots === 0;
14477
- const startDate = new Date(event.startTime);
14478
- const isPastEvent = today.toISOString() >= startDate.toISOString();
14479
- const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
14480
- return (jsxRuntime.jsxs("div", { style: {
14481
- position: "relative",
14482
- border: "1px solid var(--bw-border-color)",
14483
- backgroundColor: "var(--bw-surface-color)",
14484
- borderRadius: "var(--bw-border-radius)",
14485
- padding: "16px 10px",
14486
- transition: "all 0.2s ease",
14487
- fontFamily: "var(--bw-font-family)",
14488
- opacity: isDisabled ? 0.3 : 1,
14489
- filter: isDisabled ? "grayscale(40%)" : "none",
14490
- cursor: isDisabled ? "not-allowed" : "pointer",
14491
- }, onClick: () => {
14492
- if (!isDisabled) {
14493
- handleEventInstanceSelect(event);
14494
- }
14495
- }, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsxRuntime.jsx("div", { style: {
14496
- position: "absolute",
14497
- inset: 0,
14498
- backgroundColor: "rgba(15, 23, 42, 0.8)",
14499
- borderRadius: "var(--bw-border-radius)",
14500
- display: "flex",
14501
- alignItems: "center",
14502
- justifyContent: "center",
14503
- }, children: jsxRuntime.jsx("div", { style: {
14504
- width: "32px",
14505
- height: "32px",
14506
- color: "var(--bw-highlight-color)",
14507
- opacity: 0.8,
14508
- fontSize: "32px",
14509
- }, children: spinner() }) })), jsxRuntime.jsx(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices, t: t }), jsxRuntime.jsx(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.maxParticipants, t: t }), jsxRuntime.jsxs("div", { style: {
14510
- display: "flex",
14511
- justifyContent: "space-between",
14512
- width: "100%",
14513
- alignItems: "flex-start",
14514
- gap: "12px",
14515
- marginBottom: "4px",
14516
- }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
14517
- fontSize: "16px",
14518
- transition: "all 0.2s ease",
14519
- borderRadius: "var(--bw-border-radius-small)",
14520
- borderTop: "4px solid var(--bw-border-color)",
14521
- border: "1px solid var(--bw-border-color)",
14522
- width: "40px",
14523
- height: "40px",
14524
- display: "flex",
14525
- alignItems: "center",
14526
- justifyContent: "center",
14527
- fontWeight: 700,
14528
- color: "var(--bw-text-color)",
14529
- backgroundColor: "var(--bw-background-color)",
14530
- }, children: startDate.getDate() }), jsxRuntime.jsxs("div", { style: {
14531
- fontSize: "16px",
14532
- color: "var(--bw-text-color)",
14533
- display: "flex",
14534
- flexDirection: "column",
14535
- alignItems: "flex-start",
14536
- justifyContent: "flex-start",
14537
- lineHeight: 1.25,
14538
- }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), formatWeekday(event.startTime, timezone, locale) !==
14539
- formatWeekday(event.endTime, timezone, locale) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsxRuntime.jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), jsxRuntime.jsx("div", { children: formatWeekday(event.startTime, timezone, locale) ===
14540
- formatWeekday(event.endTime, timezone, locale) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (jsxRuntime.jsxs("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), jsxRuntime.jsxs("span", { style: {
14541
- fontSize: "12px",
14542
- fontWeight: 400,
14543
- color: "var(--bw-text-muted)",
14544
- marginLeft: "6px",
14545
- backgroundColor: "rgba(0, 0, 0, 0.05)",
14546
- whiteSpace: "nowrap",
14547
- padding: "2px 6px",
14548
- borderRadius: "var(--bw-border-radius-small)",
14549
- }, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), jsxRuntime.jsx("div", { style: {
14550
- textAlign: "right",
14551
- display: "flex",
14552
- flexDirection: "column",
14553
- alignItems: "flex-end",
14554
- }, children: jsxRuntime.jsx(PriceDisplay, { price: event.price, yearPrices: yearPrices, t: t }) })] }), event.name !== selectedEventType?.name && (jsxRuntime.jsx("h4", { style: {
14555
- fontSize: "16px",
14556
- fontWeight: 600,
14557
- color: "var(--bw-text-color)",
14558
- lineHeight: 1.25,
14559
- margin: "0 0 2px 0",
14560
- display: "flex",
14561
- alignItems: "center",
14562
- gap: "8px",
14563
- maxWidth: "230px",
14564
- }, children: event.name }))] }, event.id));
14565
- }) }) })] }, key));
14566
- }) }) }) }));
14644
+ return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxRuntime.jsxs("div", { style: { padding: "20px 10px" }, children: [jsxRuntime.jsx(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: monthYearGroups.map(({ key, label, events, minPrice, year }, idx) => {
14645
+ const monthPriceDisplayInfo = getMonthPriceDisplayInfo(minPrice);
14646
+ return (jsxRuntime.jsxs(React.Fragment, { children: [idx > 0 && monthYearGroups[idx - 1].year !== year && (jsxRuntime.jsx("div", { style: { height: "1px", backgroundColor: "var(--bw-border-color)", margin: "4px 0" } })), jsxRuntime.jsx(Accordion, { title: label, priceInfo: jsxRuntime.jsx("div", { style: {
14647
+ fontSize: "16px",
14648
+ fontWeight: 500,
14649
+ marginLeft: "auto",
14650
+ padding: "4px 8px",
14651
+ borderRadius: "var(--bw-border-radius-small)",
14652
+ backgroundColor: monthPriceDisplayInfo
14653
+ ? monthPriceDisplayInfo.backgroundColor
14654
+ : "#14532d",
14655
+ color: monthPriceDisplayInfo
14656
+ ? monthPriceDisplayInfo.textColor
14657
+ : "#4ade80",
14658
+ boxShadow: monthPriceDisplayInfo
14659
+ ? "0 2px 4px rgba(0, 0, 0, 0.2)"
14660
+ : undefined,
14661
+ }, children: `${t("common.from")} ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", paddingTop: "12px" }, children: events.map((event) => {
14662
+ const availableSpots = event.maxParticipants - event.participantCount;
14663
+ const isFullyBooked = availableSpots === 0;
14664
+ const startDate = new Date(event.startTime);
14665
+ const isPastEvent = today.toISOString() >= startDate.toISOString();
14666
+ const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
14667
+ return (jsxRuntime.jsxs("div", { style: {
14668
+ position: "relative",
14669
+ border: "1px solid var(--bw-border-color)",
14670
+ backgroundColor: "var(--bw-surface-color)",
14671
+ borderRadius: "var(--bw-border-radius)",
14672
+ padding: "16px 10px",
14673
+ transition: "all 0.2s ease",
14674
+ fontFamily: "var(--bw-font-family)",
14675
+ opacity: isDisabled ? 0.3 : 1,
14676
+ filter: isDisabled ? "grayscale(40%)" : "none",
14677
+ cursor: isDisabled ? "not-allowed" : "pointer",
14678
+ }, onClick: () => {
14679
+ if (!isDisabled) {
14680
+ handleEventInstanceSelect(event);
14681
+ }
14682
+ }, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsxRuntime.jsx("div", { style: {
14683
+ position: "absolute",
14684
+ inset: 0,
14685
+ backgroundColor: "rgba(15, 23, 42, 0.8)",
14686
+ borderRadius: "var(--bw-border-radius)",
14687
+ display: "flex",
14688
+ alignItems: "center",
14689
+ justifyContent: "center",
14690
+ }, children: jsxRuntime.jsx("div", { style: {
14691
+ width: "32px",
14692
+ height: "32px",
14693
+ color: "var(--bw-highlight-color)",
14694
+ opacity: 0.8,
14695
+ fontSize: "32px",
14696
+ }, children: spinner() }) })), jsxRuntime.jsx(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices, t: t }), jsxRuntime.jsx(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.maxParticipants, t: t }), jsxRuntime.jsxs("div", { style: {
14697
+ display: "flex",
14698
+ justifyContent: "space-between",
14699
+ width: "100%",
14700
+ alignItems: "flex-start",
14701
+ gap: "12px",
14702
+ marginBottom: "4px",
14703
+ }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
14704
+ fontSize: "16px",
14705
+ transition: "all 0.2s ease",
14706
+ borderRadius: "var(--bw-border-radius-small)",
14707
+ borderTop: "4px solid var(--bw-border-color)",
14708
+ border: "1px solid var(--bw-border-color)",
14709
+ width: "40px",
14710
+ height: "40px",
14711
+ display: "flex",
14712
+ alignItems: "center",
14713
+ justifyContent: "center",
14714
+ fontWeight: 700,
14715
+ color: "var(--bw-text-color)",
14716
+ backgroundColor: "var(--bw-background-color)",
14717
+ }, children: startDate.getDate() }), jsxRuntime.jsxs("div", { style: {
14718
+ fontSize: "16px",
14719
+ color: "var(--bw-text-color)",
14720
+ display: "flex",
14721
+ flexDirection: "column",
14722
+ alignItems: "flex-start",
14723
+ justifyContent: "flex-start",
14724
+ lineHeight: 1.25,
14725
+ }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), formatWeekday(event.startTime, timezone, locale) !==
14726
+ formatWeekday(event.endTime, timezone, locale) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsxRuntime.jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), jsxRuntime.jsx("div", { children: formatWeekday(event.startTime, timezone, locale) ===
14727
+ formatWeekday(event.endTime, timezone, locale) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (jsxRuntime.jsxs("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), jsxRuntime.jsxs("span", { style: {
14728
+ fontSize: "12px",
14729
+ fontWeight: 400,
14730
+ color: "var(--bw-text-muted)",
14731
+ marginLeft: "6px",
14732
+ backgroundColor: "rgba(0, 0, 0, 0.05)",
14733
+ whiteSpace: "nowrap",
14734
+ padding: "2px 6px",
14735
+ borderRadius: "var(--bw-border-radius-small)",
14736
+ }, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), jsxRuntime.jsx("div", { style: {
14737
+ textAlign: "right",
14738
+ display: "flex",
14739
+ flexDirection: "column",
14740
+ alignItems: "flex-end",
14741
+ }, children: jsxRuntime.jsx(PriceDisplay, { price: event.price, yearPrices: yearPrices, t: t }) })] }), event.name !== selectedEventType?.name && (jsxRuntime.jsx("h4", { style: {
14742
+ fontSize: "16px",
14743
+ fontWeight: 600,
14744
+ color: "var(--bw-text-color)",
14745
+ lineHeight: 1.25,
14746
+ margin: "0 0 2px 0",
14747
+ display: "flex",
14748
+ alignItems: "center",
14749
+ gap: "8px",
14750
+ maxWidth: "230px",
14751
+ }, children: event.name }))] }, event.id));
14752
+ }) }) })] }, key));
14753
+ }) })] }) }));
14567
14754
  }
14568
14755
 
14569
14756
  function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText, showAllButton, isLoadingEventDetails = false, isLoadingShowAll = false, isLoading = false, }) {
@@ -15422,7 +15609,7 @@ function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, is
15422
15609
  const isSelected = (upsellId) => selectedUpsells.some((s) => s.upsellPackageId === upsellId);
15423
15610
  const selectedCount = selectedUpsells.length;
15424
15611
  const footerContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { type: "button", onClick: onBack, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), className: buttonClassName, children: t("common.back") }), jsxRuntime.jsx("button", { type: "button", onClick: onContinue, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), className: buttonClassName, children: selectedCount === 0 ? t("button.continueWithout") : t("button.continue") })] }));
15425
- return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [isLoading && (jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), jsxRuntime.jsx("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (jsxRuntime.jsx("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: jsxRuntime.jsx("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (jsxRuntime.jsx(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: jsxRuntime.jsx("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
15612
+ return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [jsxRuntime.jsx(FlowProgress, { currentStep: "upsells", hasUpsellsStep: true }), isLoading && (jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), jsxRuntime.jsx("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (jsxRuntime.jsx("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: jsxRuntime.jsx("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (jsxRuntime.jsx(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: jsxRuntime.jsx("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
15426
15613
  }
15427
15614
 
15428
15615
  /**
@@ -15563,6 +15750,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
15563
15750
  const [bookingPersistedState, setBookingPersistedState] = React.useState(null);
15564
15751
  const [isLoadingUpsells, setIsLoadingUpsells] = React.useState(false);
15565
15752
  const [tempParticipantCount, setTempParticipantCount] = React.useState(1); // Used during upsell step
15753
+ const hasUpsellsFlowStep = upsells.length > 0 || currentStep === "upsells";
15566
15754
  // State for upcoming events (next-events view mode)
15567
15755
  const [upcomingEvents, setUpcomingEvents] = React.useState([]);
15568
15756
  const [showingPreview, setShowingPreview] = React.useState(true);
@@ -15689,6 +15877,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
15689
15877
  ...(data.mollieProfileId ? { mollieProfileId: data.mollieProfileId } : {}),
15690
15878
  ...(data.mollieTestmode !== undefined ? { mollieTestmode: data.mollieTestmode } : {}),
15691
15879
  roundPricesEnabled: data.roundPricesEnabled ?? true,
15880
+ widgetPaymentMode: data.widgetPaymentMode ?? "all",
15692
15881
  });
15693
15882
  }
15694
15883
  }
@@ -16053,6 +16242,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16053
16242
  mollieProfileId: data.mollieProfileId,
16054
16243
  mollieTestmode: data.mollieTestmode,
16055
16244
  roundPricesEnabled: data.roundPricesEnabled ?? true,
16245
+ widgetPaymentMode: data.widgetPaymentMode ?? "all",
16056
16246
  });
16057
16247
  }
16058
16248
  if (data.stripePublishableKey) {
@@ -16113,6 +16303,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16113
16303
  mollieProfileId: data.mollieProfileId,
16114
16304
  mollieTestmode: data.mollieTestmode,
16115
16305
  roundPricesEnabled: data.roundPricesEnabled ?? true,
16306
+ widgetPaymentMode: data.widgetPaymentMode ?? "all",
16116
16307
  });
16117
16308
  if (!stripePromise && data.stripePublishableKey) {
16118
16309
  const stripeOptions = {
@@ -16621,7 +16812,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16621
16812
  }, isOpen: currentStep === "eventInstances", onClose: () => {
16622
16813
  setShowingPreview(true);
16623
16814
  setCurrentStep("eventTypes");
16624
- }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16815
+ }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16625
16816
  setIsSuccess(false);
16626
16817
  setCurrentStep("eventTypes");
16627
16818
  setShowingPreview(true);
@@ -16664,7 +16855,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16664
16855
  setShouldRenderInstanceSelection(true);
16665
16856
  }
16666
16857
  }, children: config.buttonText ||
16667
- (isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16858
+ (isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16668
16859
  setIsSuccess(false);
16669
16860
  setCurrentStep("eventTypes");
16670
16861
  setSidebarOpen(false);
@@ -16725,7 +16916,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16725
16916
  };
16726
16917
  };
16727
16918
  const backHandlers = getBackHandlers();
16728
- return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
16919
+ return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
16729
16920
  setIsSuccess(false);
16730
16921
  setCurrentStep("eventTypes");
16731
16922
  setSuccessPaymentId(null);