@reblu/site-blocks 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -27,8 +27,12 @@ __export(src_exports, {
27
27
  CartSummary: () => CartSummary,
28
28
  CheckoutForm: () => CheckoutForm,
29
29
  CheckoutLoginPrompt: () => CheckoutLoginPrompt,
30
+ ContactInterestField: () => ContactInterestField,
31
+ CourseCatalogFilters: () => CourseCatalogFilters,
30
32
  CourseDescription: () => CourseDescription,
31
33
  DATA_REQUEST_TYPES: () => import_site_contracts.DATA_REQUEST_TYPES,
34
+ DEFAULT_COURSE_CATALOG_FILTERS_LABELS: () => DEFAULT_COURSE_CATALOG_FILTERS_LABELS,
35
+ DEFAULT_COURSE_PRICE_BANDS: () => DEFAULT_COURSE_PRICE_BANDS,
32
36
  DEFAULT_INVOICE_COUNTRIES: () => DEFAULT_INVOICE_COUNTRIES,
33
37
  DEFAULT_LESSON_PREVIEW_LABELS: () => DEFAULT_LESSON_PREVIEW_LABELS,
34
38
  DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE: () => DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
@@ -119,7 +123,19 @@ var DEFAULT_SHOP_ERROR_MESSAGES = {
119
123
  // REB-73 — checkout refusals before any payment.
120
124
  BILLING_DATA_REQUIRED: "Para emitir tu factura necesitamos tu NIF/NIE o un documento de identificaci\xF3n, tu nombre y tu direcci\xF3n de facturaci\xF3n.",
121
125
  INVOICING_NOT_READY: "No se puede completar la compra en este momento. Int\xE9ntalo m\xE1s tarde.",
122
- FULL_INVOICE_UNAVAILABLE: "Esta tienda no emite facturas completas: contin\xFAa sin solicitarla."
126
+ FULL_INVOICE_UNAVAILABLE: "Esta tienda no emite facturas completas: contin\xFAa sin solicitarla.",
127
+ // REB-912 — the code used up its total uses; refused before any payment.
128
+ DISCOUNT_LIMIT_REACHED: "Este c\xF3digo ya ha alcanzado su l\xEDmite de usos",
129
+ // REB-1197 — delivery refusals before any payment.
130
+ PICKUP_UNAVAILABLE: "La recogida no est\xE1 disponible en esta tienda. Elige el env\xEDo a domicilio.",
131
+ PICKUP_LOCATION_INVALID: "El punto de recogida elegido ya no est\xE1 disponible. Elige otro.",
132
+ SHIPPING_ADDRESS_REQUIRED: "Indica la direcci\xF3n de env\xEDo para recibir tu pedido.",
133
+ ORDER_TOO_HEAVY: "Tu pedido supera el peso m\xE1ximo. Reduce alguna cantidad o divide la compra.",
134
+ // REB-1198 — terms acceptance, before any payment.
135
+ TERMS_NOT_ACCEPTED: "Para continuar, acepta las condiciones generales de contrataci\xF3n.",
136
+ TERMS_VERSION_CHANGED: "Las condiciones de contrataci\xF3n se han actualizado. Rev\xEDsalas y vuelve a aceptarlas.",
137
+ // Owner, 2-Nov — no home delivery nor pickup for a cart that ships.
138
+ DELIVERY_UNAVAILABLE: "Ahora mismo no podemos entregar productos f\xEDsicos. Int\xE9ntalo m\xE1s tarde o contacta con la tienda."
123
139
  };
124
140
  var DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE = "No se ha podido completar la operaci\xF3n. Int\xE9ntalo de nuevo.";
125
141
  function getShopErrorMessage(code, overrides, fallback = DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE) {
@@ -14798,9 +14814,129 @@ function ShopFilters({
14798
14814
  ] });
14799
14815
  }
14800
14816
 
14801
- // src/components/cart-line-list.tsx
14817
+ // src/components/course-catalog-filters.tsx
14802
14818
  var import_utils15 = require("@reblu/site-ui/utils");
14803
14819
  var import_jsx_runtime17 = require("react/jsx-runtime");
14820
+ var DEFAULT_COURSE_PRICE_BANDS = [
14821
+ { max: 5e3 },
14822
+ { min: 5e3, max: 15e3 },
14823
+ { min: 15e3, max: 3e4 },
14824
+ { min: 3e4 }
14825
+ ];
14826
+ var DEFAULT_COURSE_CATALOG_FILTERS_LABELS = {
14827
+ instructor: "Docente",
14828
+ allInstructors: "Todos",
14829
+ price: "Precio",
14830
+ free: "Gratis",
14831
+ clearAll: "Quitar filtros",
14832
+ priceUnder: (formattedMax) => `Hasta ${formattedMax}`,
14833
+ priceOver: (formattedMin) => `Desde ${formattedMin}`,
14834
+ priceRange: (formattedMin, formattedMax) => `${formattedMin} \u2013 ${formattedMax}`
14835
+ };
14836
+ function instructorName(instructor) {
14837
+ return [instructor.firstName, instructor.lastName].filter(Boolean).join(" ");
14838
+ }
14839
+ function bandLabel(band, t, currencyCode, locale) {
14840
+ if (band.label) return band.label;
14841
+ const fmt = (cents) => formatPrice(cents, currencyCode, locale);
14842
+ if (band.min !== void 0 && band.max !== void 0)
14843
+ return t.priceRange(fmt(band.min), fmt(band.max));
14844
+ if (band.max !== void 0) return t.priceUnder(fmt(band.max));
14845
+ if (band.min !== void 0) return t.priceOver(fmt(band.min));
14846
+ return "";
14847
+ }
14848
+ function CourseCatalogFilters({
14849
+ instructors,
14850
+ hrefs,
14851
+ active = {},
14852
+ onChange,
14853
+ priceBands = DEFAULT_COURSE_PRICE_BANDS,
14854
+ labels,
14855
+ currencyCode,
14856
+ locale,
14857
+ className
14858
+ }) {
14859
+ const t = { ...DEFAULT_COURSE_CATALOG_FILTERS_LABELS, ...labels };
14860
+ const named = instructors.filter((i) => instructorName(i) !== "");
14861
+ const showInstructors = named.length > 0 || active.instructor !== void 0;
14862
+ const isFree = Boolean(active.free);
14863
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: (0, import_utils15.cn)("space-y-6", className), "data-slot": "course-catalog-filters", children: [
14864
+ showInstructors && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(FilterFieldset, { legend: t.instructor, children: [
14865
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14866
+ OptionLink,
14867
+ {
14868
+ href: hrefs.instructor(void 0),
14869
+ active: active.instructor === void 0,
14870
+ label: t.allInstructors,
14871
+ onActivate: onChange ? () => onChange({ instructor: void 0 }) : void 0
14872
+ }
14873
+ ),
14874
+ named.map((instructor) => {
14875
+ const isActive = active.instructor === instructor.id;
14876
+ const next2 = isActive ? void 0 : instructor.id;
14877
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14878
+ OptionLink,
14879
+ {
14880
+ href: hrefs.instructor(next2),
14881
+ active: isActive,
14882
+ label: instructorName(instructor),
14883
+ onActivate: onChange ? () => onChange({ instructor: next2 }) : void 0
14884
+ },
14885
+ instructor.id
14886
+ );
14887
+ })
14888
+ ] }),
14889
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(FilterFieldset, { legend: t.price, children: [
14890
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14891
+ OptionLink,
14892
+ {
14893
+ href: hrefs.free(!isFree),
14894
+ active: isFree,
14895
+ label: t.free,
14896
+ onActivate: onChange ? () => onChange(
14897
+ isFree ? { free: false } : { free: true, priceMin: void 0, priceMax: void 0 }
14898
+ ) : void 0
14899
+ }
14900
+ ),
14901
+ priceBands.map((band, i) => {
14902
+ const isActive = !isFree && active.priceMin === band.min && active.priceMax === band.max;
14903
+ const nextMin = isActive ? void 0 : band.min;
14904
+ const nextMax = isActive ? void 0 : band.max;
14905
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14906
+ OptionLink,
14907
+ {
14908
+ href: hrefs.price(nextMin, nextMax),
14909
+ active: isActive,
14910
+ label: bandLabel(band, t, currencyCode, locale),
14911
+ onActivate: onChange ? () => onChange({ priceMin: nextMin, priceMax: nextMax, free: false }) : void 0
14912
+ },
14913
+ i
14914
+ );
14915
+ })
14916
+ ] }),
14917
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14918
+ "a",
14919
+ {
14920
+ href: hrefs.clearAll(),
14921
+ onClick: onChange ? (event) => {
14922
+ event.preventDefault();
14923
+ onChange({
14924
+ instructor: void 0,
14925
+ priceMin: void 0,
14926
+ priceMax: void 0,
14927
+ free: false
14928
+ });
14929
+ } : void 0,
14930
+ className: "text-sm font-medium text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",
14931
+ children: t.clearAll
14932
+ }
14933
+ )
14934
+ ] });
14935
+ }
14936
+
14937
+ // src/components/cart-line-list.tsx
14938
+ var import_utils16 = require("@reblu/site-ui/utils");
14939
+ var import_jsx_runtime18 = require("react/jsx-runtime");
14804
14940
  var DEFAULT_LABELS2 = {
14805
14941
  quantityLabel: "Cantidad",
14806
14942
  decrease: "Reducir cantidad",
@@ -14826,9 +14962,9 @@ function CartLineList({
14826
14962
  }) {
14827
14963
  const t = { ...DEFAULT_LABELS2, ...labels };
14828
14964
  const noticeContent = notice === true ? t.cancelledNotice : notice;
14829
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: (0, import_utils15.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
14830
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
14831
- noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14965
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: (0, import_utils16.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
14966
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
14967
+ noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14832
14968
  "div",
14833
14969
  {
14834
14970
  role: "status",
@@ -14837,33 +14973,33 @@ function CartLineList({
14837
14973
  children: noticeContent
14838
14974
  }
14839
14975
  ),
14840
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
14976
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
14841
14977
  const maxQty = item.maxStock ?? Infinity;
14842
14978
  const atMax = item.quantity >= maxQty;
14843
14979
  const atMin = item.quantity <= 1;
14844
14980
  const message = lineMessage?.(item);
14845
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14981
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
14846
14982
  "li",
14847
14983
  {
14848
14984
  className: "flex gap-4 rounded-xl border border-border bg-card p-4",
14849
14985
  children: [
14850
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
14851
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "min-w-0 flex-1", children: [
14852
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
14853
- item.variantName && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
14854
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
14986
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
14987
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "min-w-0 flex-1", children: [
14988
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
14989
+ item.variantName && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
14990
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
14855
14991
  formatPrice(item.unitPrice, currencyCode, locale),
14856
14992
  " ",
14857
14993
  t.unitPriceSuffix
14858
14994
  ] }),
14859
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14995
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
14860
14996
  "div",
14861
14997
  {
14862
14998
  role: "group",
14863
14999
  "aria-label": t.quantityLabel,
14864
15000
  className: "mt-3 flex items-center gap-3",
14865
15001
  children: [
14866
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15002
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14867
15003
  "button",
14868
15004
  {
14869
15005
  type: "button",
@@ -14874,8 +15010,8 @@ function CartLineList({
14874
15010
  children: "\u2212"
14875
15011
  }
14876
15012
  ),
14877
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
14878
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15013
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
15014
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14879
15015
  "button",
14880
15016
  {
14881
15017
  type: "button",
@@ -14886,7 +15022,7 @@ function CartLineList({
14886
15022
  children: "+"
14887
15023
  }
14888
15024
  ),
14889
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15025
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14890
15026
  "button",
14891
15027
  {
14892
15028
  type: "button",
@@ -14899,7 +15035,7 @@ function CartLineList({
14899
15035
  ]
14900
15036
  }
14901
15037
  ),
14902
- message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15038
+ message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14903
15039
  "p",
14904
15040
  {
14905
15041
  className: "mt-2 text-sm text-destructive",
@@ -14908,7 +15044,7 @@ function CartLineList({
14908
15044
  }
14909
15045
  )
14910
15046
  ] }),
14911
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
15047
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
14912
15048
  ]
14913
15049
  },
14914
15050
  lineKey(item.productId, item.variantId)
@@ -14918,8 +15054,8 @@ function CartLineList({
14918
15054
  }
14919
15055
 
14920
15056
  // src/components/cart-summary.tsx
14921
- var import_utils16 = require("@reblu/site-ui/utils");
14922
- var import_jsx_runtime18 = require("react/jsx-runtime");
15057
+ var import_utils17 = require("@reblu/site-ui/utils");
15058
+ var import_jsx_runtime19 = require("react/jsx-runtime");
14923
15059
  var DEFAULT_LABELS3 = {
14924
15060
  subtotal: "Subtotal",
14925
15061
  discountPrefix: "Descuento",
@@ -14949,37 +15085,37 @@ function CartSummary({
14949
15085
  const hasDiscount = Boolean(discountAmount && discountAmount > 0);
14950
15086
  const noticeContent = notice === true ? t.cancelledNotice : notice;
14951
15087
  const hasNotice = noticeContent != null && noticeContent !== false;
14952
- const breakdown = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
15088
+ const breakdown = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
14953
15089
  "dl",
14954
15090
  {
14955
- className: (0, import_utils16.cn)("space-y-2 text-sm", !hasNotice && className),
15091
+ className: (0, import_utils17.cn)("space-y-2 text-sm", !hasNotice && className),
14956
15092
  "data-slot": "cart-summary",
14957
15093
  children: [
14958
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14959
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dt", { children: t.subtotal }),
14960
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
15094
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
15095
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.subtotal }),
15096
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
14961
15097
  ] }),
14962
- hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
14963
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
14964
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("dd", { children: [
15098
+ hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
15099
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
15100
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("dd", { children: [
14965
15101
  "-",
14966
15102
  formatPrice(discountAmount, currencyCode, locale)
14967
15103
  ] })
14968
15104
  ] }),
14969
- shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14970
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dt", { children: t.shipping }),
14971
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
15105
+ shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
15106
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.shipping }),
15107
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
14972
15108
  ] }),
14973
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
14974
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dt", { children: t.total }),
14975
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
15109
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
15110
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.total }),
15111
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
14976
15112
  ] })
