@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.
@@ -294,6 +294,7 @@
294
294
  "events.availableFrom": "Freie Plätze ab {{date}}",
295
295
  "events.noAvailableDates": "Keine Termine frei",
296
296
  "events.previewSectionTitle": "Specials & nächste Termine",
297
+ "events.seeMoreDates": "Weitere Termine ansehen...",
297
298
  // Event instances
298
299
  "instances.title": "Terminauswahl",
299
300
  "instances.noAvailable": "Keine verfügbaren Termine",
@@ -347,6 +348,10 @@
347
348
  "booking.maxSpotsReached": "Maximal {{count}} Plätze verfügbar.",
348
349
  "booking.comment": "Kommentar (optional)",
349
350
  "booking.commentPlaceholder": "Zusätzliche Anmerkungen zur Buchung...",
351
+ "booking.stepDate": "Termin",
352
+ "booking.stepUpsells": "Extras",
353
+ "booking.stepDetails": "Angaben",
354
+ "booking.stepPayment": "Zahlung",
350
355
  // Booking summary
351
356
  "summary.title": "Buchungszusammenfassung",
352
357
  "summary.subtotal": "Zwischensumme:",
@@ -479,6 +484,7 @@
479
484
  "upsells.selectedPlural": "{{count}} Extras ausgewählt",
480
485
  "upsells.savePercent": "{{percent}}% sparen",
481
486
  "booking.paymentUnavailable": "Online-Zahlung ist für diese Buchung nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
487
+ "booking.depositNotConfigured": "Online-Anzahlung ist für dieses Event nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
482
488
  "upsells.spotsFree": "{{count}} Plätze frei",
483
489
  "upsells.notAvailable": "Nicht verfügbar",
484
490
  "upsells.reason.outOfStock": "{{productName}} ist nicht auf Lager",
@@ -504,6 +510,9 @@
504
510
  "promo.giftCode": "Dein Geschenk-Code",
505
511
  "promo.copied": "Kopiert!",
506
512
  "promo.copy": "Kopieren",
513
+ "trust.securePayment": "Sichere Zahlung",
514
+ "trust.paypal": "PayPal",
515
+ "trust.stripe": "Stripe",
507
516
  };
508
517
 
509
518
  const en = {
@@ -574,6 +583,7 @@
574
583
  "events.availableFrom": "Available from {{date}}",
575
584
  "events.noAvailableDates": "No dates available",
576
585
  "events.previewSectionTitle": "Specials & upcoming dates",
586
+ "events.seeMoreDates": "See more dates...",
577
587
  // Event instances
578
588
  "instances.title": "Select a date",
579
589
  "instances.noAvailable": "No available dates",
@@ -627,6 +637,10 @@
627
637
  "booking.maxSpotsReached": "Maximum {{count}} spots available.",
628
638
  "booking.comment": "Comment (optional)",
629
639
  "booking.commentPlaceholder": "Additional notes for the booking...",
640
+ "booking.stepDate": "Date",
641
+ "booking.stepUpsells": "Extras",
642
+ "booking.stepDetails": "Details",
643
+ "booking.stepPayment": "Payment",
630
644
  // Booking summary
631
645
  "summary.title": "Booking Summary",
632
646
  "summary.subtotal": "Subtotal:",
@@ -759,6 +773,7 @@
759
773
  "upsells.selectedPlural": "{{count}} extras selected",
760
774
  "upsells.savePercent": "Save {{percent}}%",
761
775
  "booking.paymentUnavailable": "Online payment is not available for this booking. Please contact us to complete your reservation.",
776
+ "booking.depositNotConfigured": "Online deposit payment is not available for this event. Please contact us to complete your reservation.",
762
777
  "upsells.spotsFree": "{{count}} spots available",
763
778
  "upsells.notAvailable": "Not available",
764
779
  "upsells.reason.outOfStock": "{{productName}} is out of stock",
@@ -784,6 +799,9 @@
784
799
  "promo.giftCode": "Your gift code",
785
800
  "promo.copied": "Copied!",
786
801
  "promo.copy": "Copy",
802
+ "trust.securePayment": "Secure payment",
803
+ "trust.paypal": "PayPal",
804
+ "trust.stripe": "Stripe",
787
805
  };
788
806
 
789
807
  const es = {
@@ -854,6 +872,7 @@
854
872
  "events.availableFrom": "Disponible desde {{date}}",
855
873
  "events.noAvailableDates": "Sin fechas disponibles",
856
874
  "events.previewSectionTitle": "Especiales & próximas fechas",
875
+ "events.seeMoreDates": "Ver más fechas...",
857
876
  // Event instances
858
877
  "instances.title": "Seleccionar fecha",
859
878
  "instances.noAvailable": "Sin fechas disponibles",
@@ -907,6 +926,10 @@
907
926
  "booking.maxSpotsReached": "Máximo {{count}} plazas disponibles.",
908
927
  "booking.comment": "Comentario (opcional)",
909
928
  "booking.commentPlaceholder": "Notas adicionales para la reserva...",
929
+ "booking.stepDate": "Fecha",
930
+ "booking.stepUpsells": "Extras",
931
+ "booking.stepDetails": "Datos",
932
+ "booking.stepPayment": "Pago",
910
933
  // Booking summary
911
934
  "summary.title": "Resumen de la reserva",
912
935
  "summary.subtotal": "Subtotal:",
@@ -1039,6 +1062,7 @@
1039
1062
  "upsells.selectedPlural": "{{count}} extras seleccionados",
1040
1063
  "upsells.savePercent": "Ahorra {{percent}}%",
1041
1064
  "booking.paymentUnavailable": "El pago en línea no está disponible para esta reserva. Contáctanos para completarla.",
1065
+ "booking.depositNotConfigured": "El pago de depósito en línea no está disponible para este evento. Contáctanos para completar la reserva.",
1042
1066
  "upsells.spotsFree": "{{count}} plazas disponibles",
1043
1067
  "upsells.notAvailable": "No disponible",
1044
1068
  "upsells.reason.outOfStock": "{{productName}} está agotado",
@@ -1064,6 +1088,9 @@
1064
1088
  "promo.giftCode": "Tu codigo de regalo",
1065
1089
  "promo.copied": "Copiado!",
1066
1090
  "promo.copy": "Copiar",
1091
+ "trust.securePayment": "Pago seguro",
1092
+ "trust.paypal": "PayPal",
1093
+ "trust.stripe": "Stripe",
1067
1094
  };
1068
1095
 
