@bigz-app/booking-widget 1.1.5 → 1.1.6

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.
@@ -392,6 +392,7 @@
392
392
  "success.age": "{{age}} Jahre",
393
393
  "success.paymentSummary": "Zahlungsübersicht",
394
394
  "success.total": "Gesamtbetrag",
395
+ "success.discount": "Rabatt",
395
396
  "success.product": "Produkt",
396
397
  "success.contactInfo": "Kontaktdaten",
397
398
  "success.name": "Name:",
@@ -600,6 +601,7 @@
600
601
  "success.age": "{{age}} years",
601
602
  "success.paymentSummary": "Payment Summary",
602
603
  "success.total": "Total",
604
+ "success.discount": "Discount",
603
605
  "success.product": "Product",
604
606
  "success.contactInfo": "Contact Information",
605
607
  "success.name": "Name:",
@@ -808,6 +810,7 @@
808
810
  "success.age": "{{age}} años",
809
811
  "success.paymentSummary": "Resumen del pago",
810
812
  "success.total": "Total",
813
+ "success.discount": "Descuento",
811
814
  "success.product": "Producto",
812
815
  "success.contactInfo": "Datos de contacto",
813
816
  "success.name": "Nombre:",
@@ -1016,6 +1019,7 @@
1016
1019
  "success.age": "{{age}} anos",
1017
1020
  "success.paymentSummary": "Resumo do pagamento",
1018
1021
  "success.total": "Total",
1022
+ "success.discount": "Desconto",
1019
1023
  "success.product": "Produto",
1020
1024
  "success.contactInfo": "Dados de contacto",
1021
1025
  "success.name": "Nome:",
@@ -1224,6 +1228,7 @@
1224
1228
  "success.age": "{{age}} år",
1225
1229
  "success.paymentSummary": "Betalningssammanfattning",
1226
1230
  "success.total": "Totalt",
1231
+ "success.discount": "Rabatt",
1227
1232
  "success.product": "Produkt",
1228
1233
  "success.contactInfo": "Kontaktuppgifter",
1229
1234
  "success.name": "Namn:",
@@ -1350,7 +1355,7 @@
1350
1355
  const I18nContext = R$2(null);