14977
15113
  ]
14978
15114
  }
14979
15115
  );
14980
15116
  if (!hasNotice) return breakdown;
14981
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: (0, import_utils16.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
14982
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15117
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: (0, import_utils17.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
15118
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14983
15119
  "div",
14984
15120
  {
14985
15121
  role: "status",
@@ -14993,8 +15129,8 @@ function CartSummary({
14993
15129
  }
14994
15130
 
14995
15131
  // src/components/cart-adjustments-notice.tsx
14996
- var import_utils17 = require("@reblu/site-ui/utils");
14997
- var import_jsx_runtime19 = require("react/jsx-runtime");
15132
+ var import_utils18 = require("@reblu/site-ui/utils");
15133
+ var import_jsx_runtime20 = require("react/jsx-runtime");
14998
15134
  var DEFAULT_LABELS4 = {
14999
15135
  removed: (names) => names.length === 1 ? `Hemos quitado del carrito: ${names[0]}, ya no est\xE1 disponible.` : `Hemos quitado del carrito: ${names.join(", ")}, ya no est\xE1n disponibles.`,
15000
15136
  quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
@@ -15028,20 +15164,20 @@ function CartAdjustmentsNotice({
15028
15164
  );
15029
15165
  }
15030
15166
  if (messages.length === 0) return null;
15031
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15167
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15032
15168
  "div",
15033
15169
  {
15034
15170
  role: "status",
15035
- className: (0, import_utils17.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
15171
+ className: (0, import_utils18.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
15036
15172
  "data-slot": "cart-adjustments-notice",
15037
- children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { children: message }, index)) })
15173
+ children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("li", { children: message }, index)) })
15038
15174
  }