1069
1096
  const pt = {
@@ -1134,6 +1161,7 @@
1134
1161
  "events.availableFrom": "Disponível a partir de {{date}}",
1135
1162
  "events.noAvailableDates": "Sem datas disponíveis",
1136
1163
  "events.previewSectionTitle": "Especiais & próximas datas",
1164
+ "events.seeMoreDates": "Ver mais datas...",
1137
1165
  // Event instances
1138
1166
  "instances.title": "Selecionar data",
1139
1167
  "instances.noAvailable": "Sem datas disponíveis",
@@ -1187,6 +1215,10 @@
1187
1215
  "booking.maxSpotsReached": "Máximo {{count}} lugares disponíveis.",
1188
1216
  "booking.comment": "Comentário (opcional)",
1189
1217
  "booking.commentPlaceholder": "Notas adicionais para a reserva...",
1218
+ "booking.stepDate": "Data",
1219
+ "booking.stepUpsells": "Extras",
1220
+ "booking.stepDetails": "Dados",
1221
+ "booking.stepPayment": "Pagamento",
1190
1222
  // Booking summary
1191
1223
  "summary.title": "Resumo da reserva",
1192
1224
  "summary.subtotal": "Subtotal:",
@@ -1319,6 +1351,7 @@
1319
1351
  "upsells.selectedPlural": "{{count}} extras selecionados",
1320
1352
  "upsells.savePercent": "Poupa {{percent}}%",
1321
1353
  "booking.paymentUnavailable": "O pagamento online não está disponível para esta reserva. Contacta-nos para concluir a reserva.",
1354
+ "booking.depositNotConfigured": "O pagamento de depósito online não está disponível para este evento. Contacta-nos para concluir a reserva.",
1322
1355
  "upsells.spotsFree": "{{count}} lugares disponíveis",
1323
1356
  "upsells.notAvailable": "Não disponível",
1324
1357
  "upsells.reason.outOfStock": "{{productName}} está esgotado",
@@ -1344,6 +1377,9 @@
1344
1377
  "promo.giftCode": "O teu codigo de oferta",
1345
1378
  "promo.copied": "Copiado!",
1346
1379
  "promo.copy": "Copiar",
1380
+ "trust.securePayment": "Pagamento seguro",
1381
+ "trust.paypal": "PayPal",
1382
+ "trust.stripe": "Stripe",
1347
1383
  };
1348
1384
 
1349
1385
  const sv = {
@@ -1414,6 +1450,7 @@
1414
1450
  "events.availableFrom": "Lediga platser från {{date}}",
1415
1451
  "events.noAvailableDates": "Inga datum lediga",
1416
1452
  "events.previewSectionTitle": "Specials & kommande datum",
1453
+ "events.seeMoreDates": "Se fler datum...",
1417
1454
  // Event instances
1418
1455
  "instances.title": "Välj datum",
1419
1456
  "instances.noAvailable": "Inga tillgängliga datum",
@@ -1467,6 +1504,10 @@
1467
1504
  "booking.maxSpotsReached": "Maximalt {{count}} platser tillgängliga.",
1468
1505
  "booking.comment": "Kommentar (valfritt)",
1469
1506
  "booking.commentPlaceholder": "Ytterligare anteckningar för bokningen...",
1507
+ "booking.stepDate": "Datum",
1508
+ "booking.stepUpsells": "Tillägg",
1509
+ "booking.stepDetails": "Uppgifter",
1510
+ "booking.stepPayment": "Betalning",
1470
1511
  // Booking summary
1471
1512
  "summary.title": "Bokningssammanfattning",
1472
1513
  "summary.subtotal": "Delsumma:",
@@ -1599,6 +1640,7 @@
1599
1640
  "upsells.selectedPlural": "{{count}} tillägg valda",
1600
1641
  "upsells.savePercent": "Spara {{percent}}%",
1601
1642
  "booking.paymentUnavailable": "Onlinebetalning är inte tillgänglig för denna bokning. Kontakta oss för att slutföra bokningen.",
1643
+ "booking.depositNotConfigured": "Online deposition är inte tillgänglig för detta evenemang. Kontakta oss för att slutföra bokningen.",
1602
1644
  "upsells.spotsFree": "{{count}} platser lediga",
1603
1645
  "upsells.notAvailable": "Inte tillgängligt",
1604
1646
  "upsells.reason.outOfStock": "{{productName}} är slut i lager",
@@ -1624,6 +1666,9 @@
1624
1666
  "promo.giftCode": "Din presentkod",
1625
1667
  "promo.copied": "Kopierad!",
1626
1668
  "promo.copy": "Kopiera",
1669
+ "trust.securePayment": "Säker betalning",
1670
+ "trust.paypal": "PayPal",
1671
+ "trust.stripe": "Stripe",
1627
1672
  };
1628
1673
 
1629
1674
  const SUPPORTED_LOCALES = ["de", "en", "es", "sv", "pt"];
@@ -7390,6 +7435,55 @@
7390
7435
  }, children: children }))] }));
7391
7436
  }
7392
7437
 
7438
+ function FlowProgress({ currentStep, hasUpsellsStep }) {
7439
+ const t = useTranslations();
7440
+ const steps = hasUpsellsStep
7441
+ ? [
7442
+ { key: "date", label: t("booking.stepDate") },
7443
+ { key: "upsells", label: t("booking.stepUpsells") },
7444
+ { key: "details", label: t("booking.stepDetails") },
7445
+ { key: "payment", label: t("booking.stepPayment") },
7446
+ ]
7447
+ : [
7448
+ { key: "date", label: t("booking.stepDate") },
7449
+ { key: "details", label: t("booking.stepDetails") },
7450
+ { key: "payment", label: t("booking.stepPayment") },
7451
+ ];
7452
+ const activeIndex = Math.max(steps.findIndex((step) => step.key === currentStep), 0);
7453
+ const progressPercent = steps.length > 1 ? (activeIndex / (steps.length - 1)) * 100 : 100;
7454
+ return (u$2("div", { style: {
7455
+ backgroundColor: "var(--bw-surface-color)",
7456
+ border: "1px solid var(--bw-border-color)",
7457
+ borderRadius: "var(--bw-border-radius)",
7458
+ padding: "12px 14px",
7459
+ marginBottom: "16px",
7460
+ }, children: [u$2("div", { style: {
7461
+ display: "flex",
7462
+ justifyContent: "space-between",
7463
+ alignItems: "center",
7464
+ marginBottom: "10px",
7465
+ fontFamily: "var(--bw-font-family)",
7466
+ gap: "8px",
7467
+ }, children: steps.map((step, index) => (u$2("span", { style: {
7468
+ fontSize: "12px",
7469
+ fontWeight: 700,
7470
+ color: index <= activeIndex ? "var(--bw-highlight-color)" : "var(--bw-text-muted)",
7471
+ whiteSpace: "nowrap",
7472
+ }, children: [index + 1, ". ", step.label] }, step.key))) }), u$2("div", { style: {
7473
+ width: "100%",
7474
+ height: "8px",
7475
+ borderRadius: "999px",
7476
+ backgroundColor: "var(--bw-background-color)",
7477
+ border: "1px solid var(--bw-border-color)",
7478
+ overflow: "hidden",
7479
+ }, children: u$2("div", { style: {
7480
+ width: `${progressPercent}%`,
7481
+ height: "100%",
7482
+ backgroundColor: "var(--bw-highlight-color)",
7483
+ transition: "width 0.25s ease",
7484
+ } }) })] }));
7485
+ }
7486
+
7393
7487
  // Spinner icon (kept local as it has animation style)
7394
7488
  const IconSpinner = ({ size = 16, color = "currentColor" }) => (u$2("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: u$2("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }));