1351
1356
  function I18nProvider({ configLocale, children }) {
1352
1357
  // Priority: configLocale (site owner) > persisted user choice > browser language > "de"
1353
- // If configLocale is set, the site owner has locked the language don't restore user choice.
1358
+ // If configLocale is set, the site owner has locked the language - don't restore user choice.
1354
1359
  const [overrideLocale, setOverrideLocale] = d$1(() => {
1355
1360
  if (configLocale)
1356
1361
  return null;
@@ -11127,6 +11132,13 @@
11127
11132
  return Object.assign({}, ...styles.filter(Boolean));
11128
11133
  }
11129
11134
 
11135
+ function getEffectivePrice(upsell, round) {
11136
+ const dp = upsell.discountPercent ?? 0;
11137
+ if (dp <= 0)
11138
+ return upsell.price;
11139
+ const raw = Math.round(upsell.price * (100 - dp) / 100);
11140
+ return round ? Math.floor(raw / 100) * 100 : raw;
11141
+ }
11130
11142
  // Local style aliases from shared styles
11131
11143
  const cardStyles = cardStyles$1.base;
11132
11144
  const sectionHeaderStyles = sectionStyles.header;
@@ -11137,6 +11149,7 @@
11137
11149
  const t$1 = useTranslations();
11138
11150
  const { locale } = useLocale();
11139
11151
  const timezone = useTimezone();
11152
+ const roundEnabled = systemConfig?.roundPricesEnabled !== false;
11140
11153
  const [appliedVouchers, setAppliedVouchers] = d$1([]);
11141
11154
  const paymentSectionRef = A$2(null);
11142
11155
  // Payment option: "deposit" or "full" - only relevant when deposit is available
@@ -11207,7 +11220,7 @@
11207
11220
  participantUpsellIds.forEach(upsellId => {
11208
11221
  const upsell = upsells.find(u => u.id === upsellId);
11209
11222
  if (upsell) {
11210
- total += upsell.price;
11223
+ total += getEffectivePrice(upsell, roundEnabled);
11211
11224
  }
11212
11225
  });
11213
11226
  }
@@ -11483,7 +11496,7 @@
11483
11496
  padding: 0,
11484
11497
  }, children: "\u00D7" })] }))] }), upsells.length > 0 && (u$2("div", { style: participantUpsellStyles.container, children: upsells.map((upsell) => {
11485
11498
  const isSelected = (participantUpsells[index] || []).includes(upsell.id);
11486
- return (u$2("label", { htmlFor: `upsell-${index}-${upsell.id}`, style: isSelected ? participantUpsellStyles.labelSelected : participantUpsellStyles.label, children: [u$2("input", { id: `upsell-${index}-${upsell.id}`, type: "checkbox", style: participantUpsellStyles.checkbox, checked: isSelected, onChange: () => toggleParticipantUpsell(index, upsell.id) }), u$2("span", { style: { fontWeight: 500 }, children: upsell.name }), u$2("span", { style: { fontSize: "12px", opacity: 0.8 }, children: ["(+", formatCurrency(upsell.price), ")"] })] }, upsell.id));
11499
+ return (u$2("label", { htmlFor: `upsell-${index}-${upsell.id}`, style: isSelected ? participantUpsellStyles.labelSelected : participantUpsellStyles.label, children: [u$2("input", { id: `upsell-${index}-${upsell.id}`, type: "checkbox", style: participantUpsellStyles.checkbox, checked: isSelected, onChange: () => toggleParticipantUpsell(index, upsell.id) }), u$2("span", { style: { fontWeight: 500 }, children: upsell.name }), u$2("span", { style: { fontSize: "12px", opacity: 0.8 }, children: ["(+", formatCurrency(getEffectivePrice(upsell, roundEnabled)), ")"] })] }, upsell.id));
11487
11500
  }) }))] }, index))), watchedParticipants.length < eventDetails.availableSpots ? (u$2("div", { style: {
11488
11501
  display: "flex",
11489
11502
  flexDirection: "column",
@@ -11515,7 +11528,7 @@
11515
11528
  const countWithUpsell = watchedParticipants.filter((p, idx) => p.name.trim() && (participantUpsells[idx] || []).includes(upsell.id)).length;
11516
11529
  if (countWithUpsell === 0)
11517
11530
  return null;
11518
- const upsellLineTotal = upsell.price * countWithUpsell;
11531
+ const upsellLineTotal = getEffectivePrice(upsell, roundEnabled) * countWithUpsell;
11519
11532
  return (u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", fontSize: "13px" }, children: [u$2("span", { style: { color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)" }, children: ["+ ", upsell.name, " (", countWithUpsell, "\u00D7)"] }), u$2("span", { style: { color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(upsellLineTotal) })] }, upsell.id));