15039
15175
  );
15040
15176
  }
15041
15177
 
15042
15178
  // src/components/added-to-cart-toast.tsx
15043
- var import_utils18 = require("@reblu/site-ui/utils");
15044
- var import_jsx_runtime20 = (
15179
+ var import_utils19 = require("@reblu/site-ui/utils");
15180
+ var import_jsx_runtime21 = (
15045
15181
  // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
15046
15182
  require("react/jsx-runtime")
15047
15183
  );
@@ -15064,32 +15200,32 @@ function AddedToCartToast({
15064
15200
  const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
15065
15201
  const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
15066
15202
  const variant = status === "success" ? "success" : "error";
15067
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
15203
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
15068
15204
  "div",
15069
15205
  {
15070
15206
  "data-slot": "added-to-cart-toast",
15071
15207
  "data-variant": variant,
15072
- className: (0, import_utils18.cn)(
15208
+ className: (0, import_utils19.cn)(
15073
15209
  "flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
15074
15210
  variant === "success" && "border-green-600/30 dark:border-green-400/30",
15075
15211
  variant === "error" && "border-destructive/30",
15076
15212
  className
15077
15213
  ),
15078
15214
  children: [
15079
- hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
15080
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "min-w-0 flex-1", children: [
15081
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
15082
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
15215
+ hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
15216
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "min-w-0 flex-1", children: [
15217
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
15218
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
15083
15219
  ] }),
15084
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
15220
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
15085
15221
  ]
15086
15222
  }
15087
15223
  );
15088
15224
  }
15089
15225
 
15090
15226
  // src/components/checkout-login-prompt.tsx
15091
- var import_utils19 = require("@reblu/site-ui/utils");
15092
- var import_jsx_runtime21 = require("react/jsx-runtime");
15227
+ var import_utils20 = require("@reblu/site-ui/utils");
15228
+ var import_jsx_runtime22 = require("react/jsx-runtime");
15093
15229
  var DEFAULT_LABELS6 = {
15094
15230
  title: "Identificaci\xF3n",
15095
15231
  description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
@@ -15116,26 +15252,26 @@ function CheckoutLoginPrompt({
15116
15252
  if (!open) return null;
15117
15253
  const t = { ...DEFAULT_LABELS6, ...labels };
15118
15254
  const isValidEmail = EMAIL_PATTERN.test(email.trim());
15119
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
15120
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
15121
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
15255
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
15256
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
15257
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
15122
15258
  "div",
15123
15259
  {
15124
15260
  role: "dialog",
15125
15261
  "aria-modal": "true",
15126
15262
  "aria-labelledby": "checkout-login-prompt-title",
15127
15263
  "data-slot": "checkout-login-prompt",
15128
- className: (0, import_utils19.cn)(
15264
+ className: (0, import_utils20.cn)(
15129
15265
  "fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 space-y-5 rounded-2xl border border-border bg-background p-6 shadow-2xl",
15130
15266
  className
15131
15267
  ),
15132
15268
  children: [
15133
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
15134
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
15135
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
15136
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
15269
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
15270
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
15271
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
15272
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
15137
15273
  ] }),
15138
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15274
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15139
15275
  "button",
15140
15276
  {
15141
15277
  type: "button",
@@ -15146,9 +15282,9 @@ function CheckoutLoginPrompt({
15146
15282
  }
15147
15283
  )
15148
15284
  ] }),
15149
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "space-y-2", children: [
15150
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
15151
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15285
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-2", children: [
15286
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
15287
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15152
15288
  "input",
15153
15289
  {
15154
15290
  id: "checkout-login-prompt-email",
@@ -15157,29 +15293,29 @@ function CheckoutLoginPrompt({
15157
15293
  value: email,
15158
15294
  onChange: (e) => onEmailChange(e.target.value),
15159
15295
  placeholder: t.emailPlaceholder,
15160
- className: (0, import_utils19.cn)(
15296
+ className: (0, import_utils20.cn)(
15161
15297
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
15162
15298
  error ? "border-destructive" : "border-border focus:border-primary"
15163
15299
  )
15164
15300
  }
15165
15301
  ),
15166
- error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-xs text-destructive", children: error })
15302
+ error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs text-destructive", children: error })
15167
15303
  ] }),
15168
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "space-y-2", children: [
15169
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15304
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-2", children: [
15305
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15170
15306
  "button",
15171
15307
  {
15172
15308
  type: "button",
15173
15309
  onClick: onSubmitEmail,
15174
15310
  disabled: checking || !isValidEmail,
15175
- className: (0, import_utils19.cn)(
15311
+ className: (0, import_utils20.cn)(
15176
15312
  "flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
15177
15313
  checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
15178
15314
  ),
15179
15315
  children: checking ? t.checking : t.continueWithEmail
15180
15316
  }
15181
15317
  ),
15182
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15318
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15183
15319
  "button",
15184
15320
  {
15185
15321
  type: "button",
@@ -15196,9 +15332,9 @@ function CheckoutLoginPrompt({
15196
15332
  }
15197
15333
 
15198
15334
  // src/components/checkout-form.tsx
15199
- var import_utils20 = require("@reblu/site-ui/utils");
15335
+ var import_utils21 = require("@reblu/site-ui/utils");
15200
15336
  var import_phone_input = require("@reblu/site-ui/phone-input");
15201
- var import_jsx_runtime22 = require("react/jsx-runtime");
15337
+ var import_jsx_runtime23 = require("react/jsx-runtime");
15202
15338
  var DEFAULT_LABELS7 = {
15203
15339
  contactTitle: "Datos de contacto",
15204
15340
  nameLabel: "Nombre completo",
@@ -15254,22 +15390,22 @@ function CheckoutForm({
15254
15390
  event.preventDefault();
15255
15391
  if (discountCode.trim() && !discountApplying) onApplyDiscount();
15256
15392
  }
15257
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
15393
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
15258
15394
  loginPrompt,
15259
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
15395
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
15260
15396
  "form",
15261
15397
  {
15262
15398
  "data-testid": "checkout-form",
15263
15399
  onSubmit,
15264
- className: (0, import_utils20.cn)("space-y-8", className),
15400
+ className: (0, import_utils21.cn)("space-y-8", className),
15265
15401
  "data-slot": "checkout-form",
15266
15402
  children: [
15267
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("section", { className: "space-y-4", children: [
15268
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
15269
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15270
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15271
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
15272
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15403
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("section", { className: "space-y-4", children: [
15404
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
15405
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15406
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15407
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
15408
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15273
15409
  "input",
15274
15410
  {
15275
15411
  id: "checkout-form-name",
@@ -15278,17 +15414,17 @@ function CheckoutForm({
15278
15414
  value: contact.name,
15279
15415
  onChange: (e) => patchContact({ name: e.target.value }),
15280
15416
  placeholder: t.namePlaceholder,
15281
- className: (0, import_utils20.cn)(
15417
+ className: (0, import_utils21.cn)(
15282
15418
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
15283
15419
  contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
15284
15420
  )
15285
15421
  }
15286
15422
  ),
15287
- contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
15423
+ contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
15288
15424
  ] }),
15289
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15290
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
15291
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15425
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15426
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
15427
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15292
15428
  "input",
15293
15429
  {
15294
15430
  id: "checkout-form-email",
@@ -15297,15 +15433,15 @@ function CheckoutForm({
15297
15433
  value: contact.email,
15298
15434
  onChange: (e) => patchContact({ email: e.target.value }),
15299
15435
  placeholder: t.emailPlaceholder,
15300
- className: (0, import_utils20.cn)(
15436
+ className: (0, import_utils21.cn)(
15301
15437
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
15302
15438
  contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
15303
15439
  )
15304
15440
  }
15305
15441
  ),
15306
- contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
15442
+ contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
15307
15443
  ] }),
15308
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15444
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15309
15445
  import_phone_input.PhoneInput,
15310
15446
  {
15311
15447
  id: "checkout-form-phone",
@@ -15319,26 +15455,26 @@ function CheckoutForm({
15319
15455
  ] })
15320
15456
  ] }),
15321
15457
  children2,
15322
- generalError ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
15323
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("section", { className: "space-y-3", children: [
15324
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
15325
- autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
15458
+ generalError ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
15459
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("section", { className: "space-y-3", children: [
15460
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
15461
+ autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
15326
15462
  "div",
15327
15463
  {
15328
15464
  className: "flex items-center gap-2 rounded-lg border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-700 dark:border-green-800 dark:bg-green-900/20 dark:text-green-400",
15329
15465
  "data-slot": "checkout-staff-discount",
15330
15466
  children: [
15331
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "font-semibold", children: t.staffDiscountApplied }),
15332
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
15467
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "font-semibold", children: t.staffDiscountApplied }),
15468
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
15333
15469
  ]
15334
15470
  }
15335
15471
  ) : null,
15336
- appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
15337
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
15338
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
15339
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
15472
+ appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
15473
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
15474
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
15475
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
15340
15476
  ] }),
15341
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15477
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15342
15478
  "button",
15343
15479
  {
15344
15480
  type: "button",
@@ -15348,9 +15484,9 @@ function CheckoutForm({
15348
15484
  children: t.removeDiscount
15349
15485
  }
15350
15486
  )
15351
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex gap-2", children: [
15352
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
15353
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15487
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex gap-2", children: [
15488
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
15489
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15354
15490
  "input",
15355
15491
  {
15356
15492
  id: "checkout-form-discount-code",
@@ -15362,7 +15498,7 @@ function CheckoutForm({
15362
15498
  className: "flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm uppercase transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"
15363
15499
  }
15364
15500
  ),
15365
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15501
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15366
15502
  "button",
15367
15503
  {
15368
15504
  type: "button",
@@ -15373,14 +15509,14 @@ function CheckoutForm({
15373
15509
  }
15374
15510
  )
15375
15511
  ] }),
15376
- discountError && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs text-destructive", children: discountError })
15512
+ discountError && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-destructive", children: discountError })
15377
15513
  ] }),
15378
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15514
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15379
15515
  "button",
15380
15516
  {
15381
15517
  type: "submit",
15382
15518
  disabled: submitting || submitDisabled,
15383
- className: (0, import_utils20.cn)(
15519
+ className: (0, import_utils21.cn)(
15384
15520
  "flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
15385
15521
  submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
15386
15522
  ),
@@ -15394,11 +15530,11 @@ function CheckoutForm({
15394
15530
  }
15395
15531
 
15396
15532
  // src/components/order-confirmation.tsx
15397
- var import_utils22 = require("@reblu/site-ui/utils");
15533
+ var import_utils23 = require("@reblu/site-ui/utils");
15398
15534
 
15399
15535
  // src/components/order-invoice-link.tsx
15400
- var import_utils21 = require("@reblu/site-ui/utils");
15401
- var import_jsx_runtime23 = require("react/jsx-runtime");
15536
+ var import_utils22 = require("@reblu/site-ui/utils");
15537
+ var import_jsx_runtime24 = require("react/jsx-runtime");
15402
15538
  var DEFAULT_LABELS8 = {
15403
15539
  linkLabel: "Descargar la factura {number}",
15404
15540
  signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
@@ -15406,8 +15542,8 @@ var DEFAULT_LABELS8 = {
15406
15542
  function OrderInvoiceLink({ invoice, labels, className }) {
15407
15543
  if (!invoice) return null;
15408
15544
  const t = { ...DEFAULT_LABELS8, ...labels };
15409
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: (0, import_utils21.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
15410
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15545
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: (0, import_utils22.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
15546
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
15411
15547
  "a",
15412
15548
  {
15413
15549
  href: invoice.url,
@@ -15415,12 +15551,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
15415
15551
  children: t.linkLabel.replace("{number}", invoice.number)
15416
15552
  }
15417
15553
  ),
15418
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
15554
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
15419
15555
  ] });
15420
15556
  }
15421
15557
 
15422
15558
  // src/components/order-confirmation.tsx
15423
- var import_jsx_runtime24 = require("react/jsx-runtime");
15559
+ var import_jsx_runtime25 = require("react/jsx-runtime");
15424
15560
  var DEFAULT_LABELS9 = {
15425
15561
  pollingTitle: "Confirmando tu pedido\u2026",
15426
15562
  pollingDescription: "Estamos procesando el pago, un momento\u2026",
@@ -15486,43 +15622,43 @@ function OrderConfirmation({
15486
15622
  const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
15487
15623
  const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
15488
15624
  const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
15489
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: (0, import_utils22.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
15490
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h1", { className: "text-3xl font-bold", children: title }),
15491
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
15492
- showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "space-y-6", children: [
15493
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15494
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
15495
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15625
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: (0, import_utils23.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
15626
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h1", { className: "text-3xl font-bold", children: title }),
15627
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
15628
+ showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-6", children: [
15629
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15630
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
15631
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15496
15632
  ] }),
15497
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
15498
- order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
15633
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
15634
+ order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
15499
15635
  "div",
15500
15636
  {
15501
15637
  className: "flex justify-between gap-4 text-sm",
15502
15638
  children: [
15503
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15639
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15504
15640
  item.product.name,
15505
15641
  item.variant ? ` (${item.variant.name})` : "",
15506
15642
  " x",
15507
15643
  item.quantity
15508
15644
  ] }),
15509
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
15645
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
15510
15646
  ]
15511
15647
  },
15512
15648
  idx
15513
15649
  )),
15514
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
15515
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: t.totalLabel }),
15516
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
15650
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
15651
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: t.totalLabel }),
15652
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
15517
15653
  ] }) })