7395
7489
  function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVoucherValidated, appliedVouchers, onRemoveVoucher, disabled = false, }) {
@@ -11604,6 +11698,7 @@
11604
11698
  const { locale } = useLocale();
11605
11699
  const timezone = useTimezone();
11606
11700
  const roundEnabled = systemConfig?.roundPricesEnabled !== false;
11701
+ const widgetPaymentMode = systemConfig?.widgetPaymentMode ?? "all";
11607
11702
  const participantFieldsConfig = eventDetails.participantFieldsConfig ?? DEFAULT_PARTICIPANT_FIELDS_CONFIG;
11608
11703
  const participantLevelOptions = eventDetails.participantLevelOptions ?? ["beginner", "advanced"];
11609
11704
  const roundDiscountUp = (minorUnits) => Math.ceil(minorUnits / 100) * 100;
@@ -11617,6 +11712,7 @@
11617
11712
  const [paymentOption, setPaymentOption] = d$1(() => persistedState?.paymentOption ?? "deposit");
11618
11713
  // Per-participant upsell selections: participantIndex -> array of upsell package IDs
11619
11714
  const [participantUpsells, setParticipantUpsells] = d$1(() => persistedState?.participantUpsells ?? {});
11715
+ const [showPaymentValidationHint, setShowPaymentValidationHint] = d$1(false);
11620
11716
  const wasOpenRef = A$2(false);
11621
11717
  const form = useForm({
11622
11718
  resolver: t(createBookingFormSchema(t$1, participantFieldsConfig)),
@@ -11740,12 +11836,22 @@
11740
11836
  const totalDiscount = calculateTotalDiscount();
11741
11837
  const totalAmount = calculateTotal();
11742
11838
  const depositAmount = calculateDeposit();
11743
- // Deposit stays fixed unless the discounted total is lower than the deposit
11744
- // (discount applies to total price, not to the deposit itself)
11745
- const hasDepositOption = depositAmount > 0 && depositAmount < totalAmount;
11746
- const paymentAmount = hasDepositOption && paymentOption === "deposit"
11747
- ? Math.min(depositAmount, totalAmount)
11748
- : totalAmount;
11839
+ const allowsDepositInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "deposits_only";
11840
+ const allowsFullInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "full_only";
11841
+ const hasConfiguredDeposit = depositAmount > 0;
11842
+ const hasDepositChoice = allowsDepositInWidget && hasConfiguredDeposit && depositAmount < totalAmount;
11843
+ const depositsOnlyBlocked = widgetPaymentMode === "deposits_only" && !hasConfiguredDeposit;
11844
+ y$1(() => {
11845
+ if (widgetPaymentMode === "deposits_only") {
11846
+ setPaymentOption("deposit");
11847
+ }
11848
+ else if (widgetPaymentMode === "full_only") {
11849
+ setPaymentOption("full");
11850
+ }
11851
+ }, [widgetPaymentMode]);
11852
+ const paymentAmount = allowsFullInWidget && (!hasDepositChoice || paymentOption === "full" || !allowsDepositInWidget)
11853
+ ? totalAmount
11854
+ : Math.min(depositAmount, totalAmount);
11749
11855
  // Convert per-participant upsells to UpsellSelection[] format for API
11750
11856
  // Includes participantIndices to track which participants selected each upsell
11751
11857
  const aggregatedUpsellSelections = q$2(() => {
@@ -11904,7 +12010,39 @@
11904
12010
  onClose();
11905
12011
  };
11906
12012
  // Footer navigation
11907
- const footerContent = (u$2(k$3, { children: [u$2("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" && (u$2("button", { type: "button", onClick: () => setCheckoutStep("payment"), disabled: !isReadyForPayment() || !hasPaymentProvider, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), children: t$1("button.continueToPayment") }))] }));
12013
+ const canContinueToPayment = isReadyForPayment();
12014
+ const handleContinueToPayment = async () => {
12015
+ if (canContinueToPayment && hasPaymentProvider) {
12016
+ setShowPaymentValidationHint(false);
12017
+ setCheckoutStep("payment");
12018
+ return;
12019
+ }
12020
+ const participantErrors = await form.trigger("participants");
12021
+ const customerErrors = await form.trigger(["customerName", "customerEmail", "acceptTerms"]);
12022
+ if (!participantErrors || !customerErrors) {
12023
+ setShowPaymentValidationHint(true);
12024
+ }
12025
+ };
12026
+ y$1(() => {
12027
+ if (showPaymentValidationHint && canContinueToPayment) {
12028
+ setShowPaymentValidationHint(false);
12029
+ }
12030
+ }, [showPaymentValidationHint, canContinueToPayment]);
12031
+ const footerContent = (u$2("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "6px" }, children: [checkoutStep === "details" && (u$2("div", { style: {
12032
+ minHeight: "14px",
12033
+ fontSize: "11px",
12034
+ color: "var(--bw-error-color)",
12035
+ textAlign: "center",
12036
+ fontFamily: "var(--bw-font-family)",
12037
+ opacity: showPaymentValidationHint ? 1 : 0,
12038
+ transition: "opacity 0.15s ease",
12039
+ pointerEvents: "none",
12040
+ }, children: t$1("payment.fillRequired") })), u$2("div", { style: { display: "flex", gap: "12px", width: "100%" }, children: [u$2("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" && (u$2("button", { type: "button", onClick: handleContinueToPayment, disabled: !hasPaymentProvider, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth, !canContinueToPayment
12041
+ ? {
12042
+ opacity: 0.55,
12043
+ cursor: "pointer",
12044
+ }
12045
+ : undefined), children: t$1("button.continueToPayment") }))] })] }));
11908
12046
  if (!eventDetails.bookingOpen) {
11909
12047
  return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.notPossible"), children: u$2("div", { style: {
11910
12048
  display: "flex",
@@ -11921,7 +12059,7 @@
11921
12059
  fontFamily: "var(--bw-font-family)",
11922
12060
  }, children: t$1("booking.notPossible") }), u$2("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t$1("booking.notPossibleMessage") })] }) }) }));
11923
12061
  }
11924
- return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: u$2("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [checkoutStep === "details" && (u$2(k$3, { children: [u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), u$2("div", { style: {
12062
+ return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: u$2("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [u$2(FlowProgress, { currentStep: checkoutStep === "details" ? "details" : "payment", hasUpsellsStep: upsells.length > 0 }), checkoutStep === "details" && (u$2(k$3, { children: [u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), u$2("div", { style: {
11925
12063
  display: "grid",
11926
12064
  gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))",
11927
12065
  gap: "12px",