11520
11533
  })] })), appliedVouchers.length > 0 && (u$2(k$3, { children: [u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t$1("summary.subtotal") }), u$2("span", { style: {
11521
11534
  fontFamily: "var(--bw-font-family)",
@@ -11640,7 +11653,7 @@
11640
11653
  : t$1("payment.fillRequired");
11641
11654
  return (u$2("div", { style: {
11642
11655
  ...cardStyles,
11643
- borderColor: "var(--bw-warning-color)",
11656
+ border: "1px solid var(--bw-warning-color)",
11644
11657
  color: "var(--bw-warning-color)",
11645
11658
  fontFamily: "var(--bw-font-family)",
11646
11659
  textAlign: "center",
@@ -11809,6 +11822,7 @@
11809
11822
  payments: data.payments,
11810
11823
  orderItems: data.orderItems,
11811
11824
  purchases: data.purchases || [],
11825
+ discount: data.discount || null,
11812
11826
  stripePaymentIntent: data.stripePaymentIntent,
11813
11827
  });
11814
11828
  setEventDetails({
@@ -12058,7 +12072,7 @@
12058
12072
  color: "var(--bw-text-color)",
12059
12073
  margin: "0",
12060
12074
  fontFamily: "var(--bw-font-family)",
12061
- }, children: t("success.paymentSummary") }) }), u$2("div", { className: "print-only", children: u$2("div", { className: "print-section-title", children: t("success.paymentSummary") }) }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [u$2("div", { className: "print-hidden", style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [eventDetails.name, " (", booking.participantCount, "x ", formatCurrency(eventDetails.price), ")"] }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(eventDetails.price * booking.participantCount) })] }), bookingData.purchases && bookingData.purchases.length > 0 && (u$2(k$3, { children: bookingData.purchases.map((purchase) => (u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [purchase.product?.name || t("success.product"), " (", purchase.quantity, "x ", formatCurrency(purchase.unitPrice), ")"] }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(purchase.totalPrice) })] }, purchase.id))) })), u$2("div", { style: {
12075
+ }, children: t("success.paymentSummary") }) }), u$2("div", { className: "print-only", children: u$2("div", { className: "print-section-title", children: t("success.paymentSummary") }) }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [u$2("div", { className: "print-hidden", style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [eventDetails.name, " (", booking.participantCount, "x ", formatCurrency(eventDetails.price), ")"] }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(eventDetails.price * booking.participantCount) })] }), bookingData.discount && bookingData.discount.amount > 0 && (u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-success-color, #10B981)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [t("success.discount"), " (", bookingData.discount.code, ")"] }), u$2("span", { style: { color: "var(--bw-success-color, #10B981)", fontFamily: "var(--bw-font-family)" }, children: ["-", formatCurrency(bookingData.discount.amount)] })] })), bookingData.purchases && bookingData.purchases.length > 0 && (u$2(k$3, { children: bookingData.purchases.map((purchase) => (u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [purchase.product?.name || t("success.product"), " (", purchase.quantity, "x ", formatCurrency(purchase.unitPrice), ")"] }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(purchase.totalPrice) })] }, purchase.id))) })), u$2("div", { style: {
12062
12076
  display: "flex",
12063
12077
  justifyContent: "space-between",
12064
12078
  alignItems: "center",
@@ -13537,7 +13551,7 @@
13537
13551
  color: "rgba(255, 255, 255, 0.85)",
13538
13552
  lineHeight: 1.5,
13539
13553
  margin: "0 0 16px 0",
13540
- }, children: [config.subtitle, config.discountAmount && (u$2(k$3, { children: [" ", u$2("strong", { style: { color: "white" }, children: [config.discountAmount, " ", t("promo.discount")] })] }))] }), config.discountCode && (u$2("div", { style: {
13554
+ }, children: [config.subtitle, config.discountAmount && (u$2(k$3, { children: [" - ", u$2("strong", { style: { color: "white" }, children: [config.discountAmount, " ", t("promo.discount")] })] }))] }), config.discountCode && (u$2("div", { style: {
13541
13555
  marginBottom: "16px",
13542
13556
  backgroundColor: "rgba(255,255,255,0.12)",
13543
13557
  borderRadius: "12px",
@@ -13622,7 +13636,9 @@
13622
13636
  flexDirection: "column",
13623
13637
  padding: "16px",
13624
13638
  backgroundColor: "var(--bw-surface-color)",
13625
- border: "2px solid var(--bw-border-color)",
13639
+ borderWidth: "2px",
13640
+ borderStyle: "solid",
13641
+ borderColor: "var(--bw-border-color)",
13626
13642
  borderRadius: "var(--bw-border-radius)",
13627
13643
  cursor: "pointer",
13628
13644
  transition: "all 0.2s ease",
@@ -13647,7 +13663,9 @@
13647
13663
  const checkboxInnerStyles = {
13648
13664
  width: "24px",
13649
13665
  height: "24px",
13650
- border: "2px solid var(--bw-border-color)",
13666
+ borderWidth: "2px",
13667
+ borderStyle: "solid",
13668
+ borderColor: "var(--bw-border-color)",
13651
13669
  borderRadius: "6px",
13652
13670
  display: "flex",
13653
13671
  alignItems: "center",
@@ -13773,10 +13791,11 @@
13773
13791
  return t("upsells.reason.notEnoughSpots", { eventTypeName: reason.eventTypeName });
13774
13792
  }
13775
13793
  }
13776
- function UpsellCard({ upsell, isSelected, participantCount, onSelect, }) {
13794
+ function UpsellCard({ upsell, isSelected, participantCount, onSelect, roundPricesEnabled = true, }) {
13777
13795
  const t = useTranslations();
13778
13796
  const { locale } = useLocale();
13779
- const totalPrice = upsell.price * participantCount;
13797
+ const effectivePrice = getEffectiveUpsellPrice(upsell, roundPricesEnabled);
13798
+ const totalPrice = effectivePrice * participantCount;
13780
13799
  const isDisabled = !upsell.available;
13781
13800
  const getCardStyles = () => {
13782
13801
  if (isDisabled)
@@ -13794,12 +13813,19 @@
13794
13813
  weekday: "short",
13795
13814
  day: "numeric",
13796
13815
  month: "short",
13797
- })] }), u$2("span", { style: { color: "var(--bw-text-muted)" }, children: t("upsells.spotsFree", { count: upsell.suggestedEventInstance.availableSpots }) })] }))] }), u$2("div", { style: priceContainerStyles, children: [u$2("span", { style: pricePerPersonStyles, children: [formatCurrency(upsell.price), "/", t("common.perPerson")] }), participantCount > 1 && (u$2("span", { style: priceTotalStyles, children: ["= ", formatCurrency(totalPrice)] }))] }), isDisabled && (u$2("div", { style: unavailableOverlayStyles, children: u$2("span", { children: upsell.unavailableReason
13816
+ })] }), u$2("span", { style: { color: "var(--bw-text-muted)" }, children: t("upsells.spotsFree", { count: upsell.suggestedEventInstance.availableSpots }) })] }))] }), u$2("div", { style: priceContainerStyles, children: [u$2("span", { style: pricePerPersonStyles, children: [formatCurrency(effectivePrice), "/", t("common.perPerson")] }), participantCount > 1 && (u$2("span", { style: priceTotalStyles, children: ["= ", formatCurrency(totalPrice)] }))] }), isDisabled && (u$2("div", { style: unavailableOverlayStyles, children: u$2("span", { children: upsell.unavailableReason
13798
13817
  ? formatUnavailableReason(upsell.unavailableReason, t)
13799
13818
  : t("upsells.notAvailable") }) }))] }));