15518
15654
  ] }),
15519
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15655
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15520
15656
  t.confirmationEmailPrefix,
15521
15657
  " ",
15522
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
15658
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
15523
15659
  "."
15524
15660
  ] }),
15525
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
15661
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15526
15662
  OrderInvoiceLink,
15527
15663
  {
15528
15664
  invoice: order.invoice,
@@ -15530,11 +15666,11 @@ function OrderConfirmation({
15530
15666
  }
15531
15667
  )
15532
15668
  ] }),
15533
- showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15534
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
15535
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15669
+ showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15670
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
15671
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15536
15672
  ] }),
15537
- status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
15673
+ status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15538
15674
  "a",
15539
15675
  {
15540
15676
  href: cartHref,
@@ -15542,7 +15678,7 @@ function OrderConfirmation({
15542
15678
  children: t.backToCartLabel
15543
15679
  }
15544
15680
  ),
15545
- showRecheck && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
15681
+ showRecheck && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15546
15682
  "button",
15547
15683
  {
15548
15684
  type: "button",
@@ -15551,16 +15687,16 @@ function OrderConfirmation({
15551
15687
  children: t.recheckLabel
15552
15688
  }
15553
15689
  ),
15554
- showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15555
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
15556
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
15690
+ showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15691
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
15692
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
15557
15693
  ] })