@@ -12047,7 +12185,7 @@
12047
12185
  }, children: t$1("summary.giftCard", { code: giftCard.code }) }), u$2("span", { style: { color: "var(--bw-success-color)", fontFamily: "var(--bw-font-family)" }, children: ["-", formatCurrency(giftCard.balanceToUse || giftCard.discountAmount)] })] }, giftCard.code)))] })), u$2("div", { style: {
12048
12186
  borderTop: "1px solid var(--bw-border-color)",
12049
12187
  paddingTop: "12px",
12050
- }, children: [hasDepositOption && (u$2("div", { style: {
12188
+ }, children: [hasDepositChoice && (u$2("div", { style: {
12051
12189
  display: "flex",
12052
12190
  justifyContent: "space-between",
12053
12191
  alignItems: "center",
@@ -12057,7 +12195,7 @@
12057
12195
  color: "var(--bw-text-muted)",
12058
12196
  fontFamily: "var(--bw-font-family)",
12059
12197
  fontWeight: 500,
12060
- }, children: formatCurrency(totalAmount) })] })), hasDepositOption && (u$2("div", { style: {
12198
+ }, children: formatCurrency(totalAmount) })] })), hasDepositChoice && widgetPaymentMode === "all" && (u$2("div", { style: {
12061
12199
  display: "flex",
12062
12200
  gap: "8px",
12063
12201
  marginBottom: "16px",
@@ -12113,19 +12251,19 @@
12113
12251
  alignItems: "center",
12114
12252
  fontSize: "18px",
12115
12253
  fontWeight: 600,
12116
- }, children: [u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: hasDepositOption && paymentOption === "deposit"
12254
+ }, children: [u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: hasDepositChoice && paymentOption === "deposit"
12117
12255
  ? t$1("summary.payToday")
12118
12256
  : t$1("summary.totalAmount") }), u$2("span", { style: {
12119
12257
  color: "var(--bw-highlight-color)",
12120
12258
  fontFamily: "var(--bw-font-family)",
12121
12259
  fontWeight: 700,
12122
- }, children: formatCurrency(paymentAmount) })] }), hasDepositOption && paymentOption === "deposit" && (u$2("div", { style: {
12260
+ }, children: formatCurrency(paymentAmount) })] }), hasDepositChoice && paymentOption === "deposit" && (u$2("div", { style: {
12123
12261
  fontSize: "12px",
12124
12262
  color: "var(--bw-text-muted)",
12125
12263
  fontFamily: "var(--bw-font-family)",
12126
12264
  marginTop: "8px",
12127
12265
  textAlign: "right",
12128
- }, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), !hasPaymentProvider && (u$2("div", { style: cardStyles$1, children: u$2("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && (systemConfig?.paymentProvider === "mollie" ? (u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), u$2(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 })] })) : (u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), u$2(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() })] })))] }))] }) }));
12266
+ }, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), depositsOnlyBlocked && (u$2("div", { style: cardStyles$1, children: u$2("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.depositNotConfigured") }) })), !hasPaymentProvider && !depositsOnlyBlocked && (u$2("div", { style: cardStyles$1, children: u$2("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && !depositsOnlyBlocked && (systemConfig?.paymentProvider === "mollie" ? (u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), u$2(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 })] })) : (u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), u$2(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() })] })))] }))] }) }));
12129
12267
  }
12130
12268
 
12131
12269
  /**
@@ -12973,6 +13111,40 @@
12973
13111
  } }))] }));
12974
13112
  };
12975
13113
 
13114
+ function PaymentLogosStrip() {
13115
+ const logoHeight = 20;
13116
+ const logoCellStyle = {
13117
+ display: "inline-flex",
13118
+ alignItems: "center",
13119
+ justifyContent: "center",
13120
+ padding: "0px 6px",
13121
+ minHeight: "29px", // +7px from previous 22px
13122
+ borderRadius: "6px",
13123
+ };
13124
+ return (u$2("div", { style: {
13125
+ padding: "6px 14px 10px 14px",
13126
+ backgroundColor: "color-mix(in srgb, var(--bw-text-color) 100%, var(--bw-surface-color) 18%)",
13127
+ display: "flex",
13128
+ alignItems: "center",
13129
+ justifyContent: "center",
13130
+ borderRadius: "var(--bw-border-radius)",
13131
+ gap: "4px",
13132
+ flexWrap: "wrap",
13133
+ width: "fit-content",
13134
+ margin: "20px auto",
13135
+ }, children: [u$2("span", { style: logoCellStyle, children: [u$2("span", { style: { color: "#003087", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Pay" }), u$2("span", { style: { color: "#009cde", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Pal" })] }), u$2("span", { style: logoCellStyle, children: u$2("svg", { width: "34", height: logoHeight, viewBox: "0 0 34 20", "aria-label": "Maestro", children: [u$2("circle", { cx: "13", cy: "10", r: "8", fill: "#eb001b" }), u$2("circle", { cx: "21", cy: "10", r: "8", fill: "#00a2e5", fillOpacity: "0.92" })] }) }), u$2("span", { style: logoCellStyle, children: u$2("span", { style: { color: "#1434CB", fontSize: "14px", fontStyle: "italic", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "VISA" }) }), u$2("span", { style: logoCellStyle, children: u$2("span", { style: { color: "purple", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Klarna" }) }), u$2("span", { style: logoCellStyle, children: u$2("svg", { width: "74", height: logoHeight, viewBox: "0 0 74 20", "aria-label": "Amazon Pay", children: [u$2("text", { x: "0", y: "14", fontSize: "12", fill: "#111827", fontFamily: "Arial, sans-serif", children: "amazon" }), u$2("text", { x: "45", y: "14", fontSize: "12", fill: "#111827", fontFamily: "Arial, sans-serif", children: "pay" }), u$2("path", { d: "M5 15 C17 20, 35 20, 48 15", stroke: "#f59e0b", strokeWidth: "1.6", fill: "none", strokeLinecap: "round" })] }) }), u$2("span", { style: logoCellStyle, children: [u$2("span", { style: {
13136
+ fontSize: "16px",
13137
+ fontWeight: 800,
13138
+ fontFamily: "Arial, sans-serif",
13139
+ lineHeight: 1,
13140
+ background: "conic-gradient(from 25deg, #4285F4 0 24%, #DB4437 24% 48%, #F4B400 48% 73%, #0F9D58 73% 100%)",
13141
+ WebkitBackgroundClip: "text",
13142
+ backgroundClip: "text",
13143
+ color: "transparent",
13144
+ WebkitTextFillColor: "transparent",
13145
+ }, children: "G" }), u$2("span", { style: { color: "#5f6368", fontSize: "14px", fontWeight: 600, fontFamily: "Arial, sans-serif", marginLeft: "3px", lineHeight: 1 }, children: "Pay" })] }), u$2("span", { style: logoCellStyle, children: u$2("svg", { width: "60", height: logoHeight, viewBox: "0 0 60 20", "aria-label": "Apple Pay", children: [u$2("text", { x: "0", y: "14.5", fontSize: "14.5", fill: "#111827", fontFamily: "-apple-system, BlinkMacSystemFont, Arial, sans-serif", children: "\uF8FF" }), u$2("text", { x: "14", y: "14.5", fontSize: "14.5", fill: "#111827", fontFamily: "-apple-system, BlinkMacSystemFont, Arial, sans-serif", children: "Pay" })] }) })] }));
13146
+ }
13147
+
12976
13148
  function VoucherPurchaseCard({ config, minEventPrice, fallbackImages = [], onClick, standalone = false, }) {
12977
13149
  const t = useTranslations();
12978
13150
  const [activeSlideIndex, setActiveSlideIndex] = d$1(0);
@@ -14092,7 +14264,7 @@
14092
14264
  display: "flex",
14093
14265
  flexDirection: "column",
14094
14266
  justifyContent: "space-between",
14095
- height: "490px",
14267
+ height: "540px",
14096
14268
  }, children: [u$2("div", { children: [u$2("h2", { className: "event-type-title", style: {
14097
14269
  fontSize: "clamp(1.1rem, 2.5vw, 24px)",
14098
14270
  fontWeight: 700,
@@ -14162,19 +14334,9 @@
14162
14334
  }) }) })) : (u$2("div", { className: "event-type-desc", style: {
14163
14335
  margin: "10px 0",
14164
14336
  height: "7.5em", // Same height as highlights
14165
- }, children: "\u00A0" })) })] }), u$2("div", { children: [u$2("div", { children: [u$2("div", { className: "event-type-price", style: {
14166
- fontWeight: 700,
14167
- color: "var(--bw-text-color)",
14168
- fontFamily: "var(--bw-font-family)",
14169
- textAlign: "right",
14170
- }, children: u$2("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), u$2("div", { className: "event-type-price", style: {
14171
- fontSize: "clamp(1.72rem, 4vw, 32px)",
14172
- fontWeight: 700,
14173
- color: "var(--bw-text-color)",
14174
- fontFamily: "var(--bw-font-family)",
14175
- textAlign: "right",
14176
- }, children: u$2("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), (() => {
14337
+ }, children: "\u00A0" })) })] }), u$2("div", { children: [(() => {
14177
14338
  const preview = eventType.cardPreview ?? [];
14339
+ const hasMoreDates = eventType.availableInstancesCount > preview.length;
14178
14340
  return (u$2("div", { style: {
14179
14341
  marginTop: "12px",
14180
14342
  borderTop: "1px solid var(--bw-border-color)",
@@ -14208,8 +14370,33 @@
14208
14370
  transition: "background 0.15s",
14209
14371
  boxSizing: "border-box",
14210
14372
  }, children: [u$2("span", { style: { whiteSpace: "nowrap", display: "flex", alignItems: "center", gap: "3px" }, children: [item.isSpecial && (u$2("span", { style: { color: "var(--bw-highlight-color)", fontSize: "11px", lineHeight: 1 }, children: "\u2605" })), formatWeekday(item.startTime, timezone, locale), " ", formatDate(item.startTime, timezone, locale)] }), u$2("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", opacity: 0.75 }, children: item.name }), u$2("span", { style: { display: "flex", alignItems: "center", gap: "4px", whiteSpace: "nowrap" }, children: [hasDiscount && (u$2("span", { style: { textDecoration: "line-through", opacity: 0.55, fontSize: "11px" }, children: formatCurrency(item.basePrice) })), u$2("span", { style: { fontWeight: 700, color: item.isSpecial ? "var(--bw-highlight-color)" : "var(--bw-text-color)" }, children: formatCurrency(item.price) })] }), item.specialDescription ? (u$2(InfoBadge, { text: item.specialDescription })) : (u$2("span", {}))] }, item.id));
14211
- }) })] }));
14212
- })(), u$2("div", { style: {
14373
+ }) }), hasMoreDates && (u$2("button", { type: "button", onClick: (e) => {
14374
+ e.stopPropagation();
14375
+ onEventTypeSelect(eventType);
14376
+ }, style: {
14377
+ marginTop: "6px",
14378
+ padding: 0,
14379
+ border: "none",
14380
+ background: "none",
14381
+ color: "var(--bw-highlight-color)",
14382
+ fontFamily: "var(--bw-font-family)",
14383
+ fontSize: "13px",
14384
+ fontWeight: 600,
14385
+ cursor: "pointer",
14386
+ textDecoration: "underline",
14387
+ }, children: t("events.seeMoreDates") }))] }));
14388
+ })(), u$2("div", { style: { marginBottom: "16px" }, children: [u$2("div", { className: "event-type-price", style: {
14389
+ fontWeight: 700,
14390
+ color: "var(--bw-text-color)",
14391
+ fontFamily: "var(--bw-font-family)",
14392
+ textAlign: "right",
14393
+ }, children: u$2("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), u$2("div", { className: "event-type-price", style: {
14394
+ fontSize: "clamp(1.72rem, 4vw, 32px)",
14395
+ fontWeight: 700,
14396
+ color: "var(--bw-text-color)",
14397
+ fontFamily: "var(--bw-font-family)",
14398
+ textAlign: "right",
14399
+ }, children: u$2("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), u$2("div", { style: {
14213
14400
  display: "flex",
14214
14401
  justifyContent: "flex-end",
14215
14402
  alignItems: "center",
@@ -14267,7 +14454,7 @@
14267
14454
  fontFamily: "var(--bw-font-family)",
14268
14455
  boxShadow: "var(--bw-shadow-md)",
14269
14456
  }, children: t("events.soldOut") }) }))] }, eventType.id));
14270
- }) }) })), u$2(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
14457
+ }) }) })), u$2(PaymentLogosStrip, {}), u$2(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
14271
14458
  }
14272
14459
 
14273
14460
  const getAllocationBadgeInfo = (availableSpots, maxParticipants, t) => {
@@ -14394,7 +14581,7 @@
14394
14581
  boxShadow: displayInfo ? "0 2px 4px rgba(0, 0, 0, 0.2)" : "none",
14395
14582
  }, children: formatCurrency(price) }));
14396
14583
  };
14397
- function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, }) {
14584
+ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, hasUpsellsStep = false, }) {
14398
14585
  const t = useTranslations();
14399
14586
  const { locale } = useLocale();
14400
14587
  const timezone = useTimezone();
@@ -14460,88 +14647,88 @@
14460
14647
  const footerNav = (u$2("button", { type: "button", onClick: handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: t("common.back") }));
14461
14648
  // Show loading state first if we're loading event instances
14462
14649
  if (isLoadingEventInstances) {
14463
- return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: u$2("div", { style: { padding: "24px" }, children: u$2("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: Array.from({ length: 3 }).map((_, idx) => (u$2("div", { className: "skeleton-shimmer", style: {
14464
- backgroundColor: "var(--bw-surface-color)",
14465
- border: "1px solid var(--bw-border-color)",
14466
- borderRadius: "var(--bw-border-radius)",
14467
- overflow: "hidden",
14468
- }, children: [u$2("div", { style: {
14469
- display: "flex",
14470
- justifyContent: "space-between",
14471
- alignItems: "center",
14472
- padding: "16px 20px",
14473
- cursor: "pointer",
14474
- borderBottom: "1px solid var(--bw-border-color)",
14475
- }, children: [u$2("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [u$2("div", { style: {
14476
- width: "80px",
14477
- height: "20px",
14478
- backgroundColor: "var(--bw-border-color)",
14479
- borderRadius: "var(--bw-border-radius-small)",
14480
- } }), u$2("div", { style: {
14481
- width: "16px",
14482
- height: "16px",
14483
- backgroundColor: "var(--bw-border-color)",
14484
- borderRadius: "var(--bw-border-radius-small)",
14485
- } })] }), u$2("div", { style: {
14486
- width: "70px",
14487
- height: "16px",
14488
- backgroundColor: "var(--bw-highlight-color)",
14489
- opacity: 0.3,
14490
- borderRadius: "var(--bw-border-radius-small)",
14491
- } })] }), u$2("div", { style: {
14492
- display: "flex",
14493
- flexDirection: "column",
14494
- gap: "12px",
14495
- paddingTop: "12px",
14496
- padding: "12px 20px 20px 20px",
14497
- }, children: Array.from({ length: 2 }).map((_, eventIdx) => (u$2("div", { style: {
14498
- position: "relative",
14499
- border: "1px solid var(--bw-border-color)",
14500
- backgroundColor: "var(--bw-surface-color)",
14501
- borderRadius: "var(--bw-border-radius)",
14650
+ return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: u$2("div", { style: { padding: "24px" }, children: [u$2(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: Array.from({ length: 3 }).map((_, idx) => (u$2("div", { className: "skeleton-shimmer", style: {
14651
+ backgroundColor: "var(--bw-surface-color)",
14652
+ border: "1px solid var(--bw-border-color)",
14653
+ borderRadius: "var(--bw-border-radius)",
14654
+ overflow: "hidden",
14655
+ }, children: [u$2("div", { style: {
14656
+ display: "flex",
14657
+ justifyContent: "space-between",
14658
+ alignItems: "center",
14502
14659
  padding: "16px 20px",
14503
- fontFamily: "var(--bw-font-family)",
14504
- }, children: [u$2("div", { style: {
14505
- display: "flex",
14506
- justifyContent: "space-between",
14507
- width: "100%",
14508
- alignItems: "flex-start",
14509
- gap: "12px",
14510
- marginBottom: "4px",
14511
- }, children: [u$2("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [u$2("div", { style: {
14512
- width: "40px",
14513
- height: "40px",
14514
- backgroundColor: "var(--bw-background-color)",
14515
- border: "1px solid var(--bw-border-color)",
14516
- borderTopWidth: "4px",
14517
- borderRadius: "var(--bw-border-radius-small)",
14518
- } }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [u$2("div", { style: {
14519
- width: "80px",
14520
- height: "16px",
14521
- backgroundColor: "var(--bw-border-color)",
14522
- borderRadius: "var(--bw-border-radius)",
14523
- } }), u$2("div", { style: {
14524
- width: "60px",
14525
- height: "14px",
14526
- backgroundColor: "var(--bw-border-color)",
14527
- borderRadius: "var(--bw-border-radius)",
14528
- } })] })] }), u$2("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: u$2("div", { style: {
14529
- width: "70px",
14530
- height: "20px",
14531
- backgroundColor: "var(--bw-highlight-color)",
14532
- opacity: 0.3,
14533
- borderRadius: "var(--bw-border-radius)",
14534
- } }) })] }), u$2("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [u$2("div", { style: {
14535
- width: "120px",
14536
- height: "16px",
14660
+ cursor: "pointer",
14661
+ borderBottom: "1px solid var(--bw-border-color)",
14662
+ }, children: [u$2("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [u$2("div", { style: {
14663
+ width: "80px",
14664
+ height: "20px",
14537
14665
  backgroundColor: "var(--bw-border-color)",
14538
- borderRadius: "var(--bw-border-radius)",
14666
+ borderRadius: "var(--bw-border-radius-small)",
14539
14667
  } }), u$2("div", { style: {
14540
- width: "50px",
14541
- height: "20px",
14668
+ width: "16px",
14669
+ height: "16px",
14542
14670
  backgroundColor: "var(--bw-border-color)",
14543
- borderRadius: "16px",
14544
- } })] })] }, eventIdx))) })] }, idx))) }) }) }));
14671
+ borderRadius: "var(--bw-border-radius-small)",
14672
+ } })] }), u$2("div", { style: {
14673
+ width: "70px",
14674
+ height: "16px",
14675
+ backgroundColor: "var(--bw-highlight-color)",
14676
+ opacity: 0.3,
14677
+ borderRadius: "var(--bw-border-radius-small)",
14678
+ } })] }), u$2("div", { style: {
14679
+ display: "flex",
14680
+ flexDirection: "column",
14681
+ gap: "12px",
14682
+ paddingTop: "12px",
14683
+ padding: "12px 20px 20px 20px",
14684
+ }, children: Array.from({ length: 2 }).map((_, eventIdx) => (u$2("div", { style: {
14685
+ position: "relative",
14686
+ border: "1px solid var(--bw-border-color)",
14687
+ backgroundColor: "var(--bw-surface-color)",
14688
+ borderRadius: "var(--bw-border-radius)",
14689
+ padding: "16px 20px",
14690
+ fontFamily: "var(--bw-font-family)",
14691
+ }, children: [u$2("div", { style: {
14692
+ display: "flex",
14693
+ justifyContent: "space-between",
14694
+ width: "100%",
14695
+ alignItems: "flex-start",
14696
+ gap: "12px",
14697
+ marginBottom: "4px",
14698
+ }, children: [u$2("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [u$2("div", { style: {
14699
+ width: "40px",
14700
+ height: "40px",
14701
+ backgroundColor: "var(--bw-background-color)",
14702
+ border: "1px solid var(--bw-border-color)",
14703
+ borderTopWidth: "4px",
14704
+ borderRadius: "var(--bw-border-radius-small)",
14705
+ } }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [u$2("div", { style: {
14706
+ width: "80px",
14707
+ height: "16px",
14708
+ backgroundColor: "var(--bw-border-color)",
14709
+ borderRadius: "var(--bw-border-radius)",
14710
+ } }), u$2("div", { style: {
14711
+ width: "60px",
14712
+ height: "14px",
14713
+ backgroundColor: "var(--bw-border-color)",
14714
+ borderRadius: "var(--bw-border-radius)",
14715
+ } })] })] }), u$2("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: u$2("div", { style: {
14716
+ width: "70px",
14717
+ height: "20px",
14718
+ backgroundColor: "var(--bw-highlight-color)",
14719
+ opacity: 0.3,
14720
+ borderRadius: "var(--bw-border-radius)",
14721
+ } }) })] }), u$2("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [u$2("div", { style: {
14722
+ width: "120px",
14723
+ height: "16px",
14724
+ backgroundColor: "var(--bw-border-color)",
14725
+ borderRadius: "var(--bw-border-radius)",
14726
+ } }), u$2("div", { style: {
14727
+ width: "50px",
14728
+ height: "20px",
14729
+ backgroundColor: "var(--bw-border-color)",
14730
+ borderRadius: "16px",
14731
+ } })] })] }, eventIdx))) })] }, idx))) })] }) }));
14545
14732
  }
14546
14733
  // Show empty state only if not loading and no event instances
14547
14734
  if (eventInstances.length === 0) {
@@ -14560,116 +14747,116 @@
14560
14747
  fontFamily: "var(--bw-font-family)",
14561
14748
  }, children: t("instances.noAvailable") }), u$2("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t("instances.noAvailableMessage") })] }) }) }));
14562
14749
  }
14563
- return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: u$2("div", { style: { padding: "20px 10px" }, children: u$2("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: monthYearGroups.map(({ key, label, events, minPrice, year }, idx) => {
14564
- const monthPriceDisplayInfo = getMonthPriceDisplayInfo(minPrice);
14565
- return (u$2(k$3, { children: [idx > 0 && monthYearGroups[idx - 1].year !== year && (u$2("div", { style: { height: "1px", backgroundColor: "var(--bw-border-color)", margin: "4px 0" } })), u$2(Accordion, { title: label, priceInfo: u$2("div", { style: {
14566
- fontSize: "16px",
14567
- fontWeight: 500,
14568
- marginLeft: "auto",
14569
- padding: "4px 8px",
14570
- borderRadius: "var(--bw-border-radius-small)",
14571
- backgroundColor: monthPriceDisplayInfo
14572
- ? monthPriceDisplayInfo.backgroundColor
14573
- : "#14532d",
14574
- color: monthPriceDisplayInfo
14575
- ? monthPriceDisplayInfo.textColor
14576
- : "#4ade80",
14577
- boxShadow: monthPriceDisplayInfo
14578
- ? "0 2px 4px rgba(0, 0, 0, 0.2)"
14579
- : undefined,
14580
- }, children: `${t("common.from")} ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", paddingTop: "12px" }, children: events.map((event) => {
14581
- const availableSpots = event.maxParticipants - event.participantCount;
14582
- const isFullyBooked = availableSpots === 0;
14583
- const startDate = new Date(event.startTime);
14584
- const isPastEvent = today.toISOString() >= startDate.toISOString();
14585
- const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
14586
- return (u$2("div", { style: {
14587
- position: "relative",
14588
- border: "1px solid var(--bw-border-color)",
14589
- backgroundColor: "var(--bw-surface-color)",
14590
- borderRadius: "var(--bw-border-radius)",
14591
- padding: "16px 10px",
14592
- transition: "all 0.2s ease",
14593
- fontFamily: "var(--bw-font-family)",
14594
- opacity: isDisabled ? 0.3 : 1,
14595
- filter: isDisabled ? "grayscale(40%)" : "none",
14596
- cursor: isDisabled ? "not-allowed" : "pointer",
14597
- }, onClick: () => {
14598
- if (!isDisabled) {
14599
- handleEventInstanceSelect(event);
14600
- }
14601
- }, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (u$2("div", { style: {
14602
- position: "absolute",
14603
- inset: 0,
14604
- backgroundColor: "rgba(15, 23, 42, 0.8)",
14605
- borderRadius: "var(--bw-border-radius)",
14606
- display: "flex",
14607
- alignItems: "center",
14608
- justifyContent: "center",
14609
- }, children: u$2("div", { style: {
14610
- width: "32px",
14611
- height: "32px",
14612
- color: "var(--bw-highlight-color)",
14613
- opacity: 0.8,
14614
- fontSize: "32px",
14615
- }, children: spinner() }) })), u$2(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices, t: t }), u$2(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.maxParticipants, t: t }), u$2("div", { style: {
14616
- display: "flex",
14617
- justifyContent: "space-between",
14618
- width: "100%",
14619
- alignItems: "flex-start",
14620
- gap: "12px",
14621
- marginBottom: "4px",
14622
- }, children: [u$2("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [u$2("div", { style: {
14623
- fontSize: "16px",
14624
- transition: "all 0.2s ease",
14625
- borderRadius: "var(--bw-border-radius-small)",
14626
- borderTop: "4px solid var(--bw-border-color)",
14627
- border: "1px solid var(--bw-border-color)",
14628
- width: "40px",
14629
- height: "40px",
14630
- display: "flex",
14631
- alignItems: "center",
14632
- justifyContent: "center",
14633
- fontWeight: 700,
14634
- color: "var(--bw-text-color)",
14635
- backgroundColor: "var(--bw-background-color)",
14636
- }, children: startDate.getDate() }), u$2("div", { style: {
14637
- fontSize: "16px",
14638
- color: "var(--bw-text-color)",
14639
- display: "flex",
14640
- flexDirection: "column",
14641
- alignItems: "flex-start",
14642
- justifyContent: "flex-start",
14643
- lineHeight: 1.25,
14644
- }, children: [u$2("div", { children: [u$2("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), formatWeekday(event.startTime, timezone, locale) !==
14645
- formatWeekday(event.endTime, timezone, locale) && (u$2(k$3, { children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), u$2("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), u$2("div", { children: formatWeekday(event.startTime, timezone, locale) ===
14646
- formatWeekday(event.endTime, timezone, locale) ? (u$2(k$3, { children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), u$2("span", { style: {
14647
- fontSize: "12px",
14648
- fontWeight: 400,
14649
- color: "var(--bw-text-muted)",
14650
- marginLeft: "6px",
14651
- backgroundColor: "rgba(0, 0, 0, 0.05)",
14652
- whiteSpace: "nowrap",
14653
- padding: "2px 6px",
14654
- borderRadius: "var(--bw-border-radius-small)",
14655
- }, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), u$2("div", { style: {
14656
- textAlign: "right",
14657
- display: "flex",
14658
- flexDirection: "column",
14659
- alignItems: "flex-end",
14660
- }, children: u$2(PriceDisplay, { price: event.price, yearPrices: yearPrices, t: t }) })] }), event.name !== selectedEventType?.name && (u$2("h4", { style: {
14661
- fontSize: "16px",
14662
- fontWeight: 600,
14663
- color: "var(--bw-text-color)",
14664
- lineHeight: 1.25,
14665
- margin: "0 0 2px 0",
14666
- display: "flex",
14667
- alignItems: "center",
14668
- gap: "8px",
14669
- maxWidth: "230px",
14670
- }, children: event.name }))] }, event.id));
14671
- }) }) })] }, key));
14672
- }) }) }) }));
14750
+ return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: u$2("div", { style: { padding: "20px 10px" }, children: [u$2(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: monthYearGroups.map(({ key, label, events, minPrice, year }, idx) => {
14751
+ const monthPriceDisplayInfo = getMonthPriceDisplayInfo(minPrice);
14752
+ return (u$2(k$3, { children: [idx > 0 && monthYearGroups[idx - 1].year !== year && (u$2("div", { style: { height: "1px", backgroundColor: "var(--bw-border-color)", margin: "4px 0" } })), u$2(Accordion, { title: label, priceInfo: u$2("div", { style: {
14753
+ fontSize: "16px",
14754
+ fontWeight: 500,
14755
+ marginLeft: "auto",
14756
+ padding: "4px 8px",
14757
+ borderRadius: "var(--bw-border-radius-small)",
14758
+ backgroundColor: monthPriceDisplayInfo
14759
+ ? monthPriceDisplayInfo.backgroundColor
14760
+ : "#14532d",
14761
+ color: monthPriceDisplayInfo
14762
+ ? monthPriceDisplayInfo.textColor
14763
+ : "#4ade80",
14764
+ boxShadow: monthPriceDisplayInfo
14765
+ ? "0 2px 4px rgba(0, 0, 0, 0.2)"
14766
+ : undefined,
14767
+ }, children: `${t("common.from")} ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", paddingTop: "12px" }, children: events.map((event) => {
14768
+ const availableSpots = event.maxParticipants - event.participantCount;
14769
+ const isFullyBooked = availableSpots === 0;
14770
+ const startDate = new Date(event.startTime);
14771
+ const isPastEvent = today.toISOString() >= startDate.toISOString();
14772
+ const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
14773
+ return (u$2("div", { style: {
14774
+ position: "relative",
14775
+ border: "1px solid var(--bw-border-color)",
14776
+ backgroundColor: "var(--bw-surface-color)",
14777
+ borderRadius: "var(--bw-border-radius)",
14778
+ padding: "16px 10px",
14779
+ transition: "all 0.2s ease",
14780
+ fontFamily: "var(--bw-font-family)",
14781
+ opacity: isDisabled ? 0.3 : 1,
14782
+ filter: isDisabled ? "grayscale(40%)" : "none",
14783
+ cursor: isDisabled ? "not-allowed" : "pointer",
14784
+ }, onClick: () => {
14785
+ if (!isDisabled) {
14786
+ handleEventInstanceSelect(event);
14787
+ }
14788
+ }, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (u$2("div", { style: {
14789
+ position: "absolute",
14790
+ inset: 0,
14791
+ backgroundColor: "rgba(15, 23, 42, 0.8)",
14792
+ borderRadius: "var(--bw-border-radius)",
14793
+ display: "flex",
14794
+ alignItems: "center",
14795
+ justifyContent: "center",
14796
+ }, children: u$2("div", { style: {
14797
+ width: "32px",
14798
+ height: "32px",
14799
+ color: "var(--bw-highlight-color)",
14800
+ opacity: 0.8,
14801
+ fontSize: "32px",
14802
+ }, children: spinner() }) })), u$2(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices, t: t }), u$2(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.maxParticipants, t: t }), u$2("div", { style: {
14803
+ display: "flex",
14804
+ justifyContent: "space-between",
14805
+ width: "100%",
14806
+ alignItems: "flex-start",
14807
+ gap: "12px",
14808
+ marginBottom: "4px",
14809
+ }, children: [u$2("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [u$2("div", { style: {
14810
+ fontSize: "16px",
14811
+ transition: "all 0.2s ease",
14812
+ borderRadius: "var(--bw-border-radius-small)",
14813
+ borderTop: "4px solid var(--bw-border-color)",
14814
+ border: "1px solid var(--bw-border-color)",
14815
+ width: "40px",
14816
+ height: "40px",
14817
+ display: "flex",
14818
+ alignItems: "center",
14819
+ justifyContent: "center",
14820
+ fontWeight: 700,
14821
+ color: "var(--bw-text-color)",
14822
+ backgroundColor: "var(--bw-background-color)",
14823
+ }, children: startDate.getDate() }), u$2("div", { style: {
14824
+ fontSize: "16px",
14825
+ color: "var(--bw-text-color)",
14826
+ display: "flex",
14827
+ flexDirection: "column",
14828
+ alignItems: "flex-start",
14829
+ justifyContent: "flex-start",
14830
+ lineHeight: 1.25,
14831
+ }, children: [u$2("div", { children: [u$2("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), formatWeekday(event.startTime, timezone, locale) !==
14832
+ formatWeekday(event.endTime, timezone, locale) && (u$2(k$3, { children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), u$2("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), u$2("div", { children: formatWeekday(event.startTime, timezone, locale) ===
14833
+ formatWeekday(event.endTime, timezone, locale) ? (u$2(k$3, { children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), u$2("span", { style: {
14834
+ fontSize: "12px",
14835
+ fontWeight: 400,
14836
+ color: "var(--bw-text-muted)",
14837
+ marginLeft: "6px",
14838
+ backgroundColor: "rgba(0, 0, 0, 0.05)",
14839
+ whiteSpace: "nowrap",
14840
+ padding: "2px 6px",
14841
+ borderRadius: "var(--bw-border-radius-small)",
14842
+ }, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), u$2("div", { style: {
14843
+ textAlign: "right",
14844
+ display: "flex",
14845
+ flexDirection: "column",
14846
+ alignItems: "flex-end",
14847
+ }, children: u$2(PriceDisplay, { price: event.price, yearPrices: yearPrices, t: t }) })] }), event.name !== selectedEventType?.name && (u$2("h4", { style: {
14848
+ fontSize: "16px",
14849
+ fontWeight: 600,
14850
+ color: "var(--bw-text-color)",
14851
+ lineHeight: 1.25,
14852
+ margin: "0 0 2px 0",
14853
+ display: "flex",
14854
+ alignItems: "center",
14855
+ gap: "8px",
14856
+ maxWidth: "230px",
14857
+ }, children: event.name }))] }, event.id));
14858
+ }) }) })] }, key));
14859
+ }) })] }) }));
14673
14860
  }
14674
14861
 
14675
14862
  function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText, showAllButton, isLoadingEventDetails = false, isLoadingShowAll = false, isLoading = false, }) {
@@ -15528,7 +15715,7 @@
15528
15715
  const isSelected = (upsellId) => selectedUpsells.some((s) => s.upsellPackageId === upsellId);
15529
15716
  const selectedCount = selectedUpsells.length;
15530
15717
  const footerContent = (u$2(k$3, { children: [u$2("button", { type: "button", onClick: onBack, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), className: buttonClassName, children: t("common.back") }), u$2("button", { type: "button", onClick: onContinue, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), className: buttonClassName, children: selectedCount === 0 ? t("button.continueWithout") : t("button.continue") })] }));
15531
- return (u$2(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: u$2("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [isLoading && (u$2("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), u$2("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (u$2("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: u$2("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (u$2(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (u$2("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: u$2("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
15718
+ return (u$2(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: u$2("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [u$2(FlowProgress, { currentStep: "upsells", hasUpsellsStep: true }), isLoading && (u$2("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), u$2("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (u$2("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: u$2("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (u$2(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (u$2("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: u$2("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
15532
15719
  }
15533
15720
 
15534
15721
  /**
@@ -15669,6 +15856,7 @@
15669
15856
  const [bookingPersistedState, setBookingPersistedState] = d$1(null);
15670
15857
  const [isLoadingUpsells, setIsLoadingUpsells] = d$1(false);
15671
15858
  const [tempParticipantCount, setTempParticipantCount] = d$1(1); // Used during upsell step
15859
+ const hasUpsellsFlowStep = upsells.length > 0 || currentStep === "upsells";
15672
15860
  // State for upcoming events (next-events view mode)
15673
15861
  const [upcomingEvents, setUpcomingEvents] = d$1([]);
15674
15862
  const [showingPreview, setShowingPreview] = d$1(true);
@@ -15795,6 +15983,7 @@
15795
15983
  ...(data.mollieProfileId ? { mollieProfileId: data.mollieProfileId } : {}),
15796
15984
  ...(data.mollieTestmode !== undefined ? { mollieTestmode: data.mollieTestmode } : {}),
15797
15985
  roundPricesEnabled: data.roundPricesEnabled ?? true,
15986
+ widgetPaymentMode: data.widgetPaymentMode ?? "all",
15798
15987
  });
15799
15988
  }
15800
15989
  }
@@ -16159,6 +16348,7 @@
16159
16348
  mollieProfileId: data.mollieProfileId,
16160
16349
  mollieTestmode: data.mollieTestmode,
16161
16350
  roundPricesEnabled: data.roundPricesEnabled ?? true,
16351
+ widgetPaymentMode: data.widgetPaymentMode ?? "all",
16162
16352
  });
16163
16353
  }
16164
16354
  if (data.stripePublishableKey) {
@@ -16219,6 +16409,7 @@
16219
16409
  mollieProfileId: data.mollieProfileId,
16220
16410
  mollieTestmode: data.mollieTestmode,
16221
16411
  roundPricesEnabled: data.roundPricesEnabled ?? true,
16412
+ widgetPaymentMode: data.widgetPaymentMode ?? "all",
16222
16413
  });
16223
16414
  if (!stripePromise && data.stripePublishableKey) {
16224
16415
  const stripeOptions = {
@@ -16727,7 +16918,7 @@
16727
16918
  }, isOpen: currentStep === "eventInstances", onClose: () => {
16728
16919
  setShowingPreview(true);
16729
16920
  setCurrentStep("eventTypes");
16730
- }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16921
+ }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16731
16922
  setIsSuccess(false);
16732
16923
  setCurrentStep("eventTypes");
16733
16924
  setShowingPreview(true);
@@ -16770,7 +16961,7 @@
16770
16961
  setShouldRenderInstanceSelection(true);
16771
16962
  }
16772
16963
  }, children: config.buttonText ||
16773
- (isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(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 })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16964
+ (isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(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 })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16774
16965
  setIsSuccess(false);
16775
16966
  setCurrentStep("eventTypes");
16776
16967
  setSidebarOpen(false);
@@ -16831,7 +17022,7 @@
16831
17022
  };
16832
17023
  };
16833
17024
  const backHandlers = getBackHandlers();
16834
- return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(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 })), u$2(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
17025
+ return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(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 })), u$2(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
16835
17026
  setIsSuccess(false);
16836
17027
  setCurrentStep("eventTypes");
16837
17028
  setSuccessPaymentId(null);