@bigz-app/booking-widget 1.4.0 → 1.4.2

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.esm.js CHANGED
@@ -213,6 +213,7 @@ const de$1 = {
213
213
  // Buttons
214
214
  "button.bookNow": "Jetzt buchen",
215
215
  "button.selectDate": "Jetzt Termin auswählen",
216
+ "button.viewDates": "Termine ansehen",
216
217
  "button.moreDetails": "Mehr Details",
217
218
  "button.toPayment": "Zur Zahlung ↓",
218
219
  "button.redeem": "Einlösen",
@@ -236,6 +237,7 @@ const de$1 = {
236
237
  "events.availableFrom": "Freie Plätze ab {{date}}",
237
238
  "events.noAvailableDates": "Keine Termine frei",
238
239
  "events.previewSectionTitle": "Specials & nächste Termine",
240
+ "events.seeMoreDates": "Weitere Termine ansehen...",
239
241
  // Event instances
240
242
  "instances.title": "Terminauswahl",
241
243
  "instances.noAvailable": "Keine verfügbaren Termine",
@@ -250,7 +252,7 @@ const de$1 = {
250
252
  "nextEvents.subtitle": "Wähle einen Termin aus oder zeige alle verfügbaren Termine an",
251
253
  "nextEvents.noUpcoming": "Keine bevorstehenden Termine",
252
254
  "nextEvents.noUpcomingMessage": "Aktuell sind keine Termine verfügbar. Bitte schaue später noch einmal vorbei oder kontaktiere uns direkt.",
253
- "nextEvents.showAll": "Alle Events anzeigen",
255
+ "nextEvents.showAll": "Weitere Termine ansehen...",
254
256
  "nextEvents.priceOnRequest": "Preis auf Anfrage",
255
257
  // Specials view
256
258
  "specials.title": "Sonderangebote",
@@ -289,6 +291,10 @@ const de$1 = {
289
291
  "booking.maxSpotsReached": "Maximal {{count}} Plätze verfügbar.",
290
292
  "booking.comment": "Kommentar (optional)",
291
293
  "booking.commentPlaceholder": "Zusätzliche Anmerkungen zur Buchung...",
294
+ "booking.stepDate": "Termin",
295
+ "booking.stepUpsells": "Extras",
296
+ "booking.stepDetails": "Angaben",
297
+ "booking.stepPayment": "Zahlung",
292
298
  // Booking summary
293
299
  "summary.title": "Buchungszusammenfassung",
294
300
  "summary.subtotal": "Zwischensumme:",
@@ -421,6 +427,7 @@ const de$1 = {
421
427
  "upsells.selectedPlural": "{{count}} Extras ausgewählt",
422
428
  "upsells.savePercent": "{{percent}}% sparen",
423
429
  "booking.paymentUnavailable": "Online-Zahlung ist für diese Buchung nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
430
+ "booking.depositNotConfigured": "Online-Anzahlung ist für dieses Event nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
424
431
  "upsells.spotsFree": "{{count}} Plätze frei",
425
432
  "upsells.notAvailable": "Nicht verfügbar",
426
433
  "upsells.reason.outOfStock": "{{productName}} ist nicht auf Lager",
@@ -446,6 +453,9 @@ const de$1 = {
446
453
  "promo.giftCode": "Dein Geschenk-Code",
447
454
  "promo.copied": "Kopiert!",
448
455
  "promo.copy": "Kopieren",
456
+ "trust.securePayment": "Sichere Zahlung",
457
+ "trust.paypal": "PayPal",
458
+ "trust.stripe": "Stripe",
449
459
  };
450
460
 
451
461
  const en = {
@@ -493,6 +503,7 @@ const en = {
493
503
  // Buttons
494
504
  "button.bookNow": "Book now",
495
505
  "button.selectDate": "Select a date",
506
+ "button.viewDates": "View dates",
496
507
  "button.moreDetails": "More details",
497
508
  "button.toPayment": "To payment ↓",
498
509
  "button.redeem": "Redeem",
@@ -516,6 +527,7 @@ const en = {
516
527
  "events.availableFrom": "Available from {{date}}",
517
528
  "events.noAvailableDates": "No dates available",
518
529
  "events.previewSectionTitle": "Specials & upcoming dates",
530
+ "events.seeMoreDates": "See more dates...",
519
531
  // Event instances
520
532
  "instances.title": "Select a date",
521
533
  "instances.noAvailable": "No available dates",
@@ -530,7 +542,7 @@ const en = {
530
542
  "nextEvents.subtitle": "Select a date or view all available dates",
531
543
  "nextEvents.noUpcoming": "No upcoming dates",
532
544
  "nextEvents.noUpcomingMessage": "There are currently no dates available. Please check back later or contact us directly.",
533
- "nextEvents.showAll": "Show all events",
545
+ "nextEvents.showAll": "See more dates...",
534
546
  "nextEvents.priceOnRequest": "Price on request",
535
547
  // Specials view
536
548
  "specials.title": "Special Offers",
@@ -569,6 +581,10 @@ const en = {
569
581
  "booking.maxSpotsReached": "Maximum {{count}} spots available.",
570
582
  "booking.comment": "Comment (optional)",
571
583
  "booking.commentPlaceholder": "Additional notes for the booking...",
584
+ "booking.stepDate": "Date",
585
+ "booking.stepUpsells": "Extras",
586
+ "booking.stepDetails": "Details",
587
+ "booking.stepPayment": "Payment",
572
588
  // Booking summary
573
589
  "summary.title": "Booking Summary",
574
590
  "summary.subtotal": "Subtotal:",
@@ -701,6 +717,7 @@ const en = {
701
717
  "upsells.selectedPlural": "{{count}} extras selected",
702
718
  "upsells.savePercent": "Save {{percent}}%",
703
719
  "booking.paymentUnavailable": "Online payment is not available for this booking. Please contact us to complete your reservation.",
720
+ "booking.depositNotConfigured": "Online deposit payment is not available for this event. Please contact us to complete your reservation.",
704
721
  "upsells.spotsFree": "{{count}} spots available",
705
722
  "upsells.notAvailable": "Not available",
706
723
  "upsells.reason.outOfStock": "{{productName}} is out of stock",
@@ -726,6 +743,9 @@ const en = {
726
743
  "promo.giftCode": "Your gift code",
727
744
  "promo.copied": "Copied!",
728
745
  "promo.copy": "Copy",
746
+ "trust.securePayment": "Secure payment",
747
+ "trust.paypal": "PayPal",
748
+ "trust.stripe": "Stripe",
729
749
  };
730
750
 
731
751
  const es = {
@@ -773,6 +793,7 @@ const es = {
773
793
  // Buttons
774
794
  "button.bookNow": "Reservar ahora",
775
795
  "button.selectDate": "Seleccionar fecha",
796
+ "button.viewDates": "Ver fechas",
776
797
  "button.moreDetails": "Más detalles",
777
798
  "button.toPayment": "Al pago ↓",
778
799
  "button.redeem": "Canjear",
@@ -796,6 +817,7 @@ const es = {
796
817
  "events.availableFrom": "Disponible desde {{date}}",
797
818
  "events.noAvailableDates": "Sin fechas disponibles",
798
819
  "events.previewSectionTitle": "Especiales & próximas fechas",
820
+ "events.seeMoreDates": "Ver más fechas...",
799
821
  // Event instances
800
822
  "instances.title": "Seleccionar fecha",
801
823
  "instances.noAvailable": "Sin fechas disponibles",
@@ -810,7 +832,7 @@ const es = {
810
832
  "nextEvents.subtitle": "Selecciona una fecha o consulta todas las fechas disponibles",
811
833
  "nextEvents.noUpcoming": "Sin próximas fechas",
812
834
  "nextEvents.noUpcomingMessage": "Actualmente no hay fechas disponibles. Por favor, vuelve más tarde o contáctanos directamente.",
813
- "nextEvents.showAll": "Mostrar todos los eventos",
835
+ "nextEvents.showAll": "Ver más fechas...",
814
836
  "nextEvents.priceOnRequest": "Precio bajo consulta",
815
837
  // Specials view
816
838
  "specials.title": "Ofertas especiales",
@@ -849,6 +871,10 @@ const es = {
849
871
  "booking.maxSpotsReached": "Máximo {{count}} plazas disponibles.",
850
872
  "booking.comment": "Comentario (opcional)",
851
873
  "booking.commentPlaceholder": "Notas adicionales para la reserva...",
874
+ "booking.stepDate": "Fecha",
875
+ "booking.stepUpsells": "Extras",
876
+ "booking.stepDetails": "Datos",
877
+ "booking.stepPayment": "Pago",
852
878
  // Booking summary
853
879
  "summary.title": "Resumen de la reserva",
854
880
  "summary.subtotal": "Subtotal:",
@@ -981,6 +1007,7 @@ const es = {
981
1007
  "upsells.selectedPlural": "{{count}} extras seleccionados",
982
1008
  "upsells.savePercent": "Ahorra {{percent}}%",
983
1009
  "booking.paymentUnavailable": "El pago en línea no está disponible para esta reserva. Contáctanos para completarla.",
1010
+ "booking.depositNotConfigured": "El pago de depósito en línea no está disponible para este evento. Contáctanos para completar la reserva.",
984
1011
  "upsells.spotsFree": "{{count}} plazas disponibles",
985
1012
  "upsells.notAvailable": "No disponible",
986
1013
  "upsells.reason.outOfStock": "{{productName}} está agotado",
@@ -1006,6 +1033,9 @@ const es = {
1006
1033
  "promo.giftCode": "Tu codigo de regalo",
1007
1034
  "promo.copied": "Copiado!",
1008
1035
  "promo.copy": "Copiar",
1036
+ "trust.securePayment": "Pago seguro",
1037
+ "trust.paypal": "PayPal",
1038
+ "trust.stripe": "Stripe",
1009
1039
  };
1010
1040
 
1011
1041
  const pt = {
@@ -1053,6 +1083,7 @@ const pt = {
1053
1083
  // Buttons
1054
1084
  "button.bookNow": "Reservar agora",
1055
1085
  "button.selectDate": "Selecionar data",
1086
+ "button.viewDates": "Ver datas",
1056
1087
  "button.moreDetails": "Mais detalhes",
1057
1088
  "button.toPayment": "Para pagamento ↓",
1058
1089
  "button.redeem": "Resgatar",
@@ -1076,6 +1107,7 @@ const pt = {
1076
1107
  "events.availableFrom": "Disponível a partir de {{date}}",
1077
1108
  "events.noAvailableDates": "Sem datas disponíveis",
1078
1109
  "events.previewSectionTitle": "Especiais & próximas datas",
1110
+ "events.seeMoreDates": "Ver mais datas...",
1079
1111
  // Event instances
1080
1112
  "instances.title": "Selecionar data",
1081
1113
  "instances.noAvailable": "Sem datas disponíveis",
@@ -1090,7 +1122,7 @@ const pt = {
1090
1122
  "nextEvents.subtitle": "Selecione uma data ou veja todas as datas disponíveis",
1091
1123
  "nextEvents.noUpcoming": "Sem próximas datas",
1092
1124
  "nextEvents.noUpcomingMessage": "Atualmente não há datas disponíveis. Por favor, volte mais tarde ou contacte-nos diretamente.",
1093
- "nextEvents.showAll": "Mostrar todos os eventos",
1125
+ "nextEvents.showAll": "Ver mais datas...",
1094
1126
  "nextEvents.priceOnRequest": "Preço sob consulta",
1095
1127
  // Specials view
1096
1128
  "specials.title": "Ofertas especiais",
@@ -1129,6 +1161,10 @@ const pt = {
1129
1161
  "booking.maxSpotsReached": "Máximo {{count}} lugares disponíveis.",
1130
1162
  "booking.comment": "Comentário (opcional)",
1131
1163
  "booking.commentPlaceholder": "Notas adicionais para a reserva...",
1164
+ "booking.stepDate": "Data",
1165
+ "booking.stepUpsells": "Extras",
1166
+ "booking.stepDetails": "Dados",
1167
+ "booking.stepPayment": "Pagamento",
1132
1168
  // Booking summary
1133
1169
  "summary.title": "Resumo da reserva",
1134
1170
  "summary.subtotal": "Subtotal:",
@@ -1261,6 +1297,7 @@ const pt = {
1261
1297
  "upsells.selectedPlural": "{{count}} extras selecionados",
1262
1298
  "upsells.savePercent": "Poupa {{percent}}%",
1263
1299
  "booking.paymentUnavailable": "O pagamento online não está disponível para esta reserva. Contacta-nos para concluir a reserva.",
1300
+ "booking.depositNotConfigured": "O pagamento de depósito online não está disponível para este evento. Contacta-nos para concluir a reserva.",
1264
1301
  "upsells.spotsFree": "{{count}} lugares disponíveis",
1265
1302
  "upsells.notAvailable": "Não disponível",
1266
1303
  "upsells.reason.outOfStock": "{{productName}} está esgotado",
@@ -1286,6 +1323,9 @@ const pt = {
1286
1323
  "promo.giftCode": "O teu codigo de oferta",
1287
1324
  "promo.copied": "Copiado!",
1288
1325
  "promo.copy": "Copiar",
1326
+ "trust.securePayment": "Pagamento seguro",
1327
+ "trust.paypal": "PayPal",
1328
+ "trust.stripe": "Stripe",
1289
1329
  };
1290
1330
 
1291
1331
  const sv = {
@@ -1333,6 +1373,7 @@ const sv = {
1333
1373
  // Buttons
1334
1374
  "button.bookNow": "Boka nu",
1335
1375
  "button.selectDate": "Välj datum",
1376
+ "button.viewDates": "Visa datum",
1336
1377
  "button.moreDetails": "Mer information",
1337
1378
  "button.toPayment": "Till betalning ↓",
1338
1379
  "button.redeem": "Lös in",
@@ -1356,6 +1397,7 @@ const sv = {
1356
1397
  "events.availableFrom": "Lediga platser från {{date}}",
1357
1398
  "events.noAvailableDates": "Inga datum lediga",
1358
1399
  "events.previewSectionTitle": "Specials & kommande datum",
1400
+ "events.seeMoreDates": "Se fler datum...",
1359
1401
  // Event instances
1360
1402
  "instances.title": "Välj datum",
1361
1403
  "instances.noAvailable": "Inga tillgängliga datum",
@@ -1370,7 +1412,7 @@ const sv = {
1370
1412
  "nextEvents.subtitle": "Välj ett datum eller visa alla tillgängliga datum",
1371
1413
  "nextEvents.noUpcoming": "Inga kommande datum",
1372
1414
  "nextEvents.noUpcomingMessage": "Det finns för närvarande inga datum tillgängliga. Kom tillbaka senare eller kontakta oss direkt.",
1373
- "nextEvents.showAll": "Visa alla evenemang",
1415
+ "nextEvents.showAll": "Se fler datum...",
1374
1416
  "nextEvents.priceOnRequest": "Pris på förfrågan",
1375
1417
  // Specials view
1376
1418
  "specials.title": "Specialerbjudanden",
@@ -1409,6 +1451,10 @@ const sv = {
1409
1451
  "booking.maxSpotsReached": "Maximalt {{count}} platser tillgängliga.",
1410
1452
  "booking.comment": "Kommentar (valfritt)",
1411
1453
  "booking.commentPlaceholder": "Ytterligare anteckningar för bokningen...",
1454
+ "booking.stepDate": "Datum",
1455
+ "booking.stepUpsells": "Tillägg",
1456
+ "booking.stepDetails": "Uppgifter",
1457
+ "booking.stepPayment": "Betalning",
1412
1458
  // Booking summary
1413
1459
  "summary.title": "Bokningssammanfattning",
1414
1460
  "summary.subtotal": "Delsumma:",
@@ -1541,6 +1587,7 @@ const sv = {
1541
1587
  "upsells.selectedPlural": "{{count}} tillägg valda",
1542
1588
  "upsells.savePercent": "Spara {{percent}}%",
1543
1589
  "booking.paymentUnavailable": "Onlinebetalning är inte tillgänglig för denna bokning. Kontakta oss för att slutföra bokningen.",
1590
+ "booking.depositNotConfigured": "Online deposition är inte tillgänglig för detta evenemang. Kontakta oss för att slutföra bokningen.",
1544
1591
  "upsells.spotsFree": "{{count}} platser lediga",
1545
1592
  "upsells.notAvailable": "Inte tillgängligt",
1546
1593
  "upsells.reason.outOfStock": "{{productName}} är slut i lager",
@@ -1566,6 +1613,9 @@ const sv = {
1566
1613
  "promo.giftCode": "Din presentkod",
1567
1614
  "promo.copied": "Kopierad!",
1568
1615
  "promo.copy": "Kopiera",
1616
+ "trust.securePayment": "Säker betalning",
1617
+ "trust.paypal": "PayPal",
1618
+ "trust.stripe": "Stripe",
1569
1619
  };
1570
1620
 
1571
1621
  const SUPPORTED_LOCALES = ["de", "en", "es", "sv", "pt"];
@@ -2250,7 +2300,7 @@ const createApiHeaders = (_config, locale) => {
2250
2300
  return {
2251
2301
  "Content-Type": "application/json",
2252
2302
  "X-Origin-Url": window.location.href,
2253
- "X-Language": locale ?? navigator.language,
2303
+ "X-Language": locale,
2254
2304
  "X-User-Agent": navigator.userAgent,
2255
2305
  };
2256
2306
  };
@@ -6237,6 +6287,7 @@ const IconChevronRight = ({ size = 20, color = "white", className, }) => (jsx("s
6237
6287
 
6238
6288
  function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, giftCards, onSuccess, onError, upsellSelections = [], }) {
6239
6289
  const t = useTranslations();
6290
+ const { locale } = useLocale();
6240
6291
  const [isLoading, setIsLoading] = useState(false);
6241
6292
  const [error, setError] = useState(null);
6242
6293
  const handleBooking = async () => {
@@ -6258,7 +6309,7 @@ function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, gif
6258
6309
  };
6259
6310
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-gift-card-booking"), {
6260
6311
  method: "POST",
6261
- headers: createApiHeaders(config),
6312
+ headers: createApiHeaders(config, locale),
6262
6313
  body: JSON.stringify(createRequestBody(config, requestData)),
6263
6314
  });
6264
6315
  const data = await response.json();
@@ -6409,7 +6460,7 @@ function MolliePaymentForm({ config, eventDetails, formData, totalAmount, discou
6409
6460
  try {
6410
6461
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/mollie-methods"), {
6411
6462
  method: "POST",
6412
- headers: createApiHeaders(config),
6463
+ headers: createApiHeaders(config, locale),
6413
6464
  body: JSON.stringify(createRequestBody(config, {
6414
6465
  organizationId: config.organizationId,
6415
6466
  amount: Math.round(totalAmount),
@@ -6552,7 +6603,7 @@ function MolliePaymentForm({ config, eventDetails, formData, totalAmount, discou
6552
6603
  }
6553
6604
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-mollie-payment"), {
6554
6605
  method: "POST",
6555
- headers: createApiHeaders(config),
6606
+ headers: createApiHeaders(config, locale),
6556
6607
  body: JSON.stringify(createRequestBody(config, buildRequestData(token))),
6557
6608
  });
6558
6609
  const data = await response.json();
@@ -6588,7 +6639,7 @@ function MolliePaymentForm({ config, eventDetails, formData, totalAmount, discou
6588
6639
  }
6589
6640
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-mollie-payment"), {
6590
6641
  method: "POST",
6591
- headers: createApiHeaders(config),
6642
+ headers: createApiHeaders(config, locale),
6592
6643
  body: JSON.stringify(createRequestBody(config, buildRequestData())),
6593
6644
  });
6594
6645
  const data = await response.json();
@@ -6786,6 +6837,7 @@ function PaymentFormInner({ eventDetails, formData, totalAmount, onSuccess, onEr
6786
6837
  }
6787
6838
  function StripePaymentForm({ config, eventDetails, formData, totalAmount, discountCode, giftCards, onSuccess, onError, systemConfig, stripePromise, stripeAppearance, upsellSelections = [], }) {
6788
6839
  const t = useTranslations();
6840
+ const { locale } = useLocale();
6789
6841
  const [clientSecret, setClientSecret] = useState(null);
6790
6842
  const [paymentIntentId, setPaymentIntentId] = useState(null);
6791
6843
  const [isCreatingPaymentIntent, setIsCreatingPaymentIntent] = useState(false);
@@ -6888,7 +6940,7 @@ function StripePaymentForm({ config, eventDetails, formData, totalAmount, discou
6888
6940
  }
6889
6941
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-stripe-payment"), {
6890
6942
  method: "POST",
6891
- headers: createApiHeaders(config),
6943
+ headers: createApiHeaders(config, locale),
6892
6944
  body: JSON.stringify(createRequestBody(config, requestData)),
6893
6945
  });
6894
6946
  const data = await response.json();
@@ -7264,10 +7316,60 @@ function Accordion({ title, priceInfo, children, isOpen, onToggle, }) {
7264
7316
  }, children: children }))] }));
7265
7317
  }
7266
7318
 
7319
+ function FlowProgress({ currentStep, hasUpsellsStep }) {
7320
+ const t = useTranslations();
7321
+ const steps = hasUpsellsStep
7322
+ ? [
7323
+ { key: "date", label: t("booking.stepDate") },
7324
+ { key: "upsells", label: t("booking.stepUpsells") },
7325
+ { key: "details", label: t("booking.stepDetails") },
7326
+ { key: "payment", label: t("booking.stepPayment") },
7327
+ ]
7328
+ : [
7329
+ { key: "date", label: t("booking.stepDate") },
7330
+ { key: "details", label: t("booking.stepDetails") },
7331
+ { key: "payment", label: t("booking.stepPayment") },
7332
+ ];
7333
+ const activeIndex = Math.max(steps.findIndex((step) => step.key === currentStep), 0);
7334
+ const progressPercent = steps.length > 1 ? (activeIndex / (steps.length - 1)) * 100 : 100;
7335
+ return (jsxs("div", { style: {
7336
+ backgroundColor: "var(--bw-surface-color)",
7337
+ border: "1px solid var(--bw-border-color)",
7338
+ borderRadius: "var(--bw-border-radius)",
7339
+ padding: "12px 14px",
7340
+ marginBottom: "16px",
7341
+ }, children: [jsx("div", { style: {
7342
+ display: "flex",
7343
+ justifyContent: "space-between",
7344
+ alignItems: "center",
7345
+ marginBottom: "10px",
7346
+ fontFamily: "var(--bw-font-family)",
7347
+ gap: "8px",
7348
+ }, children: steps.map((step, index) => (jsxs("span", { style: {
7349
+ fontSize: "12px",
7350
+ fontWeight: 700,
7351
+ color: index <= activeIndex ? "var(--bw-highlight-color)" : "var(--bw-text-muted)",
7352
+ whiteSpace: "nowrap",
7353
+ }, children: [index + 1, ". ", step.label] }, step.key))) }), jsx("div", { style: {
7354
+ width: "100%",
7355
+ height: "8px",
7356
+ borderRadius: "999px",
7357
+ backgroundColor: "var(--bw-background-color)",
7358
+ border: "1px solid var(--bw-border-color)",
7359
+ overflow: "hidden",
7360
+ }, children: jsx("div", { style: {
7361
+ width: `${progressPercent}%`,
7362
+ height: "100%",
7363
+ backgroundColor: "var(--bw-highlight-color)",
7364
+ transition: "width 0.25s ease",
7365
+ } }) })] }));
7366
+ }
7367
+
7267
7368
  // Spinner icon (kept local as it has animation style)
7268
7369
  const IconSpinner = ({ size = 16, color = "currentColor" }) => (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: jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }));
7269
7370
  function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVoucherValidated, appliedVouchers, onRemoveVoucher, disabled = false, }) {
7270
7371
  const t = useTranslations();
7372
+ const { locale } = useLocale();
7271
7373
  const [inputValue, setInputValue] = useState("");
7272
7374
  const [isLoading, setIsLoading] = useState(false);
7273
7375
  const [error, setError] = useState(null);
@@ -7287,7 +7389,7 @@ function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVo
7287
7389
  try {
7288
7390
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/validate-voucher"), {
7289
7391
  method: "POST",
7290
- headers: createApiHeaders(config),
7392
+ headers: createApiHeaders(config, locale),
7291
7393
  body: JSON.stringify(createRequestBody(config, {
7292
7394
  code: code.trim(),
7293
7395
  orderValue: orderValue,
@@ -11478,6 +11580,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11478
11580
  const { locale } = useLocale();
11479
11581
  const timezone = useTimezone();
11480
11582
  const roundEnabled = systemConfig?.roundPricesEnabled !== false;
11583
+ const widgetPaymentMode = systemConfig?.widgetPaymentMode ?? "all";
11481
11584
  const participantFieldsConfig = eventDetails.participantFieldsConfig ?? DEFAULT_PARTICIPANT_FIELDS_CONFIG;
11482
11585
  const participantLevelOptions = eventDetails.participantLevelOptions ?? ["beginner", "advanced"];
11483
11586
  const roundDiscountUp = (minorUnits) => Math.ceil(minorUnits / 100) * 100;
@@ -11491,6 +11594,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11491
11594
  const [paymentOption, setPaymentOption] = useState(() => persistedState?.paymentOption ?? "deposit");
11492
11595
  // Per-participant upsell selections: participantIndex -> array of upsell package IDs
11493
11596
  const [participantUpsells, setParticipantUpsells] = useState(() => persistedState?.participantUpsells ?? {});
11597
+ const [showPaymentValidationHint, setShowPaymentValidationHint] = useState(false);
11494
11598
  const wasOpenRef = useRef(false);
11495
11599
  const form = useForm({
11496
11600
  resolver: t(createBookingFormSchema(t$1, participantFieldsConfig)),
@@ -11614,12 +11718,22 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11614
11718
  const totalDiscount = calculateTotalDiscount();
11615
11719
  const totalAmount = calculateTotal();
11616
11720
  const depositAmount = calculateDeposit();
11617
- // Deposit stays fixed unless the discounted total is lower than the deposit
11618
- // (discount applies to total price, not to the deposit itself)
11619
- const hasDepositOption = depositAmount > 0 && depositAmount < totalAmount;
11620
- const paymentAmount = hasDepositOption && paymentOption === "deposit"
11621
- ? Math.min(depositAmount, totalAmount)
11622
- : totalAmount;
11721
+ const allowsDepositInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "deposits_only";
11722
+ const allowsFullInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "full_only";
11723
+ const hasConfiguredDeposit = depositAmount > 0;
11724
+ const hasDepositChoice = allowsDepositInWidget && hasConfiguredDeposit && depositAmount < totalAmount;
11725
+ const depositsOnlyBlocked = widgetPaymentMode === "deposits_only" && !hasConfiguredDeposit;
11726
+ useEffect(() => {
11727
+ if (widgetPaymentMode === "deposits_only") {
11728
+ setPaymentOption("deposit");
11729
+ }
11730
+ else if (widgetPaymentMode === "full_only") {
11731
+ setPaymentOption("full");
11732
+ }
11733
+ }, [widgetPaymentMode]);
11734
+ const paymentAmount = allowsFullInWidget && (!hasDepositChoice || paymentOption === "full" || !allowsDepositInWidget)
11735
+ ? totalAmount
11736
+ : Math.min(depositAmount, totalAmount);
11623
11737
  // Convert per-participant upsells to UpsellSelection[] format for API
11624
11738
  // Includes participantIndices to track which participants selected each upsell
11625
11739
  const aggregatedUpsellSelections = useCallback(() => {
@@ -11778,7 +11892,39 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11778
11892
  onClose();
11779
11893
  };
11780
11894
  // Footer navigation
11781
- const footerContent = (jsxs(Fragment, { children: [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" && (jsx("button", { type: "button", onClick: () => setCheckoutStep("payment"), disabled: !isReadyForPayment() || !hasPaymentProvider, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), children: t$1("button.continueToPayment") }))] }));
11895
+ const canContinueToPayment = isReadyForPayment();
11896
+ const handleContinueToPayment = async () => {
11897
+ if (canContinueToPayment && hasPaymentProvider) {
11898
+ setShowPaymentValidationHint(false);
11899
+ setCheckoutStep("payment");
11900
+ return;
11901
+ }
11902
+ const participantErrors = await form.trigger("participants");
11903
+ const customerErrors = await form.trigger(["customerName", "customerEmail", "acceptTerms"]);
11904
+ if (!participantErrors || !customerErrors) {
11905
+ setShowPaymentValidationHint(true);
11906
+ }
11907
+ };
11908
+ useEffect(() => {
11909
+ if (showPaymentValidationHint && canContinueToPayment) {
11910
+ setShowPaymentValidationHint(false);
11911
+ }
11912
+ }, [showPaymentValidationHint, canContinueToPayment]);
11913
+ const footerContent = (jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "6px" }, children: [checkoutStep === "details" && (jsx("div", { style: {
11914
+ minHeight: "14px",
11915
+ fontSize: "11px",
11916
+ color: "var(--bw-error-color)",
11917
+ textAlign: "center",
11918
+ fontFamily: "var(--bw-font-family)",
11919
+ opacity: showPaymentValidationHint ? 1 : 0,
11920
+ transition: "opacity 0.15s ease",
11921
+ pointerEvents: "none",
11922
+ }, children: t$1("payment.fillRequired") })), jsxs("div", { style: { display: "flex", gap: "12px", width: "100%" }, children: [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" && (jsx("button", { type: "button", onClick: handleContinueToPayment, disabled: !hasPaymentProvider, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth, !canContinueToPayment
11923
+ ? {
11924
+ opacity: 0.55,
11925
+ cursor: "pointer",
11926
+ }
11927
+ : undefined), children: t$1("button.continueToPayment") }))] })] }));
11782
11928
  if (!eventDetails.bookingOpen) {
11783
11929
  return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.notPossible"), children: jsx("div", { style: {
11784
11930
  display: "flex",
@@ -11795,7 +11941,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11795
11941
  fontFamily: "var(--bw-font-family)",
11796
11942
  }, children: t$1("booking.notPossible") }), jsx("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t$1("booking.notPossibleMessage") })] }) }) }));
11797
11943
  }
11798
- return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: jsxs("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [checkoutStep === "details" && (jsxs(Fragment, { children: [jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), jsxs("div", { style: {
11944
+ return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: jsxs("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [jsx(FlowProgress, { currentStep: checkoutStep === "details" ? "details" : "payment", hasUpsellsStep: upsells.length > 0 }), checkoutStep === "details" && (jsxs(Fragment, { children: [jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), jsxs("div", { style: {
11799
11945
  display: "grid",
11800
11946
  gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))",
11801
11947
  gap: "12px",
@@ -11921,7 +12067,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11921
12067
  }, children: t$1("summary.giftCard", { code: giftCard.code }) }), jsxs("span", { style: { color: "var(--bw-success-color)", fontFamily: "var(--bw-font-family)" }, children: ["-", formatCurrency(giftCard.balanceToUse || giftCard.discountAmount)] })] }, giftCard.code)))] })), jsxs("div", { style: {
11922
12068
  borderTop: "1px solid var(--bw-border-color)",
11923
12069
  paddingTop: "12px",
11924
- }, children: [hasDepositOption && (jsxs("div", { style: {
12070
+ }, children: [hasDepositChoice && (jsxs("div", { style: {
11925
12071
  display: "flex",
11926
12072
  justifyContent: "space-between",
11927
12073
  alignItems: "center",
@@ -11931,7 +12077,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11931
12077
  color: "var(--bw-text-muted)",
11932
12078
  fontFamily: "var(--bw-font-family)",
11933
12079
  fontWeight: 500,
11934
- }, children: formatCurrency(totalAmount) })] })), hasDepositOption && (jsxs("div", { style: {
12080
+ }, children: formatCurrency(totalAmount) })] })), hasDepositChoice && widgetPaymentMode === "all" && (jsxs("div", { style: {
11935
12081
  display: "flex",
11936
12082
  gap: "8px",
11937
12083
  marginBottom: "16px",
@@ -11987,19 +12133,19 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
11987
12133
  alignItems: "center",
11988
12134
  fontSize: "18px",
11989
12135
  fontWeight: 600,
11990
- }, children: [jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: hasDepositOption && paymentOption === "deposit"
12136
+ }, children: [jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: hasDepositChoice && paymentOption === "deposit"
11991
12137
  ? t$1("summary.payToday")
11992
12138
  : t$1("summary.totalAmount") }), jsx("span", { style: {
11993
12139
  color: "var(--bw-highlight-color)",
11994
12140
  fontFamily: "var(--bw-font-family)",
11995
12141
  fontWeight: 700,
11996
- }, children: formatCurrency(paymentAmount) })] }), hasDepositOption && paymentOption === "deposit" && (jsx("div", { style: {
12142
+ }, children: formatCurrency(paymentAmount) })] }), hasDepositChoice && paymentOption === "deposit" && (jsx("div", { style: {
11997
12143
  fontSize: "12px",
11998
12144
  color: "var(--bw-text-muted)",
11999
12145
  fontFamily: "var(--bw-font-family)",
12000
12146
  marginTop: "8px",
12001
12147
  textAlign: "right",
12002
- }, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), !hasPaymentProvider && (jsx("div", { style: cardStyles$1, children: jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && (systemConfig?.paymentProvider === "mollie" ? (jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), 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 })] })) : (jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), 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() })] })))] }))] }) }));
12148
+ }, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), depositsOnlyBlocked && (jsx("div", { style: cardStyles$1, children: jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.depositNotConfigured") }) })), !hasPaymentProvider && !depositsOnlyBlocked && (jsx("div", { style: cardStyles$1, children: jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && !depositsOnlyBlocked && (systemConfig?.paymentProvider === "mollie" ? (jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), 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 })] })) : (jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), 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() })] })))] }))] }) }));
12003
12149
  }
12004
12150
 
12005
12151
  /**
@@ -12847,6 +12993,31 @@ const ImageCarousel = ({ images, eventName }) => {
12847
12993
  } }))] }));
12848
12994
  };
12849
12995
 
12996
+ function PaymentLogosStrip() {
12997
+ const logoHeight = 34;
12998
+ const logoCellStyle = {
12999
+ display: "inline-flex",
13000
+ alignItems: "center",
13001
+ justifyContent: "center",
13002
+ padding: "0px 1px",
13003
+ minHeight: "36px",
13004
+ borderRadius: "6px",
13005
+ };
13006
+ return (jsxs("div", { style: {
13007
+ padding: "8px 5px",
13008
+ backgroundColor: "var(--bw-background-color)",
13009
+ border: "1px solid var(--bw-border-color)",
13010
+ display: "flex",
13011
+ alignItems: "center",
13012
+ justifyContent: "center",
13013
+ borderRadius: "var(--bw-border-radius)",
13014
+ gap: "0px",
13015
+ flexWrap: "wrap",
13016
+ width: "fit-content",
13017
+ margin: "20px auto",
13018
+ }, children: [jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: logoHeight, height: logoHeight, viewBox: "0 0 48 48", fill: "none", "aria-label": "PayPal", children: [jsx("circle", { cx: "24", cy: "24", r: "20", fill: "#0070BA" }), jsx("path", { d: "M32.3305 18.0977C32.3082 18.24 32.2828 18.3856 32.2542 18.5351C31.2704 23.5861 27.9046 25.331 23.606 25.331H21.4173C20.8916 25.331 20.4486 25.7127 20.3667 26.2313L19.2461 33.3381L18.9288 35.3527C18.8755 35.693 19.1379 36 19.4815 36H23.3634C23.8231 36 24.2136 35.666 24.286 35.2127L24.3241 35.0154L25.055 30.3772L25.1019 30.1227C25.1735 29.6678 25.5648 29.3338 26.0245 29.3338H26.6051C30.3661 29.3338 33.3103 27.8068 34.1708 23.388C34.5303 21.5421 34.3442 20.0008 33.393 18.9168C33.1051 18.59 32.748 18.3188 32.3305 18.0977Z", fill: "white", fillOpacity: "0.6" }), jsx("path", { d: "M31.3009 17.6871C31.1506 17.6434 30.9955 17.6036 30.8364 17.5678C30.6766 17.5328 30.5127 17.5018 30.3441 17.4748C29.754 17.3793 29.1074 17.334 28.4147 17.334H22.5676C22.4237 17.334 22.2869 17.3666 22.1644 17.4254C21.8948 17.5551 21.6944 17.8104 21.6459 18.1229L20.402 26.0013L20.3662 26.2311C20.4481 25.7126 20.8911 25.3308 21.4168 25.3308H23.6055C27.9041 25.3308 31.2699 23.5851 32.2537 18.5349C32.2831 18.3854 32.3078 18.2398 32.33 18.0975C32.0811 17.9655 31.8115 17.8525 31.5212 17.7563C31.4496 17.7324 31.3757 17.7094 31.3009 17.6871Z", fill: "white", fillOpacity: "0.8" }), jsx("path", { d: "M21.6461 18.1231C21.6946 17.8105 21.895 17.5552 22.1646 17.4264C22.2879 17.3675 22.4239 17.3349 22.5678 17.3349H28.4149C29.1077 17.3349 29.7542 17.3803 30.3444 17.4757C30.513 17.5027 30.6768 17.5338 30.8367 17.5687C30.9957 17.6045 31.1508 17.6443 31.3011 17.688C31.3759 17.7103 31.4498 17.7334 31.5222 17.7564C31.8125 17.8527 32.0821 17.9664 32.331 18.0976C32.6237 16.231 32.3287 14.9601 31.3194 13.8093C30.2068 12.5424 28.1986 12 25.629 12H18.169C17.6441 12 17.1963 12.3817 17.1152 12.9011L14.0079 32.5969C13.9467 32.9866 14.2473 33.3381 14.6402 33.3381H19.2458L20.4022 26.0014L21.6461 18.1231Z", fill: "white" })] }) }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: logoHeight * 2.2, height: logoHeight, viewBox: "0 -139.5 750 750", fill: "none", "aria-label": "Mastercard", children: [jsx("rect", { fill: "#000000", x: "0", y: "0", width: "750", height: "471", rx: "40" }), jsx("path", { d: "M434.008334,235.5 C434.008334,334.641668 353.6375,415.004169 254.499999,415.004169 C155.362498,415.004169 74.9999973,334.641668 74.9999973,235.5 C74.9999973,136.366666 155.362498,55.9958324 254.499999,55.9958324 C353.6375,55.9958324 434.008334,136.366666 434.008334,235.5", fill: "#D9222A" }), jsx("path", { d: "M495.491667,55.9958324 C449.1125,55.9958324 406.85,73.5916658 374.991666,102.462499 C368.504166,108.345833 362.445833,114.7 356.866666,121.458333 L393.133333,121.458333 C398.091667,127.4875 402.658333,133.829166 406.816667,140.470833 L343.183333,140.470833 C339.370833,146.575 335.908333,152.916666 332.841666,159.479167 L417.154167,159.479167 C420.033333,165.6375 422.575,171.975 424.754167,178.483333 L325.241666,178.483333 C323.166666,184.675 321.420833,191.0125 320.024999,197.491667 L429.966667,197.491667 C432.604167,209.741667 434.008334,222.458334 434.008334,235.5 C434.008334,255.433334 430.754167,274.612501 424.754167,292.520834 L325.241666,292.520834 C327.416666,299.033334 329.958333,305.375001 332.837499,311.529168 L417.154167,311.529168 C414.079167,318.091668 410.625,324.433335 406.808333,330.541668 L343.183333,330.541668 C347.3375,337.170835 351.9125,343.520835 356.866666,349.537501 L393.125,349.537501 C387.554167,356.308335 381.491666,362.670835 374.995833,368.550002 C406.854167,397.416668 449.1125,415.004169 495.491667,415.004169 C594.629168,415.004169 675.000002,334.641668 675.000002,235.5 C675.000002,136.370833 594.629168,55.9958324 495.491667,55.9958324", fill: "#EE9F2D" })] }) }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: logoHeight * 1.1, height: logoHeight, viewBox: "0 0 750 471", fill: "none", "aria-label": "Visa", children: [jsx("rect", { fill: "#0E4595", x: "0", y: "0", width: "750", height: "471", rx: "40" }), jsx("polygon", { fill: "#FFFFFF", points: "278.1975 334.2275 311.5585 138.4655 364.9175 138.4655 331.5335 334.2275" }), jsx("path", { d: "M524.3075,142.6875 C513.7355,138.7215 497.1715,134.4655 476.4845,134.4655 C423.7605,134.4655 386.6205,161.0165 386.3045,199.0695 C386.0075,227.1985 412.8185,242.8905 433.0585,252.2545 C453.8275,261.8495 460.8105,267.9695 460.7115,276.5375 C460.5795,289.6595 444.1255,295.6545 428.7885,295.6545 C407.4315,295.6545 396.0855,292.6875 378.5625,285.3785 L371.6865,282.2665 L364.1975,326.0905 C376.6605,331.5545 399.7065,336.2895 423.6355,336.5345 C479.7245,336.5345 516.1365,310.2875 516.5505,269.6525 C516.7515,247.3835 502.5355,230.4355 471.7515,216.4645 C453.1005,207.4085 441.6785,201.3655 441.7995,192.1955 C441.7995,184.0585 451.4675,175.3575 472.3565,175.3575 C489.8055,175.0865 502.4445,178.8915 512.2925,182.8575 L517.0745,185.1165 L524.3075,142.6875", fill: "#FFFFFF" }), jsx("path", { d: "M661.6145,138.4655 L620.3835,138.4655 C607.6105,138.4655 598.0525,141.9515 592.4425,154.6995 L513.1975,334.1025 L569.2285,334.1025 C569.2285,334.1025 578.3905,309.9805 580.4625,304.6845 C586.5855,304.6845 641.0165,304.7685 648.7985,304.7685 C650.3945,311.6215 655.2905,334.1025 655.2905,334.1025 L704.8025,334.1025 L661.6145,138.4655 Z M596.1975,264.8725 C600.6105,253.5935 617.4565,210.1495 617.4565,210.1495 C617.1415,210.6705 621.8365,198.8155 624.5315,191.4655 L628.1385,208.3435 C628.1385,208.3435 638.3555,255.0725 640.4905,264.8715 L596.1975,264.8715 L596.1975,264.8725 Z", fill: "#FFFFFF" }), jsx("path", { d: "M45.878906 138.46484L45.197266 142.53906C66.288263 147.64458 85.126465 155.03257 101.61914 164.22461L148.96484 333.91602L205.41992 333.84961L289.42383 138.46484L232.90234 138.46484L180.66211 271.96094L175.0957 244.83203C174.83824 244.00408 174.55942 243.17304 174.27344 242.3418L156.10742 154.99219C152.87742 142.59619 143.50892 138.89684 131.91992 138.46484L45.878906 138.46484Z", fill: "#FFFFFF" })] }) }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: logoHeight * 2, height: logoHeight, viewBox: "0 -9 58 58", fill: "none", "aria-label": "Klarna", children: [jsx("rect", { x: "0.5", y: "0.5", width: "57", height: "39", rx: "3.5", fill: "#F4B6C7", stroke: "#F3F3F3" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.41299 25.7963H5V15H7.41299V25.7963ZM13.4398 15H11.0784C11.0784 16.9868 10.1885 18.8104 8.63709 20.0034L7.70155 20.7226L11.3264 25.7967H14.3068L10.9714 21.1277C12.5525 19.5116 13.4398 17.3373 13.4398 15ZM17.289 25.7933H15.0102V15.0021H17.289V25.7933ZM24.1766 18.3286V18.8061C23.5616 18.3754 22.8192 18.1223 22.0185 18.1223C19.8993 18.1223 18.1815 19.8857 18.1815 22.0611C18.1815 24.2365 19.8993 26 22.0185 26C22.8192 26 23.5616 25.7469 24.1766 25.3163V25.7933H26.3539V18.3286H24.1766ZM24.1694 22.0611C24.1694 23.1218 23.2861 23.9818 22.1966 23.9818C21.1071 23.9818 20.2238 23.1218 20.2238 22.0611C20.2238 21.0004 21.1071 20.1407 22.1966 20.1407C23.2861 20.1407 24.1694 21.0004 24.1694 22.0611ZM47.1454 18.8061V18.3286H49.3226V25.7933H47.1454V25.3163C46.5304 25.7469 45.788 26 44.9872 26C42.868 26 41.1502 24.2365 41.1502 22.0611C41.1502 19.8857 42.868 18.1223 44.9872 18.1223C45.788 18.1223 46.5304 18.3754 47.1454 18.8061ZM45.1654 23.9818C46.255 23.9818 47.1381 23.1218 47.1381 22.0611C47.1381 21.0004 46.255 20.1407 45.1654 20.1407C44.0758 20.1407 43.1926 21.0004 43.1926 22.0611C43.1926 23.1218 44.0758 23.9818 45.1654 23.9818ZM50.2675 24.5482C50.2675 23.7736 50.8792 23.1457 51.6337 23.1457C52.3882 23.1457 53 23.7736 53 24.5482C53 25.3227 52.3882 25.9507 51.6337 25.9507C50.8792 25.9507 50.2675 25.3227 50.2675 24.5482ZM37.2814 18.1278C36.4117 18.1278 35.5887 18.405 35.0384 19.1697V18.329H32.8706V25.7933H35.065V21.8706C35.065 20.7354 35.8065 20.1796 36.6993 20.1796C37.6562 20.1796 38.2063 20.7663 38.2063 21.8551V25.7933H40.3809V21.0463C40.3809 19.3092 39.0354 18.1278 37.2814 18.1278ZM29.7219 18.3287V19.3009C30.1583 18.7177 30.9715 18.3291 31.8557 18.3291V20.5013L31.8298 20.5003C30.9684 20.5003 29.7269 21.1323 29.7269 22.3082V25.7933H27.4928V18.3287H29.7219Z", fill: "#17120F" })] }) }), jsx("span", { style: { ...logoCellStyle, marginLeft: "-10px" }, children: jsxs("svg", { width: logoHeight * 1.9, height: logoHeight, viewBox: "0 -11 70 70", fill: "none", "aria-label": "Google Pay", children: [jsx("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M33.0603 31.5161V25.4741H36.1786C37.4564 25.4741 38.535 25.046 39.4142 24.2015L39.6252 23.9875C41.2313 22.2391 41.1258 19.5155 39.4142 17.898C38.5584 17.0416 37.3861 16.5778 36.1786 16.6016H31.1729V31.5161H33.0603ZM33.0605 23.6425V18.4332H36.2262C36.9063 18.4332 37.5512 18.6948 38.0319 19.1706C39.052 20.1696 39.0754 21.8347 38.0905 22.8694C37.6098 23.3809 36.9297 23.6663 36.2262 23.6425H33.0605ZM48.4293 22.1083C47.6204 21.359 46.5185 20.9784 45.1234 20.9784C43.3298 20.9784 41.9816 21.6444 41.0906 22.9646L42.7553 24.0231C43.3649 23.1192 44.1973 22.6673 45.2524 22.6673C45.9206 22.6673 46.5653 22.9171 47.0694 23.369C47.5618 23.7972 47.8432 24.4156 47.8432 25.0698V25.5098C47.1163 25.1055 46.2019 24.8914 45.0765 24.8914C43.7635 24.8914 42.7084 25.2006 41.923 25.831C41.1375 26.4613 40.739 27.2939 40.739 28.3524C40.7155 29.3158 41.1258 30.2316 41.8527 30.85C42.5912 31.5161 43.5291 31.8491 44.631 31.8491C45.9323 31.8491 46.9639 31.2663 47.7494 30.1007H47.8314V31.5161H49.6368V25.2244C49.6368 23.9042 49.2382 22.8576 48.4293 22.1083ZM43.3066 29.6369C42.9197 29.3514 42.6852 28.8876 42.6852 28.3881C42.6852 27.8291 42.9432 27.3652 43.4473 26.9965C43.9632 26.6278 44.6081 26.4375 45.3702 26.4375C46.4255 26.4256 47.2462 26.6635 47.8325 27.1392C47.8325 27.948 47.5159 28.6497 46.8945 29.2444C46.3317 29.8153 45.5696 30.1364 44.7723 30.1364C44.2446 30.1483 43.7287 29.9699 43.3066 29.6369ZM53.693 35.9999L60.0001 21.3114H57.9485L55.0295 28.6378H54.9943L52.0049 21.3114H49.9534L54.0916 30.8619L51.747 35.9999H53.693Z", fill: "#3C4043" }), jsx("path", { d: "M26.544 24.1659C26.544 23.5831 26.4971 23.0003 26.4034 22.4294H18.4434V25.7239H23.0037C22.8161 26.7825 22.2065 27.734 21.3155 28.3286V30.4695H24.0353C25.6296 28.9828 26.544 26.7825 26.544 24.1659Z", fill: "#4285F4" }), jsx("path", { d: "M18.4442 32.539C20.7185 32.539 22.6411 31.7778 24.0361 30.4695L21.3164 28.3287C20.5544 28.852 19.5814 29.1493 18.4442 29.1493C16.2403 29.1493 14.3763 27.6388 13.7081 25.6169H10.9062V27.8291C12.3365 30.7193 15.2555 32.539 18.4442 32.539Z", fill: "#34A853" }), jsx("path", { d: "M13.708 25.6169C13.3563 24.5584 13.3563 23.4048 13.708 22.3343V20.134H10.9058C9.69808 22.5484 9.69808 25.4029 10.9058 27.8172L13.708 25.6169Z", fill: "#FBBC04" }), jsx("path", { d: "M18.4442 18.8019C19.6517 18.7781 20.8123 19.242 21.6798 20.0864L24.0948 17.6363C22.559 16.1853 20.5427 15.3885 18.4442 15.4123C15.2555 15.4123 12.3365 17.2439 10.9062 20.134L13.7081 22.3462C14.3763 20.3124 16.2403 18.8019 18.4442 18.8019Z", fill: "#EA4335" })] }) }), jsx("span", { style: { ...logoCellStyle, marginLeft: "10px" }, children: jsxs("svg", { width: logoHeight * 1, height: logoHeight, viewBox: "0 0 70 48", fill: "none", "aria-label": "Apple Pay", children: [jsx("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), jsx("g", { transform: "translate(12,8)", children: jsx("path", { d: "M31.099 17.255a4.646 4.646 0 0 1 1.421-3.315c.437-.43.95-.764 1.51-.983-.27-.715-.669-1.375-1.177-1.946a5.4 5.4 0 0 0-1.773-1.3 4.975 4.975 0 0 0-2.119-.464c-.786.011-1.562.185-2.276.512-.598.286-1.25.453-1.91.488a4.495 4.495 0 0 1-1.75-.488 5.5 5.5 0 0 0-2.346-.536 5.66 5.66 0 0 0-3.047.887 6.168 6.168 0 0 0-2.229 2.412 7.501 7.501 0 0 0-.839 3.498c.024 1.224.289 2.434.78 3.556a20.964 20.964 0 0 0 2.019 3.854c.444.664.95 1.284 1.515 1.853a3.045 3.045 0 0 0 2.041.948c.579-.006 1.149-.147 1.665-.41a4.928 4.928 0 0 1 2.217-.538c.795 0 1.58.184 2.292.538.53.261 1.11.402 1.7.41.696-.013 1.365-.265 1.9-.715.67-.545 1.252-1.192 1.724-1.92a12.29 12.29 0 0 0 1.197-2.246 4.95 4.95 0 0 1-2.113-1.852 4.573 4.573 0 0 1-.76-2.668M29.42 5.207a4.252 4.252 0 0 0 .98-2.697 3.76 3.76 0 0 0-.026-.51 4.359 4.359 0 0 0-2.79 1.424 4.124 4.124 0 0 0-1.05 2.63c-.005.171.005.343.032.513.157.021.315.03.474.024a3.67 3.67 0 0 0 2.38-1.384", fill: "#000000" }) })] }) })] }));
13019
+ }
13020
+
12850
13021
  function VoucherPurchaseCard({ config, minEventPrice, fallbackImages = [], onClick, standalone = false, }) {
12851
13022
  const t = useTranslations();
12852
13023
  const [activeSlideIndex, setActiveSlideIndex] = useState(0);
@@ -13966,7 +14137,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
13966
14137
  display: "flex",
13967
14138
  flexDirection: "column",
13968
14139
  justifyContent: "space-between",
13969
- height: "490px",
14140
+ height: "540px",
13970
14141
  }, children: [jsxs("div", { children: [jsx("h2", { className: "event-type-title", style: {
13971
14142
  fontSize: "clamp(1.1rem, 2.5vw, 24px)",
13972
14143
  fontWeight: 700,
@@ -14036,19 +14207,9 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14036
14207
  }) }) })) : (jsx("div", { className: "event-type-desc", style: {
14037
14208
  margin: "10px 0",
14038
14209
  height: "7.5em", // Same height as highlights
14039
- }, children: "\u00A0" })) })] }), jsxs("div", { children: [jsxs("div", { children: [jsx("div", { className: "event-type-price", style: {
14040
- fontWeight: 700,
14041
- color: "var(--bw-text-color)",
14042
- fontFamily: "var(--bw-font-family)",
14043
- textAlign: "right",
14044
- }, children: jsx("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), jsx("div", { className: "event-type-price", style: {
14045
- fontSize: "clamp(1.72rem, 4vw, 32px)",
14046
- fontWeight: 700,
14047
- color: "var(--bw-text-color)",
14048
- fontFamily: "var(--bw-font-family)",
14049
- textAlign: "right",
14050
- }, children: jsxs("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), (() => {
14210
+ }, children: "\u00A0" })) })] }), jsxs("div", { children: [(() => {
14051
14211
  const preview = eventType.cardPreview ?? [];
14212
+ const hasMoreDates = eventType.availableInstancesCount > preview.length;
14052
14213
  return (jsxs("div", { style: {
14053
14214
  marginTop: "12px",
14054
14215
  borderTop: "1px solid var(--bw-border-color)",
@@ -14082,8 +14243,33 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14082
14243
  transition: "background 0.15s",
14083
14244
  boxSizing: "border-box",
14084
14245
  }, children: [jsxs("span", { style: { whiteSpace: "nowrap", display: "flex", alignItems: "center", gap: "3px" }, children: [item.isSpecial && (jsx("span", { style: { color: "var(--bw-highlight-color)", fontSize: "11px", lineHeight: 1 }, children: "\u2605" })), formatWeekday(item.startTime, timezone, locale), " ", formatDate(item.startTime, timezone, locale)] }), jsx("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", opacity: 0.75 }, children: item.name }), jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px", whiteSpace: "nowrap" }, children: [hasDiscount && (jsx("span", { style: { textDecoration: "line-through", opacity: 0.55, fontSize: "11px" }, children: formatCurrency(item.basePrice) })), jsx("span", { style: { fontWeight: 700, color: item.isSpecial ? "var(--bw-highlight-color)" : "var(--bw-text-color)" }, children: formatCurrency(item.price) })] }), item.specialDescription ? (jsx(InfoBadge, { text: item.specialDescription })) : (jsx("span", {}))] }, item.id));
14085
- }) })] }));
14086
- })(), jsxs("div", { style: {
14246
+ }) }), hasMoreDates && (jsx("button", { type: "button", onClick: (e) => {
14247
+ e.stopPropagation();
14248
+ onEventTypeSelect(eventType);
14249
+ }, style: {
14250
+ marginTop: "6px",
14251
+ padding: 0,
14252
+ border: "none",
14253
+ background: "none",
14254
+ color: "var(--bw-highlight-color)",
14255
+ fontFamily: "var(--bw-font-family)",
14256
+ fontSize: "13px",
14257
+ fontWeight: 600,
14258
+ cursor: "pointer",
14259
+ textDecoration: "underline",
14260
+ }, children: t("events.seeMoreDates") }))] }));
14261
+ })(), jsxs("div", { style: { marginBottom: "16px" }, children: [jsx("div", { className: "event-type-price", style: {
14262
+ fontWeight: 700,
14263
+ color: "var(--bw-text-color)",
14264
+ fontFamily: "var(--bw-font-family)",
14265
+ textAlign: "right",
14266
+ }, children: jsx("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), jsx("div", { className: "event-type-price", style: {
14267
+ fontSize: "clamp(1.72rem, 4vw, 32px)",
14268
+ fontWeight: 700,
14269
+ color: "var(--bw-text-color)",
14270
+ fontFamily: "var(--bw-font-family)",
14271
+ textAlign: "right",
14272
+ }, children: jsxs("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), jsxs("div", { style: {
14087
14273
  display: "flex",
14088
14274
  justifyContent: "flex-end",
14089
14275
  alignItems: "center",
@@ -14141,7 +14327,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14141
14327
  fontFamily: "var(--bw-font-family)",
14142
14328
  boxShadow: "var(--bw-shadow-md)",
14143
14329
  }, children: t("events.soldOut") }) }))] }, eventType.id));
14144
- }) }) })), jsx(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
14330
+ }) }) })), jsx(PaymentLogosStrip, {}), jsx(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
14145
14331
  }
14146
14332
 
14147
14333
  const getAllocationBadgeInfo = (availableSpots, maxParticipants, t) => {
@@ -14268,7 +14454,7 @@ const PriceDisplay = ({ price, yearPrices, t }) => {
14268
14454
  boxShadow: displayInfo ? "0 2px 4px rgba(0, 0, 0, 0.2)" : "none",
14269
14455
  }, children: formatCurrency(price) }));
14270
14456
  };
14271
- function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, }) {
14457
+ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, hasUpsellsStep = false, }) {
14272
14458
  const t = useTranslations();
14273
14459
  const { locale } = useLocale();
14274
14460
  const timezone = useTimezone();
@@ -14334,88 +14520,88 @@ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInst
14334
14520
  const footerNav = (jsx("button", { type: "button", onClick: handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: t("common.back") }));
14335
14521
  // Show loading state first if we're loading event instances
14336
14522
  if (isLoadingEventInstances) {
14337
- return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsx("div", { style: { padding: "24px" }, children: jsx("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: Array.from({ length: 3 }).map((_, idx) => (jsxs("div", { className: "skeleton-shimmer", style: {
14338
- backgroundColor: "var(--bw-surface-color)",
14339
- border: "1px solid var(--bw-border-color)",
14340
- borderRadius: "var(--bw-border-radius)",
14341
- overflow: "hidden",
14342
- }, children: [jsxs("div", { style: {
14343
- display: "flex",
14344
- justifyContent: "space-between",
14345
- alignItems: "center",
14346
- padding: "16px 20px",
14347
- cursor: "pointer",
14348
- borderBottom: "1px solid var(--bw-border-color)",
14349
- }, children: [jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [jsx("div", { style: {
14350
- width: "80px",
14351
- height: "20px",
14352
- backgroundColor: "var(--bw-border-color)",
14353
- borderRadius: "var(--bw-border-radius-small)",
14354
- } }), jsx("div", { style: {
14355
- width: "16px",
14356
- height: "16px",
14357
- backgroundColor: "var(--bw-border-color)",
14358
- borderRadius: "var(--bw-border-radius-small)",
14359
- } })] }), jsx("div", { style: {
14360
- width: "70px",
14361
- height: "16px",
14362
- backgroundColor: "var(--bw-highlight-color)",
14363
- opacity: 0.3,
14364
- borderRadius: "var(--bw-border-radius-small)",
14365
- } })] }), jsx("div", { style: {
14366
- display: "flex",
14367
- flexDirection: "column",
14368
- gap: "12px",
14369
- paddingTop: "12px",
14370
- padding: "12px 20px 20px 20px",
14371
- }, children: Array.from({ length: 2 }).map((_, eventIdx) => (jsxs("div", { style: {
14372
- position: "relative",
14373
- border: "1px solid var(--bw-border-color)",
14374
- backgroundColor: "var(--bw-surface-color)",
14375
- borderRadius: "var(--bw-border-radius)",
14523
+ return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxs("div", { style: { padding: "24px" }, children: [jsx(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), jsx("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: Array.from({ length: 3 }).map((_, idx) => (jsxs("div", { className: "skeleton-shimmer", style: {
14524
+ backgroundColor: "var(--bw-surface-color)",
14525
+ border: "1px solid var(--bw-border-color)",
14526
+ borderRadius: "var(--bw-border-radius)",
14527
+ overflow: "hidden",
14528
+ }, children: [jsxs("div", { style: {
14529
+ display: "flex",
14530
+ justifyContent: "space-between",
14531
+ alignItems: "center",
14376
14532
  padding: "16px 20px",
14377
- fontFamily: "var(--bw-font-family)",
14378
- }, children: [jsxs("div", { style: {
14379
- display: "flex",
14380
- justifyContent: "space-between",
14381
- width: "100%",
14382
- alignItems: "flex-start",
14383
- gap: "12px",
14384
- marginBottom: "4px",
14385
- }, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
14386
- width: "40px",
14387
- height: "40px",
14388
- backgroundColor: "var(--bw-background-color)",
14389
- border: "1px solid var(--bw-border-color)",
14390
- borderTopWidth: "4px",
14391
- borderRadius: "var(--bw-border-radius-small)",
14392
- } }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [jsx("div", { style: {
14393
- width: "80px",
14394
- height: "16px",
14395
- backgroundColor: "var(--bw-border-color)",
14396
- borderRadius: "var(--bw-border-radius)",
14397
- } }), jsx("div", { style: {
14398
- width: "60px",
14399
- height: "14px",
14400
- backgroundColor: "var(--bw-border-color)",
14401
- borderRadius: "var(--bw-border-radius)",
14402
- } })] })] }), jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: jsx("div", { style: {
14403
- width: "70px",
14404
- height: "20px",
14405
- backgroundColor: "var(--bw-highlight-color)",
14406
- opacity: 0.3,
14407
- borderRadius: "var(--bw-border-radius)",
14408
- } }) })] }), jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [jsx("div", { style: {
14409
- width: "120px",
14410
- height: "16px",
14533
+ cursor: "pointer",
14534
+ borderBottom: "1px solid var(--bw-border-color)",
14535
+ }, children: [jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [jsx("div", { style: {
14536
+ width: "80px",
14537
+ height: "20px",
14411
14538
  backgroundColor: "var(--bw-border-color)",
14412
- borderRadius: "var(--bw-border-radius)",
14539
+ borderRadius: "var(--bw-border-radius-small)",
14413
14540
  } }), jsx("div", { style: {
14414
- width: "50px",
14415
- height: "20px",
14541
+ width: "16px",
14542
+ height: "16px",
14416
14543
  backgroundColor: "var(--bw-border-color)",
14417
- borderRadius: "16px",
14418
- } })] })] }, eventIdx))) })] }, idx))) }) }) }));
14544
+ borderRadius: "var(--bw-border-radius-small)",
14545
+ } })] }), jsx("div", { style: {
14546
+ width: "70px",
14547
+ height: "16px",
14548
+ backgroundColor: "var(--bw-highlight-color)",
14549
+ opacity: 0.3,
14550
+ borderRadius: "var(--bw-border-radius-small)",
14551
+ } })] }), jsx("div", { style: {
14552
+ display: "flex",
14553
+ flexDirection: "column",
14554
+ gap: "12px",
14555
+ paddingTop: "12px",
14556
+ padding: "12px 20px 20px 20px",
14557
+ }, children: Array.from({ length: 2 }).map((_, eventIdx) => (jsxs("div", { style: {
14558
+ position: "relative",
14559
+ border: "1px solid var(--bw-border-color)",
14560
+ backgroundColor: "var(--bw-surface-color)",
14561
+ borderRadius: "var(--bw-border-radius)",
14562
+ padding: "16px 20px",
14563
+ fontFamily: "var(--bw-font-family)",
14564
+ }, children: [jsxs("div", { style: {
14565
+ display: "flex",
14566
+ justifyContent: "space-between",
14567
+ width: "100%",
14568
+ alignItems: "flex-start",
14569
+ gap: "12px",
14570
+ marginBottom: "4px",
14571
+ }, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
14572
+ width: "40px",
14573
+ height: "40px",
14574
+ backgroundColor: "var(--bw-background-color)",
14575
+ border: "1px solid var(--bw-border-color)",
14576
+ borderTopWidth: "4px",
14577
+ borderRadius: "var(--bw-border-radius-small)",
14578
+ } }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [jsx("div", { style: {
14579
+ width: "80px",
14580
+ height: "16px",
14581
+ backgroundColor: "var(--bw-border-color)",
14582
+ borderRadius: "var(--bw-border-radius)",
14583
+ } }), jsx("div", { style: {
14584
+ width: "60px",
14585
+ height: "14px",
14586
+ backgroundColor: "var(--bw-border-color)",
14587
+ borderRadius: "var(--bw-border-radius)",
14588
+ } })] })] }), jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: jsx("div", { style: {
14589
+ width: "70px",
14590
+ height: "20px",
14591
+ backgroundColor: "var(--bw-highlight-color)",
14592
+ opacity: 0.3,
14593
+ borderRadius: "var(--bw-border-radius)",
14594
+ } }) })] }), jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [jsx("div", { style: {
14595
+ width: "120px",
14596
+ height: "16px",
14597
+ backgroundColor: "var(--bw-border-color)",
14598
+ borderRadius: "var(--bw-border-radius)",
14599
+ } }), jsx("div", { style: {
14600
+ width: "50px",
14601
+ height: "20px",
14602
+ backgroundColor: "var(--bw-border-color)",
14603
+ borderRadius: "16px",
14604
+ } })] })] }, eventIdx))) })] }, idx))) })] }) }));
14419
14605
  }
14420
14606
  // Show empty state only if not loading and no event instances
14421
14607
  if (eventInstances.length === 0) {
@@ -14434,116 +14620,116 @@ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInst
14434
14620
  fontFamily: "var(--bw-font-family)",
14435
14621
  }, children: t("instances.noAvailable") }), jsx("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t("instances.noAvailableMessage") })] }) }) }));
14436
14622
  }
14437
- return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsx("div", { style: { padding: "20px 10px" }, children: jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: monthYearGroups.map(({ key, label, events, minPrice, year }, idx) => {
14438
- const monthPriceDisplayInfo = getMonthPriceDisplayInfo(minPrice);
14439
- return (jsxs(Fragment$1, { children: [idx > 0 && monthYearGroups[idx - 1].year !== year && (jsx("div", { style: { height: "1px", backgroundColor: "var(--bw-border-color)", margin: "4px 0" } })), jsx(Accordion, { title: label, priceInfo: jsx("div", { style: {
14440
- fontSize: "16px",
14441
- fontWeight: 500,
14442
- marginLeft: "auto",
14443
- padding: "4px 8px",
14444
- borderRadius: "var(--bw-border-radius-small)",
14445
- backgroundColor: monthPriceDisplayInfo
14446
- ? monthPriceDisplayInfo.backgroundColor
14447
- : "#14532d",
14448
- color: monthPriceDisplayInfo
14449
- ? monthPriceDisplayInfo.textColor
14450
- : "#4ade80",
14451
- boxShadow: monthPriceDisplayInfo
14452
- ? "0 2px 4px rgba(0, 0, 0, 0.2)"
14453
- : undefined,
14454
- }, children: `${t("common.from")} ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", paddingTop: "12px" }, children: events.map((event) => {
14455
- const availableSpots = event.maxParticipants - event.participantCount;
14456
- const isFullyBooked = availableSpots === 0;
14457
- const startDate = new Date(event.startTime);
14458
- const isPastEvent = today.toISOString() >= startDate.toISOString();
14459
- const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
14460
- return (jsxs("div", { style: {
14461
- position: "relative",
14462
- border: "1px solid var(--bw-border-color)",
14463
- backgroundColor: "var(--bw-surface-color)",
14464
- borderRadius: "var(--bw-border-radius)",
14465
- padding: "16px 10px",
14466
- transition: "all 0.2s ease",
14467
- fontFamily: "var(--bw-font-family)",
14468
- opacity: isDisabled ? 0.3 : 1,
14469
- filter: isDisabled ? "grayscale(40%)" : "none",
14470
- cursor: isDisabled ? "not-allowed" : "pointer",
14471
- }, onClick: () => {
14472
- if (!isDisabled) {
14473
- handleEventInstanceSelect(event);
14474
- }
14475
- }, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsx("div", { style: {
14476
- position: "absolute",
14477
- inset: 0,
14478
- backgroundColor: "rgba(15, 23, 42, 0.8)",
14479
- borderRadius: "var(--bw-border-radius)",
14480
- display: "flex",
14481
- alignItems: "center",
14482
- justifyContent: "center",
14483
- }, children: jsx("div", { style: {
14484
- width: "32px",
14485
- height: "32px",
14486
- color: "var(--bw-highlight-color)",
14487
- opacity: 0.8,
14488
- fontSize: "32px",
14489
- }, children: spinner() }) })), jsx(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices, t: t }), jsx(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.maxParticipants, t: t }), jsxs("div", { style: {
14490
- display: "flex",
14491
- justifyContent: "space-between",
14492
- width: "100%",
14493
- alignItems: "flex-start",
14494
- gap: "12px",
14495
- marginBottom: "4px",
14496
- }, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
14497
- fontSize: "16px",
14498
- transition: "all 0.2s ease",
14499
- borderRadius: "var(--bw-border-radius-small)",
14500
- borderTop: "4px solid var(--bw-border-color)",
14501
- border: "1px solid var(--bw-border-color)",
14502
- width: "40px",
14503
- height: "40px",
14504
- display: "flex",
14505
- alignItems: "center",
14506
- justifyContent: "center",
14507
- fontWeight: 700,
14508
- color: "var(--bw-text-color)",
14509
- backgroundColor: "var(--bw-background-color)",
14510
- }, children: startDate.getDate() }), jsxs("div", { style: {
14511
- fontSize: "16px",
14512
- color: "var(--bw-text-color)",
14513
- display: "flex",
14514
- flexDirection: "column",
14515
- alignItems: "flex-start",
14516
- justifyContent: "flex-start",
14517
- lineHeight: 1.25,
14518
- }, children: [jsxs("div", { children: [jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), formatWeekday(event.startTime, timezone, locale) !==
14519
- formatWeekday(event.endTime, timezone, locale) && (jsxs(Fragment, { children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), jsx("div", { children: formatWeekday(event.startTime, timezone, locale) ===
14520
- formatWeekday(event.endTime, timezone, locale) ? (jsxs(Fragment, { children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (jsxs("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), jsxs("span", { style: {
14521
- fontSize: "12px",
14522
- fontWeight: 400,
14523
- color: "var(--bw-text-muted)",
14524
- marginLeft: "6px",
14525
- backgroundColor: "rgba(0, 0, 0, 0.05)",
14526
- whiteSpace: "nowrap",
14527
- padding: "2px 6px",
14528
- borderRadius: "var(--bw-border-radius-small)",
14529
- }, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), jsx("div", { style: {
14530
- textAlign: "right",
14531
- display: "flex",
14532
- flexDirection: "column",
14533
- alignItems: "flex-end",
14534
- }, children: jsx(PriceDisplay, { price: event.price, yearPrices: yearPrices, t: t }) })] }), event.name !== selectedEventType?.name && (jsx("h4", { style: {
14535
- fontSize: "16px",
14536
- fontWeight: 600,
14537
- color: "var(--bw-text-color)",
14538
- lineHeight: 1.25,
14539
- margin: "0 0 2px 0",
14540
- display: "flex",
14541
- alignItems: "center",
14542
- gap: "8px",
14543
- maxWidth: "230px",
14544
- }, children: event.name }))] }, event.id));
14545
- }) }) })] }, key));
14546
- }) }) }) }));
14623
+ return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxs("div", { style: { padding: "20px 10px" }, children: [jsx(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: monthYearGroups.map(({ key, label, events, minPrice, year }, idx) => {
14624
+ const monthPriceDisplayInfo = getMonthPriceDisplayInfo(minPrice);
14625
+ return (jsxs(Fragment$1, { children: [idx > 0 && monthYearGroups[idx - 1].year !== year && (jsx("div", { style: { height: "1px", backgroundColor: "var(--bw-border-color)", margin: "4px 0" } })), jsx(Accordion, { title: label, priceInfo: jsx("div", { style: {
14626
+ fontSize: "16px",
14627
+ fontWeight: 500,
14628
+ marginLeft: "auto",
14629
+ padding: "4px 8px",
14630
+ borderRadius: "var(--bw-border-radius-small)",
14631
+ backgroundColor: monthPriceDisplayInfo
14632
+ ? monthPriceDisplayInfo.backgroundColor
14633
+ : "#14532d",
14634
+ color: monthPriceDisplayInfo
14635
+ ? monthPriceDisplayInfo.textColor
14636
+ : "#4ade80",
14637
+ boxShadow: monthPriceDisplayInfo
14638
+ ? "0 2px 4px rgba(0, 0, 0, 0.2)"
14639
+ : undefined,
14640
+ }, children: `${t("common.from")} ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", paddingTop: "12px" }, children: events.map((event) => {
14641
+ const availableSpots = event.maxParticipants - event.participantCount;
14642
+ const isFullyBooked = availableSpots === 0;
14643
+ const startDate = new Date(event.startTime);
14644
+ const isPastEvent = today.toISOString() >= startDate.toISOString();
14645
+ const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
14646
+ return (jsxs("div", { style: {
14647
+ position: "relative",
14648
+ border: "1px solid var(--bw-border-color)",
14649
+ backgroundColor: "var(--bw-surface-color)",
14650
+ borderRadius: "var(--bw-border-radius)",
14651
+ padding: "16px 10px",
14652
+ transition: "all 0.2s ease",
14653
+ fontFamily: "var(--bw-font-family)",
14654
+ opacity: isDisabled ? 0.3 : 1,
14655
+ filter: isDisabled ? "grayscale(40%)" : "none",
14656
+ cursor: isDisabled ? "not-allowed" : "pointer",
14657
+ }, onClick: () => {
14658
+ if (!isDisabled) {
14659
+ handleEventInstanceSelect(event);
14660
+ }
14661
+ }, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsx("div", { style: {
14662
+ position: "absolute",
14663
+ inset: 0,
14664
+ backgroundColor: "rgba(15, 23, 42, 0.8)",
14665
+ borderRadius: "var(--bw-border-radius)",
14666
+ display: "flex",
14667
+ alignItems: "center",
14668
+ justifyContent: "center",
14669
+ }, children: jsx("div", { style: {
14670
+ width: "32px",
14671
+ height: "32px",
14672
+ color: "var(--bw-highlight-color)",
14673
+ opacity: 0.8,
14674
+ fontSize: "32px",
14675
+ }, children: spinner() }) })), jsx(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices, t: t }), jsx(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.maxParticipants, t: t }), jsxs("div", { style: {
14676
+ display: "flex",
14677
+ justifyContent: "space-between",
14678
+ width: "100%",
14679
+ alignItems: "flex-start",
14680
+ gap: "12px",
14681
+ marginBottom: "4px",
14682
+ }, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
14683
+ fontSize: "16px",
14684
+ transition: "all 0.2s ease",
14685
+ borderRadius: "var(--bw-border-radius-small)",
14686
+ borderTop: "4px solid var(--bw-border-color)",
14687
+ border: "1px solid var(--bw-border-color)",
14688
+ width: "40px",
14689
+ height: "40px",
14690
+ display: "flex",
14691
+ alignItems: "center",
14692
+ justifyContent: "center",
14693
+ fontWeight: 700,
14694
+ color: "var(--bw-text-color)",
14695
+ backgroundColor: "var(--bw-background-color)",
14696
+ }, children: startDate.getDate() }), jsxs("div", { style: {
14697
+ fontSize: "16px",
14698
+ color: "var(--bw-text-color)",
14699
+ display: "flex",
14700
+ flexDirection: "column",
14701
+ alignItems: "flex-start",
14702
+ justifyContent: "flex-start",
14703
+ lineHeight: 1.25,
14704
+ }, children: [jsxs("div", { children: [jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), formatWeekday(event.startTime, timezone, locale) !==
14705
+ formatWeekday(event.endTime, timezone, locale) && (jsxs(Fragment, { children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), jsx("div", { children: formatWeekday(event.startTime, timezone, locale) ===
14706
+ formatWeekday(event.endTime, timezone, locale) ? (jsxs(Fragment, { children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (jsxs("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), jsxs("span", { style: {
14707
+ fontSize: "12px",
14708
+ fontWeight: 400,
14709
+ color: "var(--bw-text-muted)",
14710
+ marginLeft: "6px",
14711
+ backgroundColor: "rgba(0, 0, 0, 0.05)",
14712
+ whiteSpace: "nowrap",
14713
+ padding: "2px 6px",
14714
+ borderRadius: "var(--bw-border-radius-small)",
14715
+ }, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), jsx("div", { style: {
14716
+ textAlign: "right",
14717
+ display: "flex",
14718
+ flexDirection: "column",
14719
+ alignItems: "flex-end",
14720
+ }, children: jsx(PriceDisplay, { price: event.price, yearPrices: yearPrices, t: t }) })] }), event.name !== selectedEventType?.name && (jsx("h4", { style: {
14721
+ fontSize: "16px",
14722
+ fontWeight: 600,
14723
+ color: "var(--bw-text-color)",
14724
+ lineHeight: 1.25,
14725
+ margin: "0 0 2px 0",
14726
+ display: "flex",
14727
+ alignItems: "center",
14728
+ gap: "8px",
14729
+ maxWidth: "230px",
14730
+ }, children: event.name }))] }, event.id));
14731
+ }) }) })] }, key));
14732
+ }) })] }) }));
14547
14733
  }
14548
14734
 
14549
14735
  function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText, showAllButton, isLoadingEventDetails = false, isLoadingShowAll = false, isLoading = false, }) {
@@ -14551,6 +14737,47 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14551
14737
  const { locale } = useLocale();
14552
14738
  const timezone = useTimezone();
14553
14739
  const [selectedEventInstanceId, setSelectedEventInstanceId] = useState(null);
14740
+ const normalizedShowAllButtonText = showAllButtonText.trim() || t("nextEvents.showAll");
14741
+ function InfoBadge({ text }) {
14742
+ const [open, setOpen] = useState(false);
14743
+ return (jsxs("span", { onClick: (event) => {
14744
+ event.stopPropagation();
14745
+ setOpen((current) => !current);
14746
+ }, style: {
14747
+ position: "relative",
14748
+ display: "inline-flex",
14749
+ alignItems: "center",
14750
+ justifyContent: "center",
14751
+ width: "16px",
14752
+ height: "16px",
14753
+ borderRadius: "50%",
14754
+ border: "1px solid var(--bw-highlight-color)",
14755
+ color: "var(--bw-highlight-color)",
14756
+ fontSize: "9px",
14757
+ fontWeight: 700,
14758
+ cursor: "pointer",
14759
+ flexShrink: 0,
14760
+ userSelect: "none",
14761
+ }, children: ["i", open && (jsx("span", { style: {
14762
+ position: "absolute",
14763
+ bottom: "calc(100% + 6px)",
14764
+ right: 0,
14765
+ backgroundColor: "var(--bw-surface-color)",
14766
+ border: "1px solid var(--bw-border-color)",
14767
+ borderRadius: "var(--bw-border-radius-small)",
14768
+ boxShadow: "var(--bw-shadow-md)",
14769
+ padding: "6px 10px",
14770
+ fontSize: "13px",
14771
+ color: "var(--bw-text-color)",
14772
+ fontWeight: 400,
14773
+ whiteSpace: "normal",
14774
+ width: "180px",
14775
+ lineHeight: 1.4,
14776
+ zIndex: 100,
14777
+ textAlign: "left",
14778
+ pointerEvents: "none",
14779
+ }, children: text }))] }));
14780
+ }
14554
14781
  const handleEventSelect = (eventInstanceId) => {
14555
14782
  setSelectedEventInstanceId(eventInstanceId);
14556
14783
  onEventSelect(eventInstanceId);
@@ -14616,20 +14843,9 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14616
14843
  return (jsxs("div", { style: {
14617
14844
  maxWidth: "500px",
14618
14845
  margin: "0 auto",
14619
- padding: "16px",
14846
+ padding: "12px 16px",
14620
14847
  fontFamily: "var(--bw-font-family)",
14621
- }, children: [jsxs("div", { style: { textAlign: "center", marginBottom: "24px" }, children: [jsx("h2", { style: {
14622
- fontWeight: 600,
14623
- margin: "0 0 8px 0",
14624
- fontSize: "18px",
14625
- color: "var(--bw-text-color)",
14626
- fontFamily: "var(--bw-font-family)",
14627
- }, children: t("nextEvents.title") }), jsx("p", { style: {
14628
- margin: 0,
14629
- fontSize: "16px",
14630
- color: "var(--bw-text-muted)",
14631
- fontFamily: "var(--bw-font-family)",
14632
- }, children: t("nextEvents.subtitle") })] }), jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginBottom: "24px" }, children: events.map((event) => {
14848
+ }, children: [jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px", marginBottom: "10px" }, children: events.map((event) => {
14633
14849
  const availableSpots = event.maxParticipants - event.participantCount;
14634
14850
  const isFullyBooked = availableSpots === 0;
14635
14851
  const startDate = new Date(event.startTime);
@@ -14653,11 +14869,10 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14653
14869
  const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
14654
14870
  return (jsxs("div", { style: {
14655
14871
  position: "relative",
14656
- backgroundColor: "var(--bw-surface-color)",
14657
- borderRadius: "var(--bw-border-radius)",
14658
- padding: "8px 10px",
14872
+ borderRadius: "var(--bw-border-radius-small)",
14873
+ padding: "0 4px",
14659
14874
  transition: "all 0.2s ease",
14660
- border: `1px solid ${getAvailabilityColor()}`,
14875
+ border: "1px solid transparent",
14661
14876
  fontFamily: "var(--bw-font-family)",
14662
14877
  opacity: isDisabled ? 0.3 : 1,
14663
14878
  filter: isDisabled ? "grayscale(100%)" : "none",
@@ -14666,6 +14881,14 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14666
14881
  if (!isDisabled) {
14667
14882
  handleEventSelect(event.id);
14668
14883
  }
14884
+ }, onMouseEnter: (hoverEvent) => {
14885
+ if (!isDisabled) {
14886
+ hoverEvent.currentTarget.style.backgroundColor = "var(--bw-surface-color)";
14887
+ hoverEvent.currentTarget.style.borderColor = getAvailabilityColor();
14888
+ }
14889
+ }, onMouseLeave: (hoverEvent) => {
14890
+ hoverEvent.currentTarget.style.backgroundColor = "transparent";
14891
+ hoverEvent.currentTarget.style.borderColor = "transparent";
14669
14892
  }, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsx("div", { style: {
14670
14893
  position: "absolute",
14671
14894
  inset: 0,
@@ -14681,80 +14904,41 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14681
14904
  fontSize: "32px",
14682
14905
  animation: "spin 1s linear infinite",
14683
14906
  }, children: "\u27F3" }) })), jsxs("div", { style: {
14684
- display: "flex",
14685
- justifyContent: "space-between",
14686
- width: "100%",
14687
- alignItems: "flex-start",
14688
- gap: "12px",
14689
- marginBottom: "4px",
14690
- }, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
14691
- display: "flex",
14692
- alignItems: "center",
14693
- justifyContent: "center",
14694
- fontWeight: 700,
14695
- fontSize: "16px",
14696
- borderRadius: "var(--bw-border-radius-small)",
14697
- width: "40px",
14698
- height: "40px",
14699
- color: "var(--bw-text-color)",
14700
- backgroundColor: "var(--bw-background-color)",
14701
- border: "1px solid var(--bw-border-color)",
14702
- borderTopWidth: "4px",
14703
- borderTopColor: getAvailabilityColor(),
14704
- transition: "all 0.2s ease",
14705
- }, children: startDate.getDate() }), jsxs("div", { style: {
14706
- display: "flex",
14707
- flexDirection: "column",
14708
- alignItems: "flex-start",
14709
- justifyContent: "flex-start",
14710
- fontSize: "16px",
14711
- color: "var(--bw-text-color)",
14712
- lineHeight: 1.25,
14713
- }, children: [jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) })] })] }), jsxs("div", { style: {
14714
- display: "flex",
14715
- flexDirection: "column",
14716
- alignItems: "flex-end",
14717
- textAlign: "right",
14718
- }, children: [jsx("div", { style: {
14719
- fontWeight: 700,
14720
- color: "var(--bw-highlight-color)",
14721
- fontSize: "18px",
14722
- }, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.deposit && event.deposit > 0 && (jsxs("div", { style: { fontSize: "12px", color: "var(--bw-text-muted)" }, children: [t("common.from"), " ", formatCurrency(event.deposit)] }))] })] }), jsxs("h4", { style: {
14723
- display: "flex",
14907
+ minHeight: "32px",
14908
+ display: "grid",
14909
+ gridTemplateColumns: "1fr auto 20px",
14724
14910
  alignItems: "center",
14725
- fontWeight: 600,
14726
- margin: "0 0 2px 0",
14727
- fontSize: "16px",
14728
- color: "var(--bw-text-color)",
14729
- lineHeight: 1.25,
14730
14911
  gap: "8px",
14731
- }, children: [event.name, jsxs("span", { style: {
14732
- fontSize: "12px",
14733
- fontWeight: 400,
14734
- color: "var(--bw-text-muted)",
14735
- marginLeft: "6px",
14736
- backgroundColor: "rgba(0, 0, 0, 0.05)",
14737
- borderRadius: "16px",
14738
- padding: "2px 8px",
14739
- }, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), event.notes && (jsx("p", { style: {
14740
- margin: "8px 0 0 0",
14741
- fontSize: "12px",
14912
+ width: "100%",
14913
+ fontSize: "13px",
14742
14914
  color: "var(--bw-text-muted)",
14743
- overflow: "hidden",
14744
- lineHeight: 1.375,
14745
- display: "-webkit-box",
14746
- WebkitBoxOrient: "vertical",
14747
- WebkitLineClamp: 2,
14748
- }, children: event.notes }))] }, event.id));
14915
+ }, children: [jsxs("span", { style: {
14916
+ whiteSpace: "nowrap",
14917
+ display: "flex",
14918
+ alignItems: "center",
14919
+ gap: "3px",
14920
+ overflow: "hidden",
14921
+ textOverflow: "ellipsis",
14922
+ textTransform: "capitalize",
14923
+ }, children: [formatWeekday(event.startTime, timezone, locale), " ", formatDate(event.startTime, timezone, locale)] }), jsx("span", { style: {
14924
+ display: "flex",
14925
+ alignItems: "center",
14926
+ gap: "4px",
14927
+ whiteSpace: "nowrap",
14928
+ fontWeight: 700,
14929
+ color: "var(--bw-text-color)",
14930
+ }, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.notes ? jsx(InfoBadge, { text: event.notes }) : jsx("span", {})] })] }, event.id));
14749
14931
  }) }), showAllButton && (jsx("div", { style: { textAlign: "center" }, children: jsx("button", { type: "button", disabled: isLoadingShowAll, style: {
14750
- position: "relative",
14932
+ display: "inline-flex",
14933
+ alignItems: "center",
14934
+ justifyContent: "center",
14751
14935
  backgroundColor: "var(--bw-surface-color)",
14752
14936
  color: "var(--bw-highlight-color)",
14753
14937
  border: "1px solid var(--bw-highlight-color)",
14754
- padding: "12px 24px",
14755
- borderRadius: "var(--bw-border-radius)",
14756
- fontSize: "16px",
14757
- fontWeight: 500,
14938
+ padding: "6px 10px",
14939
+ borderRadius: "var(--bw-border-radius-small)",
14940
+ fontSize: "13px",
14941
+ fontWeight: 600,
14758
14942
  fontFamily: "var(--bw-font-family)",
14759
14943
  transition: "all 0.2s ease",
14760
14944
  cursor: isLoadingShowAll ? "not-allowed" : "pointer",
@@ -14765,7 +14949,7 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14765
14949
  color: "var(--bw-highlight-color)",
14766
14950
  fontSize: "16px",
14767
14951
  animation: "spin 1s linear infinite",
14768
- }, children: "\u27F3" }), t("common.loading")] })) : (showAllButtonText) }) }))] }));
14952
+ }, children: "\u27F3" }), t("common.loading")] })) : (normalizedShowAllButtonText) }) }))] }));
14769
14953
  }
14770
14954
 
14771
14955
  function SpecialsView({ specials, onEventSelect, isLoading = false, showSavingsAmount = true, showSavingsPercent = false, emptyStateText, isLoadingEventDetails = false, }) {
@@ -15402,7 +15586,7 @@ function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, is
15402
15586
  const isSelected = (upsellId) => selectedUpsells.some((s) => s.upsellPackageId === upsellId);
15403
15587
  const selectedCount = selectedUpsells.length;
15404
15588
  const footerContent = (jsxs(Fragment, { children: [jsx("button", { type: "button", onClick: onBack, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), className: buttonClassName, children: t("common.back") }), jsx("button", { type: "button", onClick: onContinue, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), className: buttonClassName, children: selectedCount === 0 ? t("button.continueWithout") : t("button.continue") })] }));
15405
- return (jsx(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [isLoading && (jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), jsx("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (jsx("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: jsx("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (jsx(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (jsx("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: jsx("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
15589
+ return (jsx(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [jsx(FlowProgress, { currentStep: "upsells", hasUpsellsStep: true }), isLoading && (jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), jsx("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (jsx("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: jsx("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (jsx(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (jsx("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: jsx("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
15406
15590
  }
15407
15591
 
15408
15592
  /**
@@ -15543,6 +15727,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
15543
15727
  const [bookingPersistedState, setBookingPersistedState] = useState(null);
15544
15728
  const [isLoadingUpsells, setIsLoadingUpsells] = useState(false);
15545
15729
  const [tempParticipantCount, setTempParticipantCount] = useState(1); // Used during upsell step
15730
+ const hasUpsellsFlowStep = upsells.length > 0 || currentStep === "upsells";
15546
15731
  // State for upcoming events (next-events view mode)
15547
15732
  const [upcomingEvents, setUpcomingEvents] = useState([]);
15548
15733
  const [showingPreview, setShowingPreview] = useState(true);
@@ -15669,6 +15854,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
15669
15854
  ...(data.mollieProfileId ? { mollieProfileId: data.mollieProfileId } : {}),
15670
15855
  ...(data.mollieTestmode !== undefined ? { mollieTestmode: data.mollieTestmode } : {}),
15671
15856
  roundPricesEnabled: data.roundPricesEnabled ?? true,
15857
+ widgetPaymentMode: data.widgetPaymentMode ?? "all",
15672
15858
  });
15673
15859
  }
15674
15860
  }
@@ -16033,6 +16219,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16033
16219
  mollieProfileId: data.mollieProfileId,
16034
16220
  mollieTestmode: data.mollieTestmode,
16035
16221
  roundPricesEnabled: data.roundPricesEnabled ?? true,
16222
+ widgetPaymentMode: data.widgetPaymentMode ?? "all",
16036
16223
  });
16037
16224
  }
16038
16225
  if (data.stripePublishableKey) {
@@ -16093,6 +16280,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16093
16280
  mollieProfileId: data.mollieProfileId,
16094
16281
  mollieTestmode: data.mollieTestmode,
16095
16282
  roundPricesEnabled: data.roundPricesEnabled ?? true,
16283
+ widgetPaymentMode: data.widgetPaymentMode ?? "all",
16096
16284
  });
16097
16285
  if (!stripePromise && data.stripePublishableKey) {
16098
16286
  const stripeOptions = {
@@ -16601,7 +16789,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16601
16789
  }, isOpen: currentStep === "eventInstances", onClose: () => {
16602
16790
  setShowingPreview(true);
16603
16791
  setCurrentStep("eventTypes");
16604
- }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16792
+ }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16605
16793
  setIsSuccess(false);
16606
16794
  setCurrentStep("eventTypes");
16607
16795
  setShowingPreview(true);
@@ -16640,11 +16828,12 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16640
16828
  setShouldRenderBookingForm(true);
16641
16829
  }
16642
16830
  else {
16831
+ setCurrentStep("eventInstances");
16643
16832
  setSidebarOpen(true);
16644
16833
  setShouldRenderInstanceSelection(true);
16645
16834
  }
16646
16835
  }, children: config.buttonText ||
16647
- (isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (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 })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16836
+ (isDirectInstanceMode ? t("button.bookNow") : t("button.viewDates")) }), shouldRenderInstanceSelection && (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 && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (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 })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16648
16837
  setIsSuccess(false);
16649
16838
  setCurrentStep("eventTypes");
16650
16839
  setSidebarOpen(false);
@@ -16705,7 +16894,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16705
16894
  };
16706
16895
  };
16707
16896
  const backHandlers = getBackHandlers();
16708
- return (jsxs(StyleProvider, { config: config, children: [jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (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 })), jsx(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
16897
+ return (jsxs(StyleProvider, { config: config, children: [jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (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 })), jsx(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
16709
16898
  setIsSuccess(false);
16710
16899
  setCurrentStep("eventTypes");
16711
16900
  setSuccessPaymentId(null);