15558
15694
  ] });
15559
15695
  }
15560
15696
 
15561
15697
  // src/components/full-invoice-fields.tsx
15562
- var import_utils23 = require("@reblu/site-ui/utils");
15563
- var import_jsx_runtime25 = require("react/jsx-runtime");
15698
+ var import_utils24 = require("@reblu/site-ui/utils");
15699
+ var import_jsx_runtime26 = require("react/jsx-runtime");
15564
15700
  var EMPTY_FULL_INVOICE_VALUE = {
15565
15701
  wantsFullInvoice: false,
15566
15702
  billingIdType: "NIF",
@@ -15677,12 +15813,12 @@ function FullInvoiceFields({
15677
15813
  const showFields = value.wantsFullInvoice || overCap;
15678
15814
  const isSpanishNif = value.billingIdType === "NIF";
15679
15815
  const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
15680
- const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
15816
+ const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
15681
15817
  const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
15682
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("section", { className: (0, import_utils23.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
15683
- overCap ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
15684
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
15685
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15818
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("section", { className: (0, import_utils24.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
15819
+ overCap ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-1", children: [
15820
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
15821
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15686
15822
  "input",
15687
15823
  {
15688
15824
  type: "checkbox",
@@ -15692,12 +15828,12 @@ function FullInvoiceFields({
15692
15828
  ),
15693
15829
  t.toggle
15694
15830
  ] }),
15695
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
15831
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
15696
15832
  ] }),
15697
- showFields && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15698
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
15699
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
15700
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15833
+ showFields && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15834
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-1", children: [
15835
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
15836
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15701
15837
  "select",
15702
15838
  {
15703
15839
  id: "full-invoice-id-type",
@@ -15706,14 +15842,14 @@ function FullInvoiceFields({
15706
15842
  value: value.billingIdType,
15707
15843
  onChange: (e) => set("billingIdType", e.target.value),
15708
15844
  ...invalid2("billingIdType"),
15709
- children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
15845
+ children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
15710
15846
  }
15711
15847
  ),
15712
15848
  error("billingIdType")
15713
15849
  ] }),
15714
- !isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
15715
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
15716
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
15850
+ !isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-1", children: [
15851
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
15852
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
15717
15853
  "select",
15718
15854
  {
15719
15855
  id: "full-invoice-id-country",
@@ -15723,16 +15859,16 @@ function FullInvoiceFields({
15723
15859
  onChange: (e) => set("billingIdCountry", e.target.value),
15724
15860
  ...invalid2("billingIdCountry"),
15725
15861
  children: [
15726
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
15727
- countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: c.code, children: c.name }, c.code))
15862
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
15863
+ countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: c.code, children: c.name }, c.code))
15728
15864
  ]