13800
13819
  }
13801
13820
 
13802
- function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, isOpen, onClose, onSelect, onContinue, onBack, }) {
13821
+ function getEffectiveUpsellPrice(upsell, round = true) {
13822
+ const dp = upsell.discountPercent ?? 0;
13823
+ if (dp <= 0)
13824
+ return upsell.price;
13825
+ const raw = Math.round(upsell.price * (100 - dp) / 100);
13826
+ return round ? Math.floor(raw / 100) * 100 : raw;
13827
+ }
13828
+ function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, isOpen, onClose, onSelect, onContinue, onBack, roundPricesEnabled = true, }) {
13803
13829
  const t = useTranslations();
13804
13830
  const selectUpsell = (upsellId) => {
13805
13831
  const exists = selectedUpsells.find((s) => s.upsellPackageId === upsellId);
@@ -13818,7 +13844,7 @@
13818
13844
  return selectedUpsells.reduce((total, selection) => {
13819
13845
  const upsell = upsells.find((u) => u.id === selection.upsellPackageId);
13820
13846
  if (upsell) {
13821
- return total + upsell.price * selection.quantity;
13847
+ return total + getEffectiveUpsellPrice(upsell, roundPricesEnabled) * selection.quantity;
13822
13848
  }
13823
13849
  return total;
13824
13850
  }, 0);
@@ -13826,7 +13852,7 @@
13826
13852
  const selectedTotal = calculateTotal();
13827
13853
  const selectedCount = selectedUpsells.length;
13828
13854
  const footerContent = (u$2(k$3, { children: [u$2("button", { type: "button", onClick: onBack, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: t("common.back") }), u$2("button", { type: "button", onClick: onContinue, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), children: selectedCount === 0 ? t("button.continueWithout") : t("button.continue") })] }));
13829
- return (u$2(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: u$2("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [isLoading && (u$2("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), u$2("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (u$2("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: u$2("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (u$2(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: [u$2("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }), u$2("span", { style: { fontWeight: 600, color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)" }, children: ["+", formatCurrency(selectedTotal)] })] }))] }) }));
13855
+ return (u$2(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: u$2("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [isLoading && (u$2("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), u$2("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (u$2("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: u$2("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (u$2(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id), roundPricesEnabled: roundPricesEnabled }, upsell.id))) })), selectedCount > 0 && (u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: [u$2("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }), u$2("span", { style: { fontWeight: 600, color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)" }, children: ["+", formatCurrency(selectedTotal)] })] }))] }) }));
13830
13856
  }
13831
13857
 
13832
13858
  // Main widget component
@@ -14086,6 +14112,7 @@
14086
14112
  connectedAccountId: data.connectedAccountId,
14087
14113
  mollieProfileId: data.mollieProfileId,
14088
14114
  mollieTestmode: data.mollieTestmode,
14115
+ roundPricesEnabled: data.roundPricesEnabled ?? true,
14089
14116
  });
14090
14117
  }
14091
14118
  if (data.stripePublishableKey) {
@@ -14144,6 +14171,7 @@
14144
14171
  connectedAccountId: data.connectedAccountId,
14145
14172
  mollieProfileId: data.mollieProfileId,
14146
14173
  mollieTestmode: data.mollieTestmode,
14174
+ roundPricesEnabled: data.roundPricesEnabled ?? true,
14147
14175
  });
14148
14176
  if (!stripePromise && data.stripePublishableKey) {
14149
14177
  const stripeOptions = {
@@ -14292,6 +14320,8 @@
14292
14320
  const handleBookingSuccess = (result) => {
14293
14321
  setIsSuccess(true);
14294
14322
  setSuccessPaymentIntentId(result.paymentIntent.id);
14323
+ setSidebarOpen(false);
14324
+ setShouldRenderBookingForm(false);
14295
14325
  config.onSuccess?.(result);
14296
14326
  };
14297
14327
  const handleBookingError = (errorMessage) => {
@@ -14548,7 +14578,7 @@
14548
14578
  setShouldRenderInstanceSelection(true);
14549
14579
  }
14550
14580
  }, children: config.buttonText ||
14551
- (isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), onBackToEventTypes: () => setSidebarOpen(false), selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
14581
+ (isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack, roundPricesEnabled: systemConfig?.roundPricesEnabled !== false })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), onBackToEventTypes: () => setSidebarOpen(false), selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
14552
14582
  setIsSuccess(false);
14553
14583
  setCurrentStep("eventTypes");
14554
14584
  setSidebarOpen(false);
@@ -14595,7 +14625,7 @@
14595
14625
  };
14596
14626
  };
14597
14627
  const backHandlers = getBackHandlers();
14598
- return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: backHandlers.onBackToEventInstances, onBackToEventTypes: backHandlers.onBackToEventTypes, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
14628
+ return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack, roundPricesEnabled: systemConfig?.roundPricesEnabled !== false })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: backHandlers.onBackToEventInstances, onBackToEventTypes: backHandlers.onBackToEventTypes, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
14599
14629
  setIsSuccess(false);
14600
14630
  setCurrentStep("eventTypes");
14601
14631
  setSuccessPaymentIntentId(null);