15729
15865
  }
15730
15866
  ),
15731
15867
  error("billingIdCountry")
15732
15868
  ] }),
15733
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
15734
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
15735
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15869
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-1", children: [
15870
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
15871
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15736
15872
  "input",
15737
15873
  {
15738
15874
  id: "full-invoice-nif",
@@ -15745,9 +15881,9 @@ function FullInvoiceFields({
15745
15881
  ),
15746
15882
  error("billingNif")
15747
15883
  ] }),
15748
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
15749
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
15750
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15884
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-1", children: [
15885
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
15886
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15751
15887
  "input",
15752
15888
  {
15753
15889
  id: "full-invoice-name",
@@ -15760,9 +15896,9 @@ function FullInvoiceFields({
15760
15896
  ),
15761
15897
  error("billingName")
15762
15898
  ] }),
15763
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
15764
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
15765
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15899
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
15900
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
15901
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15766
15902
  "input",
15767
15903
  {
15768
15904
  id: "full-invoice-street",
@@ -15774,9 +15910,9 @@ function FullInvoiceFields({
15774
15910
  }
15775
15911
  )
15776
15912
  ] }),
15777
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
15778
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
15779
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15913
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-1", children: [
15914
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
15915
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15780
15916
  "input",
15781
15917
  {
15782
15918
  id: "full-invoice-postal-code",
@@ -15787,9 +15923,9 @@ function FullInvoiceFields({
15787
15923
  }
15788
15924
  )
15789
15925
  ] }),
15790
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
15791
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
15792
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15926
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-1", children: [
15927
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
15928
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15793
15929
  "input",
15794
15930
  {
15795
15931
  id: "full-invoice-city",
@@ -15800,9 +15936,9 @@ function FullInvoiceFields({
15800
15936
  }
15801
15937
  )
15802
15938
  ] }),
15803
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
15804
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
15805
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15939
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-1", children: [
15940
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
15941
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15806
15942
  "select",
15807
15943
  {
15808
15944
  id: "full-invoice-country",
@@ -15810,15 +15946,64 @@ function FullInvoiceFields({
15810
15946
  required: true,
15811
15947
  value: value.country,
15812
15948
  onChange: (e) => set("country", e.target.value),
15813
- children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: c.code, children: c.name }, c.code))
15949
+ children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: c.code, children: c.name }, c.code))
15814
15950
  }
15815
15951
  )
15816
15952
  ] }),
15817
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "sm:col-span-2", children: error("address") })
15953
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "sm:col-span-2", children: error("address") })
15818
15954
  ] })
15819
15955
  ] });
15820
15956
  }
15821
15957
 
15958
+ // src/components/contact-interest-field.tsx
15959
+ var import_utils25 = require("@reblu/site-ui/utils");
15960
+ var import_jsx_runtime27 = require("react/jsx-runtime");
15961
+ function ContactInterestField({
15962
+ interest,
15963
+ value,
15964
+ onChange,
15965
+ idPrefix = "contact-interest",
15966
+ disabled,
15967
+ className
15968
+ }) {
15969
+ if (!interest || interest.options.length === 0) return null;
15970
+ const chosen = new Set(value);
15971
+ const toggle = (option2, checked) => {
15972
+ const next2 = new Set(chosen);
15973
+ if (checked) next2.add(option2);
15974
+ else next2.delete(option2);
15975
+ onChange(interest.options.filter((candidate) => next2.has(candidate)));
15976
+ };
15977
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("fieldset", { "data-slot": "contact-interest", className: (0, import_utils25.cn)("space-y-2", className), children: [
15978
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("legend", { className: "text-sm font-medium", children: interest.label }),
15979
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
15980
+ const id = `${idPrefix}-${index}`;
15981
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
15982
+ "label",
15983
+ {
15984
+ htmlFor: id,
15985
+ "data-slot": "contact-interest-option",
15986
+ className: "flex items-center gap-2 text-sm",
15987
+ children: [
15988
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
15989
+ "input",
15990
+ {
15991
+ id,
15992
+ type: "checkbox",
15993
+ checked: chosen.has(option2),
15994
+ disabled,
15995
+ onChange: (event) => toggle(option2, event.target.checked)
15996
+ }
15997
+ ),
15998
+ option2
15999
+ ]
16000
+ },
16001
+ option2
16002
+ );
16003
+ }) })
16004
+ ] });
16005
+ }
16006
+
15822
16007
  // src/index.ts
15823
16008
  var import_site_contracts = require("@reblu/site-contracts");
15824
16009
  // Annotate the CommonJS export names for ESM import in node:
@@ -15830,8 +16015,12 @@ var import_site_contracts = require("@reblu/site-contracts");
15830
16015
  CartSummary,
15831
16016
  CheckoutForm,
15832
16017
  CheckoutLoginPrompt,
16018
+ ContactInterestField,
16019
+ CourseCatalogFilters,
15833
16020
  CourseDescription,
15834
16021
  DATA_REQUEST_TYPES,
16022
+ DEFAULT_COURSE_CATALOG_FILTERS_LABELS,
16023
+ DEFAULT_COURSE_PRICE_BANDS,
15835
16024
  DEFAULT_INVOICE_COUNTRIES,
15836
16025
  DEFAULT_LESSON_PREVIEW_LABELS,
15837
16026
  DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,