@propeller-commerce/propeller-v2-react-ui 0.16.0 → 0.19.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
@@ -5,6 +5,8 @@ var propellerV2CoreUi = require('@propeller-commerce/propeller-v2-core-ui');
5
5
  var React6 = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var propellerSdkV2 = require('@propeller-commerce/propeller-sdk-v2');
8
+ var clsx = require('clsx');
9
+ var tailwindMerge = require('tailwind-merge');
8
10
  var lucideReact = require('lucide-react');
9
11
 
10
12
  function _interopNamespace(e) {
@@ -734,12 +736,33 @@ async function initCart(config) {
734
736
  }
735
737
 
736
738
  // src/composables/react/useCart.ts
739
+ var DEFAULT_IMAGE_SEARCH_FILTERS = { page: 1, offset: 1 };
740
+ var DEFAULT_IMAGE_VARIANT_FILTERS = {
741
+ transformations: [
742
+ { name: "thumb", transformation: { format: "WEBP", height: 100, width: 100, fit: "BOUNDS" } }
743
+ ]
744
+ };
737
745
  function useCart(options) {
738
746
  const { graphqlClient, user, companyId, configuration, onCartCreated } = options;
739
747
  const language = options.language || configuration?.language || "NL";
740
748
  const [cart, setCart] = React6.useState(null);
741
749
  const [createdCartId, setCreatedCartId] = React6.useState("");
742
750
  const cartId = options.cartId || createdCartId;
751
+ const cartIdRef = React6.useRef(cartId);
752
+ if (cartId && cartIdRef.current !== cartId) cartIdRef.current = cartId;
753
+ const rememberCart = React6.useCallback((c) => {
754
+ setCart(c);
755
+ setCreatedCartId(c.cartId);
756
+ cartIdRef.current = c.cartId;
757
+ }, []);
758
+ const imageSearchFilters = React6.useCallback(
759
+ () => configuration?.imageSearchFiltersGrid ?? DEFAULT_IMAGE_SEARCH_FILTERS,
760
+ [configuration]
761
+ );
762
+ const imageVariantFilters = React6.useCallback(
763
+ () => configuration?.imageVariantFiltersSmall ?? DEFAULT_IMAGE_VARIANT_FILTERS,
764
+ [configuration]
765
+ );
743
766
  const [loading, setLoading] = React6.useState(false);
744
767
  const [error, setError] = React6.useState(null);
745
768
  const notesTimers = React6.useRef({});
@@ -771,17 +794,15 @@ function useCart(options) {
771
794
  user,
772
795
  companyId,
773
796
  language,
774
- imageSearchFilters: configuration?.imageSearchFiltersGrid,
775
- imageVariantFilters: configuration?.imageVariantFiltersSmall,
797
+ imageSearchFilters: imageSearchFilters(),
798
+ imageVariantFilters: imageVariantFilters(),
776
799
  onCartCreated: (c) => {
777
- setCart(c);
778
- setCreatedCartId(c.cartId);
800
+ rememberCart(c);
779
801
  onCartCreated?.(c);
780
802
  }
781
803
  };
782
804
  const resolved = await initCart(config);
783
- setCart(resolved);
784
- setCreatedCartId(resolved.cartId);
805
+ rememberCart(resolved);
785
806
  return resolved;
786
807
  }, [graphqlClient, user, companyId, language, configuration, onCartCreated]);
787
808
  const addItem = React6.useCallback(async (opts) => {
@@ -794,14 +815,13 @@ function useCart(options) {
794
815
  }
795
816
  const childItemInputs = opts.childItems?.map((id) => ({ productId: id, quantity: opts.quantity }));
796
817
  if (opts.onAddToCart) {
797
- const resultCart2 = opts.onAddToCart(opts.product, opts.cluster?.clusterId, opts.quantity, childItemInputs, opts.notes, opts.price);
798
- setCart(resultCart2);
799
- setCreatedCartId(resultCart2.cartId);
818
+ const resultCart2 = await opts.onAddToCart(opts.product, opts.cluster?.clusterId, opts.quantity, childItemInputs, opts.notes, opts.price);
819
+ rememberCart(resultCart2);
800
820
  const addedItem2 = resultCart2.items?.find((i) => i.productId === opts.product.productId) ?? null;
801
821
  opts.afterAddToCart?.(resultCart2, addedItem2);
802
822
  return propellerV2CoreUi.ok({ cart: resultCart2, item: addedItem2 });
803
823
  }
804
- let resolvedCartId = opts.cartId || cartId;
824
+ let resolvedCartId = opts.cartId || cartIdRef.current || cartId;
805
825
  if (!resolvedCartId) {
806
826
  if (opts.createCart) {
807
827
  const c = await resolveCart();
@@ -813,11 +833,10 @@ function useCart(options) {
813
833
  id: resolvedCartId,
814
834
  input: { productId: opts.product.productId, quantity: opts.quantity, ...opts.cluster?.clusterId !== void 0 && { clusterId: opts.cluster.clusterId }, ...childItemInputs && { childItems: childItemInputs }, ...opts.notes && { notes: opts.notes }, ...opts.price !== void 0 && { price: opts.price } },
815
835
  language,
816
- imageSearchFilters: configuration?.imageSearchFiltersGrid,
817
- imageVariantFilters: configuration?.imageVariantFiltersSmall
836
+ imageSearchFilters: imageSearchFilters(),
837
+ imageVariantFilters: imageVariantFilters()
818
838
  });
819
- setCart(resultCart);
820
- setCreatedCartId(resultCart.cartId);
839
+ rememberCart(resultCart);
821
840
  const addedItem = resultCart.items?.find((i) => i.productId === opts.product.productId) ?? null;
822
841
  opts.afterAddToCart?.(resultCart, addedItem);
823
842
  return propellerV2CoreUi.ok({ cart: resultCart, item: addedItem });
@@ -828,13 +847,25 @@ function useCart(options) {
828
847
  } finally {
829
848
  setLoading(false);
830
849
  }
831
- }, [graphqlClient, cartId, language, configuration, resolveCart]);
850
+ }, [graphqlClient, cartId, language, configuration, resolveCart, rememberCart, imageSearchFilters, imageVariantFilters]);
851
+ const addItems = React6.useCallback(async (items) => {
852
+ const added = [];
853
+ let lastCart = null;
854
+ for (const item of items) {
855
+ const result = await addItem({ createCart: true, ...item });
856
+ if (!result.ok) return propellerV2CoreUi.err(result.error);
857
+ lastCart = result.data.cart;
858
+ added.push(result.data.item);
859
+ }
860
+ if (!lastCart) return propellerV2CoreUi.err("No items to add");
861
+ return propellerV2CoreUi.ok({ cart: lastCart, items: added });
862
+ }, [addItem]);
832
863
  const updateItemQuantity = React6.useCallback(async (cartItemId, quantity) => {
833
864
  if (!cartId) return void 0;
834
865
  setLoading(true);
835
866
  try {
836
867
  const service = propellerV2CoreUi.createServices(graphqlClient).cart;
837
- const updated = await service.updateCartItem({ id: cartId, itemId: cartItemId, input: { quantity }, language, imageSearchFilters: configuration?.imageSearchFiltersGrid, imageVariantFilters: configuration?.imageVariantFiltersSmall });
868
+ const updated = await service.updateCartItem({ id: cartId, itemId: cartItemId, input: { quantity }, language, imageSearchFilters: imageSearchFilters(), imageVariantFilters: imageVariantFilters() });
838
869
  setCart(updated);
839
870
  return updated;
840
871
  } catch (e) {
@@ -850,7 +881,7 @@ function useCart(options) {
850
881
  if (!cartId) return;
851
882
  try {
852
883
  const service = propellerV2CoreUi.createServices(graphqlClient).cart;
853
- const updated = await service.updateCartItem({ id: cartId, itemId: cartItemId, input: { notes }, language, imageSearchFilters: configuration?.imageSearchFiltersGrid, imageVariantFilters: configuration?.imageVariantFiltersSmall });
884
+ const updated = await service.updateCartItem({ id: cartId, itemId: cartItemId, input: { notes }, language, imageSearchFilters: imageSearchFilters(), imageVariantFilters: imageVariantFilters() });
854
885
  setCart(updated);
855
886
  } catch (e) {
856
887
  setError(e instanceof Error ? e.message : "Failed to update notes");
@@ -866,8 +897,8 @@ function useCart(options) {
866
897
  id: cartId,
867
898
  input: { itemId: cartItemId },
868
899
  language,
869
- imageSearchFilters: configuration?.imageSearchFiltersGrid,
870
- imageVariantFilters: configuration?.imageVariantFiltersSmall
900
+ imageSearchFilters: imageSearchFilters(),
901
+ imageVariantFilters: imageVariantFilters()
871
902
  });
872
903
  setCart(updated);
873
904
  return updated;
@@ -881,7 +912,7 @@ function useCart(options) {
881
912
  if (!cartId) return void 0;
882
913
  try {
883
914
  const service = propellerV2CoreUi.createServices(graphqlClient).cart;
884
- const updated = await service.addActionCodeToCart({ id: cartId, input: { actionCode: code }, language, imageSearchFilters: configuration?.imageSearchFiltersGrid, imageVariantFilters: configuration?.imageVariantFiltersSmall });
915
+ const updated = await service.addActionCodeToCart({ id: cartId, input: { actionCode: code }, language, imageSearchFilters: imageSearchFilters(), imageVariantFilters: imageVariantFilters() });
885
916
  setCart(updated);
886
917
  return updated;
887
918
  } catch (e) {
@@ -892,7 +923,7 @@ function useCart(options) {
892
923
  if (!cartId) return void 0;
893
924
  try {
894
925
  const service = propellerV2CoreUi.createServices(graphqlClient).cart;
895
- const updated = await service.removeActionCodeFromCart({ id: cartId, input: { actionCode: code }, language, imageSearchFilters: configuration?.imageSearchFiltersGrid, imageVariantFilters: configuration?.imageVariantFiltersSmall });
926
+ const updated = await service.removeActionCodeFromCart({ id: cartId, input: { actionCode: code }, language, imageSearchFilters: imageSearchFilters(), imageVariantFilters: imageVariantFilters() });
896
927
  setCart(updated);
897
928
  return updated;
898
929
  } catch (e) {
@@ -920,7 +951,7 @@ function useCart(options) {
920
951
  }
921
952
  }, [graphqlClient, cartId, language]);
922
953
  const getCrossupsells = React6.useCallback(async (opts) => {
923
- const { productId, clusterId, types, taxZone, imageVariantFilters } = opts;
954
+ const { productId, clusterId, types, taxZone } = opts;
924
955
  if (!productId && !clusterId) return [];
925
956
  try {
926
957
  const service = propellerV2CoreUi.createServices(graphqlClient).crossupsell;
@@ -933,8 +964,8 @@ function useCart(options) {
933
964
  ...clusterId && { clusterIdsFrom: [clusterId] }
934
965
  },
935
966
  language,
936
- imageSearchFilters: configuration?.imageSearchFiltersGrid,
937
- imageVariantFilters: imageVariantFilters ?? configuration?.imageVariantFiltersSmall,
967
+ imageSearchFilters: imageSearchFilters(),
968
+ imageVariantFilters: opts.imageVariantFilters ?? imageVariantFilters(),
938
969
  priceCalculateProductInput: {
939
970
  taxZone: taxZone || "NL",
940
971
  ...user && "company" in user && { companyId: user?.company?.companyId },
@@ -947,8 +978,8 @@ function useCart(options) {
947
978
  } catch {
948
979
  return [];
949
980
  }
950
- }, [graphqlClient, language, configuration, user]);
951
- return { cart, cartId, loading, error, checkoutAllowed, resolveCart, addItem, updateItemQuantity, updateItemNotes, deleteItem, addActionCode, removeActionCode, requestAuthorization, processCart, getCrossupsells, getMinQuantity, getStep };
981
+ }, [graphqlClient, language, user, imageSearchFilters, imageVariantFilters]);
982
+ return { cart, cartId, loading, error, checkoutAllowed, resolveCart, addItem, addItems, updateItemQuantity, updateItemNotes, deleteItem, addActionCode, removeActionCode, requestAuthorization, processCart, getCrossupsells, getMinQuantity, getStep };
952
983
  }
953
984
  function buildAddressInput(type, addr) {
954
985
  return {
@@ -1410,7 +1441,7 @@ function useFavorites(options) {
1410
1441
  if (onEdit) {
1411
1442
  onEdit(listId, data);
1412
1443
  cancelEdit();
1413
- onListChanged?.();
1444
+ onListChanged?.({ action: "updated", listId, ...data });
1414
1445
  return;
1415
1446
  }
1416
1447
  setSaving(true);
@@ -1425,7 +1456,7 @@ function useFavorites(options) {
1425
1456
  const updated = await service.updateFavoriteList(listId, { name: data.name, isDefault: data.isDefault });
1426
1457
  setLists((prev) => prev.map((l) => String(l.id) === listId ? updated : l));
1427
1458
  cancelEdit();
1428
- onListChanged?.();
1459
+ onListChanged?.({ action: "updated", listId, name: data.name, isDefault: data.isDefault });
1429
1460
  } catch (e) {
1430
1461
  setError(e instanceof Error ? e.message : "Failed to update list");
1431
1462
  } finally {
@@ -1442,7 +1473,7 @@ function useFavorites(options) {
1442
1473
  if (onDelete) {
1443
1474
  onDelete(listId);
1444
1475
  setListToDelete(null);
1445
- onListChanged?.();
1476
+ onListChanged?.({ action: "deleted", listId, name: list.name });
1446
1477
  return;
1447
1478
  }
1448
1479
  setSaving(true);
@@ -1451,7 +1482,7 @@ function useFavorites(options) {
1451
1482
  try {
1452
1483
  const service = propellerV2CoreUi.createServices(graphqlClient).favoriteList;
1453
1484
  await service.deleteFavoriteList(listId);
1454
- onListChanged?.();
1485
+ onListChanged?.({ action: "deleted", listId, name: list.name });
1455
1486
  } catch (e) {
1456
1487
  setError(e instanceof Error ? e.message : "Failed to delete list");
1457
1488
  setLists((prev) => [...prev, list]);
@@ -1464,7 +1495,7 @@ function useFavorites(options) {
1464
1495
  const data = { name, isDefault };
1465
1496
  if (onCreate) {
1466
1497
  onCreate(data);
1467
- onListChanged?.();
1498
+ onListChanged?.({ action: "created", name, isDefault });
1468
1499
  return;
1469
1500
  }
1470
1501
  setSaving(true);
@@ -1481,7 +1512,7 @@ function useFavorites(options) {
1481
1512
  if (propellerV2CoreUi.isCustomer(user)) createInput.customerId = user.customerId;
1482
1513
  const created = await service.createFavoriteList(createInput);
1483
1514
  setLists((prev) => [...prev, created]);
1484
- onListChanged?.();
1515
+ onListChanged?.({ action: "created", listId: created?.id, name, isDefault });
1485
1516
  } catch (e) {
1486
1517
  setError(e instanceof Error ? e.message : "Failed to create list");
1487
1518
  } finally {
@@ -2203,6 +2234,15 @@ function useProductInfo(options) {
2203
2234
  clusterImageUrl
2204
2235
  };
2205
2236
  }
2237
+
2238
+ // src/composables/shared/utils/listingUserId.ts
2239
+ function resolveListingUserId(user, configuration) {
2240
+ if (user && "contactId" in user) return user.contactId;
2241
+ if (user && "customerId" in user) return user.customerId;
2242
+ return configuration?.anonymousUserId;
2243
+ }
2244
+
2245
+ // src/composables/react/useProductSearch.ts
2206
2246
  var inflightFetches2 = /* @__PURE__ */ new Set();
2207
2247
  function buildAttributeInput(names) {
2208
2248
  if (!names || names.length === 0) return void 0;
@@ -2307,7 +2347,7 @@ function useProductSearch(options) {
2307
2347
  ] : [];
2308
2348
  const priceFilter = options.priceFilterMin !== void 0 || options.priceFilterMax !== void 0 ? { from: options.priceFilterMin ?? 0, to: options.priceFilterMax ?? 999999 } : void 0;
2309
2349
  const inventoryFilter = propellerV2CoreUi.buildInventoryFilter(options.availability, options.minStock);
2310
- const userId = options.user && "contactId" in options.user ? options.user.contactId : options.user && "customerId" in options.user ? options.user.customerId : void 0;
2350
+ const userId = resolveListingUserId(options.user, configuration);
2311
2351
  const contactId = options.user && "contactId" in options.user ? options.user.contactId : void 0;
2312
2352
  const customerId = options.user && "customerId" in options.user ? options.user.customerId : void 0;
2313
2353
  const orderlistScope = options.orderlistIds && options.orderlistIds.length > 0 ? {
@@ -2444,7 +2484,7 @@ function useProductSearch(options) {
2444
2484
  applyOrderlists: options.applyOrderlists !== false,
2445
2485
  orderlistIds: options.orderlistIds
2446
2486
  } : { applyOrderlists: false };
2447
- const userId = options.user && "contactId" in options.user ? options.user.contactId : options.user && "customerId" in options.user ? options.user.customerId : void 0;
2487
+ const userId = resolveListingUserId(options.user, configuration);
2448
2488
  const contactId = options.user && "contactId" in options.user ? options.user.contactId : void 0;
2449
2489
  const customerId = options.user && "customerId" in options.user ? options.user.customerId : void 0;
2450
2490
  const inventoryFilter = propellerV2CoreUi.buildInventoryFilter(options.availability, options.minStock);
@@ -2610,7 +2650,7 @@ function useQuickOrder(options) {
2610
2650
  try {
2611
2651
  const service = propellerV2CoreUi.createServices(graphqlClient).category;
2612
2652
  const orderlistScope = orderlistIds && orderlistIds.length > 0 ? { applyOrderlists: applyOrderlists !== false, orderlistIds } : { applyOrderlists: false };
2613
- const userId = user && "contactId" in user ? user.contactId : user && "customerId" in user ? user.customerId : void 0;
2653
+ const userId = resolveListingUserId(user, configuration);
2614
2654
  const contactId = user && "contactId" in user ? user.contactId : void 0;
2615
2655
  const customerId = user && "customerId" in user ? user.customerId : void 0;
2616
2656
  const input = {
@@ -2752,7 +2792,7 @@ function useSpareParts(options) {
2752
2792
  [isControlled, options.parts, internalParts]
2753
2793
  );
2754
2794
  const isLoading = !isControlled && internalLoading;
2755
- const userId = options.user && "contactId" in options.user ? options.user.contactId : options.user && "customerId" in options.user ? options.user.customerId : void 0;
2795
+ const userId = resolveListingUserId(options.user, options.configuration);
2756
2796
  const contactId = options.user && "contactId" in options.user ? options.user.contactId : void 0;
2757
2797
  const customerId = options.user && "customerId" in options.user ? options.user.customerId : void 0;
2758
2798
  const userKey = `${contactId ?? ""}:${customerId ?? ""}`;
@@ -3055,9 +3095,7 @@ function useProductSlider(options) {
3055
3095
  }
3056
3096
  }
3057
3097
  function resolveUserId() {
3058
- if (options.user && "contactId" in options.user) return options.user.contactId;
3059
- if (options.user && "customerId" in options.user) return options.user.customerId;
3060
- return void 0;
3098
+ return resolveListingUserId(options.user, options.configuration);
3061
3099
  }
3062
3100
  const fetchCrossupsells = React6.useCallback(async (input) => {
3063
3101
  setLoading(true);
@@ -4044,6 +4082,9 @@ LoginFormExport.RegisterLink = LoginFormRegisterLink;
4044
4082
  LoginFormExport.GuestCheckoutButton = LoginFormGuestCheckoutButton;
4045
4083
  LoginFormExport.ErrorMessage = LoginFormErrorMessage;
4046
4084
  var LoginForm_default = LoginFormExport;
4085
+ function cn(...inputs) {
4086
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
4087
+ }
4047
4088
  function AccountIconAndMenu(rawProps) {
4048
4089
  const props = useInfraProps(rawProps);
4049
4090
  const LoginFormImpl = props.loginFormComponent ?? LoginForm_default;
@@ -4192,7 +4233,7 @@ function AccountIconAndMenu(rawProps) {
4192
4233
  onClick: (event) => handleIconClick(),
4193
4234
  "aria-label": propellerV2CoreUi.getLabel(props.labels, "accountLabel", "Account"),
4194
4235
  "data-open": menuOpen ? "true" : "false",
4195
- className: `propeller-account-menu__trigger inline-flex items-center gap-2 px-3 py-2 rounded-control text-sm font-medium transition-colors text-white hover:bg-white/10${props.iconClassName ? " " + props.iconClassName : ""}`,
4236
+ className: cn(`propeller-account-menu__trigger inline-flex items-center gap-2 px-3 py-2 rounded-control text-sm font-medium transition-colors text-white hover:bg-white/10${props.iconClassName ? " " + props.iconClassName : ""}`),
4196
4237
  children: [
4197
4238
  /* @__PURE__ */ jsxRuntime.jsx(
4198
4239
  "svg",
@@ -4220,7 +4261,7 @@ function AccountIconAndMenu(rawProps) {
4220
4261
  menuOpen ? /* @__PURE__ */ jsxRuntime.jsxs(
4221
4262
  "div",
4222
4263
  {
4223
- className: `propeller-account-menu__popover absolute right-0 mt-2 w-80 bg-popover text-foreground rounded-container shadow-lg border border-border py-4 px-5 z-50${props.menuClassName ? " " + props.menuClassName : ""}`,
4264
+ className: cn(`propeller-account-menu__popover absolute right-0 mt-2 w-80 bg-popover text-foreground rounded-container shadow-lg border border-border py-4 px-5 z-50${props.menuClassName ? " " + props.menuClassName : ""}`),
4224
4265
  children: [
4225
4266
  !!props.user ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4226
4267
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-account-menu__user pb-3 mb-3 border-b border-border", children: [
@@ -4431,6 +4472,64 @@ function ActionCode(rawProps) {
4431
4472
  ] });
4432
4473
  }
4433
4474
  var ActionCode_default = ActionCode;
4475
+ function CartBonusItems(rawProps) {
4476
+ const props = useInfraProps(rawProps);
4477
+ const items = props.bonusItems ?? props.cart?.bonusItems ?? [];
4478
+ if (items.length === 0) return null;
4479
+ const currency = props.currency ?? "\u20AC";
4480
+ const money = (value) => propellerV2CoreUi.formatPrice(value, { symbol: currency, locale: propellerV2CoreUi.localeForLanguage(props.language) });
4481
+ const productName = (item) => propellerV2CoreUi.getLocalizedValue(item.product?.names, props.language, "Product");
4482
+ const productImage = (item) => item.product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "";
4483
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-cart-bonus-items ${props.className || "mt-2"}`), children: [
4484
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "propeller-cart-bonus-items__title text-lg font-semibold mb-3", children: propellerV2CoreUi.getLabel(props.labels, "title", "Bonus items") }),
4485
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cart-bonus-items__list space-y-4", children: items.map((item) => {
4486
+ const img = productImage(item);
4487
+ const name = productName(item);
4488
+ const total = props.includeTax ? item.totalPriceNet : item.totalPrice;
4489
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4490
+ "div",
4491
+ {
4492
+ className: "propeller-cart-bonus-item flex items-center gap-4 bg-card p-4 rounded-container shadow-sm border border-border",
4493
+ children: [
4494
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cart-bonus-item__media w-20 h-20 flex-shrink-0 bg-surface-hover rounded-control overflow-hidden flex items-center justify-center", children: img ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: "propeller-cart-bonus-item__image w-full h-full object-contain p-1", src: img, alt: name }) : /* @__PURE__ */ jsxRuntime.jsx(
4495
+ "svg",
4496
+ {
4497
+ fill: "none",
4498
+ viewBox: "0 0 24 24",
4499
+ stroke: "currentColor",
4500
+ className: "propeller-cart-bonus-item__image-placeholder w-8 h-8 text-foreground-subtle",
4501
+ strokeWidth: 1.5,
4502
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4503
+ "path",
4504
+ {
4505
+ strokeLinecap: "round",
4506
+ strokeLinejoin: "round",
4507
+ d: "M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5A2.25 2.25 0 0022.5 18.75V5.25A2.25 2.25 0 0020.25 3H3.75A2.25 2.25 0 001.5 5.25v13.5A2.25 2.25 0 003.75 21z"
4508
+ }
4509
+ )
4510
+ }
4511
+ ) }),
4512
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-bonus-item__body flex-1 min-w-0", children: [
4513
+ item.product?.sku ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "propeller-cart-bonus-item__sku font-mono text-xs text-foreground-subtle", children: [
4514
+ propellerV2CoreUi.getLabel(props.labels, "sku", "SKU"),
4515
+ ": ",
4516
+ item.product.sku
4517
+ ] }) : null,
4518
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-cart-bonus-item__title font-semibold text-sm md:text-base text-foreground line-clamp-2", children: name })
4519
+ ] }),
4520
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-bonus-item__qty text-sm text-muted-foreground whitespace-nowrap", children: [
4521
+ item.quantity,
4522
+ " \xD7"
4523
+ ] }),
4524
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cart-bonus-item__price font-semibold text-foreground whitespace-nowrap", children: money(total) })
4525
+ ]
4526
+ },
4527
+ item.itemId
4528
+ );
4529
+ }) })
4530
+ ] });
4531
+ }
4532
+ var CartBonusItems_default = CartBonusItems;
4434
4533
  function mergeGrouped(p) {
4435
4534
  const d = p.display;
4436
4535
  const e = p.events;
@@ -4464,6 +4563,7 @@ function AddToCart(rawProps) {
4464
4563
  const [modalVisible, setModalVisible] = React6.useState(() => false);
4465
4564
  const [addedCartItem, setAddedCartItem] = React6.useState(() => null);
4466
4565
  const [activeFullCart, setActiveFullCart] = React6.useState(() => null);
4566
+ const [grantedBonusItems, setGrantedBonusItems] = React6.useState(() => []);
4467
4567
  const [includeTax] = React6.useState(() => false);
4468
4568
  function getProductUrl2() {
4469
4569
  return props.configuration?.urls?.getProductUrl(props.product, props.language) ?? "#";
@@ -4506,9 +4606,9 @@ function AddToCart(rawProps) {
4506
4606
  if (addedCartItem) {
4507
4607
  const useTax = props.includeTax !== void 0 ? !!props.includeTax : includeTax;
4508
4608
  const price = useTax ? addedCartItem.totalSumNet : addedCartItem.totalSum;
4509
- return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC" });
4609
+ return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
4510
4610
  }
4511
- return propellerV2CoreUi.formatPrice(props.price !== void 0 ? props.price : props.product?.price?.gross, { symbol: props.currency ?? "\u20AC" });
4611
+ return propellerV2CoreUi.formatPrice(props.price !== void 0 ? props.price : props.product?.price?.gross, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
4512
4612
  }
4513
4613
  function getModalSku() {
4514
4614
  if (addedCartItem) return addedCartItem.product?.sku || "";
@@ -4542,10 +4642,20 @@ function AddToCart(rawProps) {
4542
4642
  function closeModal() {
4543
4643
  setModalVisible(false);
4544
4644
  setAddedCartItem(null);
4645
+ setGrantedBonusItems([]);
4646
+ }
4647
+ function newBonusItems(before, after) {
4648
+ const granted = after?.bonusItems ?? [];
4649
+ if (granted.length === 0) return [];
4650
+ const previous = before?.bonusItems;
4651
+ if (!previous) return granted;
4652
+ const seen = new Map(previous.map((item) => [item.itemId, item.quantity ?? 0]));
4653
+ return granted.filter((item) => (item.quantity ?? 0) > (seen.get(item.itemId) ?? 0));
4545
4654
  }
4546
4655
  async function handleAddToCart() {
4547
4656
  if (!props.graphqlClient) return;
4548
4657
  if (props.beforeAddToCart && !props.beforeAddToCart()) return;
4658
+ const cartBeforeAdd = activeFullCart ?? cart ?? null;
4549
4659
  const result = await addItem({
4550
4660
  product: props.product,
4551
4661
  cluster: props.cluster,
@@ -4557,6 +4667,7 @@ function AddToCart(rawProps) {
4557
4667
  afterAddToCart: (resultCart, addedItem) => {
4558
4668
  setActiveFullCart(resultCart);
4559
4669
  setAddedCartItem(resolveAddedItem(resultCart, addedItem || null));
4670
+ setGrantedBonusItems(newBonusItems(cartBeforeAdd, resultCart));
4560
4671
  props.afterAddToCart?.(resultCart, addedItem || void 0);
4561
4672
  },
4562
4673
  enableStockValidation: props.enableStockValidation,
@@ -4581,7 +4692,7 @@ function AddToCart(rawProps) {
4581
4692
  return /* @__PURE__ */ jsxRuntime.jsxs(
4582
4693
  "div",
4583
4694
  {
4584
- className: `propeller-add-to-cart ${props.className || ""}`,
4695
+ className: cn(`propeller-add-to-cart ${props.className || ""}`),
4585
4696
  "data-loading": loading ? "true" : "false",
4586
4697
  children: [
4587
4698
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-add-to-cart__controls flex flex-wrap items-center gap-2 w-full md:flex-nowrap", children: [
@@ -4853,12 +4964,22 @@ function AddToCart(rawProps) {
4853
4964
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-1", children: propellerV2CoreUi.getLocalizedValue(child.product?.names, props.language, "Option") }),
4854
4965
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle whitespace-nowrap ml-2", children: propellerV2CoreUi.formatPrice(
4855
4966
  ((props.includeTax !== void 0 ? !!props.includeTax : includeTax) ? child.totalSumNet : child.totalSum) ?? 0,
4856
- { symbol: props.currency ?? "\u20AC" }
4967
+ { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) }
4857
4968
  ) })
4858
4969
  ]
4859
4970
  },
4860
4971
  idx
4861
- )) }) : null
4972
+ )) }) : null,
4973
+ grantedBonusItems.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-add-to-cart__modal-bonus-items mt-4 pt-4 border-t border-border-subtle", children: /* @__PURE__ */ jsxRuntime.jsx(
4974
+ CartBonusItems_default,
4975
+ {
4976
+ bonusItems: grantedBonusItems,
4977
+ includeTax: props.includeTax,
4978
+ currency: props.currency,
4979
+ language: props.language,
4980
+ labels: props.bonusItemsLabels
4981
+ }
4982
+ ) }) : null
4862
4983
  ] }),
4863
4984
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-add-to-cart__modal-actions flex gap-3 px-6 py-4 border-t border-border-subtle", children: [
4864
4985
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -4951,7 +5072,14 @@ function AddToFavorite(rawProps) {
4951
5072
  setMemberListIds(newMemberIds);
4952
5073
  setSelectedListId("");
4953
5074
  setIsOpen(false);
4954
- if (props.onFavoriteChanged) props.onFavoriteChanged();
5075
+ if (props.onFavoriteChanged) {
5076
+ props.onFavoriteChanged({
5077
+ action: "added",
5078
+ listId: selectedListId,
5079
+ productId: props.productId,
5080
+ clusterId: props.clusterId
5081
+ });
5082
+ }
4955
5083
  } catch (error) {
4956
5084
  console.error("Error adding to favorite list:", error);
4957
5085
  } finally {
@@ -4968,7 +5096,14 @@ function AddToFavorite(rawProps) {
4968
5096
  setMemberListIds(newMemberIds);
4969
5097
  setSelectedListId("");
4970
5098
  setIsOpen(false);
4971
- if (props.onFavoriteChanged) props.onFavoriteChanged();
5099
+ if (props.onFavoriteChanged) {
5100
+ props.onFavoriteChanged({
5101
+ action: "removed",
5102
+ listId,
5103
+ productId: props.productId,
5104
+ clusterId: props.clusterId
5105
+ });
5106
+ }
4972
5107
  } catch (error) {
4973
5108
  console.error("Error removing from favorite list:", error);
4974
5109
  } finally {
@@ -5008,7 +5143,7 @@ function AddToFavorite(rawProps) {
5008
5143
  type: "button",
5009
5144
  onClick: (event) => toggleModal(),
5010
5145
  title: isFavorited() ? propellerV2CoreUi.getLabel(props.labels, "removeFromFavorites", "Remove from favorites") : propellerV2CoreUi.getLabel(props.labels, "addToFavorites", "Add to favorites"),
5011
- className: `propeller-add-to-favorite__btn inline-flex items-center justify-center rounded-control border p-2.5 transition-colors ${isFavorited() ? "border-primary/30 bg-primary/5 text-primary hover:bg-primary/10" : "border-border bg-card text-foreground-subtle hover:text-primary hover:border-primary/30 hover:bg-primary/5"} ${props.className || ""}`,
5146
+ className: cn(`propeller-add-to-favorite__btn inline-flex items-center justify-center rounded-control border p-2.5 transition-colors ${isFavorited() ? "border-primary/30 bg-primary/5 text-primary hover:bg-primary/10" : "border-border bg-card text-foreground-subtle hover:text-primary hover:border-primary/30 hover:bg-primary/5"} ${props.className || ""}`),
5012
5147
  children: [
5013
5148
  isFavorited() ? /* @__PURE__ */ jsxRuntime.jsx(
5014
5149
  "svg",
@@ -6157,7 +6292,7 @@ function AddressSelector(props) {
6157
6292
  setIsLoading(false);
6158
6293
  }
6159
6294
  }
6160
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-address-selector ${props.className || ""}`, children: [
6295
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-address-selector ${props.className || ""}`), children: [
6161
6296
  /* @__PURE__ */ jsxRuntime.jsxs(
6162
6297
  "button",
6163
6298
  {
@@ -6300,7 +6435,7 @@ function Breadcrumbs(props) {
6300
6435
  return index === displayItems.length - 1;
6301
6436
  }
6302
6437
  const showSeparatorBefore = (index) => props.showHome !== false || index > 0;
6303
- return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": propellerV2CoreUi.getLabel(props.labels, "breadcrumbAriaLabel", "Breadcrumb"), className: `propeller-breadcrumbs ${props.className || ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs("ol", { className: "propeller-breadcrumbs__list flex flex-wrap items-center text-sm text-muted-foreground", children: [
6438
+ return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": propellerV2CoreUi.getLabel(props.labels, "breadcrumbAriaLabel", "Breadcrumb"), className: cn(`propeller-breadcrumbs ${props.className || ""}`), children: /* @__PURE__ */ jsxRuntime.jsxs("ol", { className: "propeller-breadcrumbs__list flex flex-wrap items-center text-sm text-muted-foreground", children: [
6304
6439
  props.showHome !== false ? /* @__PURE__ */ jsxRuntime.jsx("li", { className: "propeller-breadcrumbs__item flex items-center", "data-home": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
6305
6440
  "a",
6306
6441
  {
@@ -6370,64 +6505,6 @@ function BreadcrumbsWithProvider(rawProps) {
6370
6505
  return /* @__PURE__ */ jsxRuntime.jsx(Breadcrumbs_default, { ...props });
6371
6506
  }
6372
6507
  var BreadcrumbsWithProvider_default = BreadcrumbsWithProvider;
6373
- function CartBonusItems(rawProps) {
6374
- const props = useInfraProps(rawProps);
6375
- const items = props.bonusItems ?? props.cart?.bonusItems ?? [];
6376
- if (items.length === 0) return null;
6377
- const currency = props.currency ?? "\u20AC";
6378
- const money = (value) => propellerV2CoreUi.formatPrice(value, { symbol: currency });
6379
- const productName = (item) => propellerV2CoreUi.getLocalizedValue(item.product?.names, props.language, "Product");
6380
- const productImage = (item) => item.product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "";
6381
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-cart-bonus-items ${props.className || "mt-2"}`, children: [
6382
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "propeller-cart-bonus-items__title text-lg font-semibold mb-3", children: propellerV2CoreUi.getLabel(props.labels, "title", "Bonus items") }),
6383
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cart-bonus-items__list space-y-4", children: items.map((item) => {
6384
- const img = productImage(item);
6385
- const name = productName(item);
6386
- const total = props.includeTax ? item.totalPriceNet : item.totalPrice;
6387
- return /* @__PURE__ */ jsxRuntime.jsxs(
6388
- "div",
6389
- {
6390
- className: "propeller-cart-bonus-item flex items-center gap-4 bg-card p-4 rounded-container shadow-sm border border-border",
6391
- children: [
6392
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cart-bonus-item__media w-20 h-20 flex-shrink-0 bg-surface-hover rounded-control overflow-hidden flex items-center justify-center", children: img ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: "propeller-cart-bonus-item__image w-full h-full object-contain p-1", src: img, alt: name }) : /* @__PURE__ */ jsxRuntime.jsx(
6393
- "svg",
6394
- {
6395
- fill: "none",
6396
- viewBox: "0 0 24 24",
6397
- stroke: "currentColor",
6398
- className: "propeller-cart-bonus-item__image-placeholder w-8 h-8 text-foreground-subtle",
6399
- strokeWidth: 1.5,
6400
- children: /* @__PURE__ */ jsxRuntime.jsx(
6401
- "path",
6402
- {
6403
- strokeLinecap: "round",
6404
- strokeLinejoin: "round",
6405
- d: "M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5A2.25 2.25 0 0022.5 18.75V5.25A2.25 2.25 0 0020.25 3H3.75A2.25 2.25 0 001.5 5.25v13.5A2.25 2.25 0 003.75 21z"
6406
- }
6407
- )
6408
- }
6409
- ) }),
6410
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-bonus-item__body flex-1 min-w-0", children: [
6411
- item.product?.sku ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "propeller-cart-bonus-item__sku font-mono text-xs text-foreground-subtle", children: [
6412
- propellerV2CoreUi.getLabel(props.labels, "sku", "SKU"),
6413
- ": ",
6414
- item.product.sku
6415
- ] }) : null,
6416
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-cart-bonus-item__title font-semibold text-sm md:text-base text-foreground line-clamp-2", children: name })
6417
- ] }),
6418
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-bonus-item__qty text-sm text-muted-foreground whitespace-nowrap", children: [
6419
- item.quantity,
6420
- " \xD7"
6421
- ] }),
6422
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cart-bonus-item__price font-semibold text-foreground whitespace-nowrap", children: money(total) })
6423
- ]
6424
- },
6425
- item.itemId
6426
- );
6427
- }) })
6428
- ] });
6429
- }
6430
- var CartBonusItems_default = CartBonusItems;
6431
6508
 
6432
6509
  // src/composables/shared/utils/preselect.ts
6433
6510
  function pickPreselected(items, stored, keyOf) {
@@ -6441,7 +6518,7 @@ function CartCarriers(props) {
6441
6518
  const carriers = props.cart?.carriers || [];
6442
6519
  function formatCarrierPrice(price) {
6443
6520
  if (props.formatPrice) return props.formatPrice(price);
6444
- return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC" });
6521
+ return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
6445
6522
  }
6446
6523
  function handleSelect(carrier) {
6447
6524
  setSelectedName(carrier.name);
@@ -6525,7 +6602,7 @@ function ItemStock(props) {
6525
6602
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: hasInventory() ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
6526
6603
  "div",
6527
6604
  {
6528
- className: `propeller-item-stock flex flex-wrap items-center gap-1.5 ${props.className || ""}`,
6605
+ className: cn(`propeller-item-stock flex flex-wrap items-center gap-1.5 ${props.className || ""}`),
6529
6606
  "data-available": isAvailable() ? "true" : "false",
6530
6607
  "data-stock": getStockStatusData(),
6531
6608
  children: [
@@ -6638,7 +6715,7 @@ function CartItem(rawProps) {
6638
6715
  function getFormattedPrice() {
6639
6716
  const item = props.cartItem;
6640
6717
  const price = props.includeTax ? item?.totalSumNet || 0 : item?.totalSum || 0;
6641
- return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC" });
6718
+ return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
6642
6719
  }
6643
6720
  function isBundleItem() {
6644
6721
  return !!props.cartItem.bundle;
@@ -6649,7 +6726,7 @@ function CartItem(rawProps) {
6649
6726
  function getBundlePrice2() {
6650
6727
  const price = props.cartItem.bundle?.price?.net;
6651
6728
  if (price === void 0 || price === null) return "";
6652
- return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC" });
6729
+ return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
6653
6730
  }
6654
6731
  function getBundleLeaderName() {
6655
6732
  const items = props.cartItem.bundle?.items;
@@ -6665,7 +6742,7 @@ function CartItem(rawProps) {
6665
6742
  if (!leader) return "";
6666
6743
  const price = leader.price?.net;
6667
6744
  if (price === void 0 || price === null) return "";
6668
- return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC" });
6745
+ return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
6669
6746
  }
6670
6747
  function getBundleNonLeaders2() {
6671
6748
  const items = props.cartItem.bundle?.items;
@@ -6678,7 +6755,7 @@ function CartItem(rawProps) {
6678
6755
  function getBundleItemPrice(bundleItem) {
6679
6756
  const price = bundleItem.price?.net;
6680
6757
  if (price === void 0 || price === null) return "";
6681
- return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC" });
6758
+ return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
6682
6759
  }
6683
6760
  function getCrossupsellName(item) {
6684
6761
  const product = item?.productTo || item?.clusterTo;
@@ -6771,7 +6848,7 @@ function CartItem(rawProps) {
6771
6848
  if (!price) return "";
6772
6849
  const value = props.includeTax ? price.net : price.gross;
6773
6850
  if (value === void 0 || value === null) return "";
6774
- return propellerV2CoreUi.formatPrice(value, { symbol: props.currency ?? "\u20AC" });
6851
+ return propellerV2CoreUi.formatPrice(value, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
6775
6852
  }
6776
6853
  async function handleAddCrossupsellToCart(item) {
6777
6854
  if (!props.cartId || addingCrossupsellId) return;
@@ -6854,7 +6931,7 @@ function CartItem(rawProps) {
6854
6931
  return /* @__PURE__ */ jsxRuntime.jsx(CartItemContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
6855
6932
  "div",
6856
6933
  {
6857
- className: `propeller-cart-item flex flex-wrap md:flex-nowrap items-start gap-4 ${props.cardFrame === false ? "" : "bg-card p-4 rounded-container shadow-sm border border-border"} ${props.className || ""}`,
6934
+ className: cn(`propeller-cart-item flex flex-wrap md:flex-nowrap items-start gap-4 ${props.cardFrame === false ? "" : "bg-card p-4 rounded-container shadow-sm border border-border"} ${props.className || ""}`),
6858
6935
  "data-bundle": isBundleItem() ? "true" : "false",
6859
6936
  "data-loading": loading ? "true" : "false",
6860
6937
  children: rawProps.children
@@ -6864,7 +6941,7 @@ function CartItem(rawProps) {
6864
6941
  return /* @__PURE__ */ jsxRuntime.jsx(CartItemContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs(
6865
6942
  "div",
6866
6943
  {
6867
- className: `propeller-cart-item flex flex-wrap md:flex-nowrap items-start gap-4 ${props.cardFrame === false ? "" : "bg-card p-4 rounded-container shadow-sm border border-border"} ${props.className || ""}`,
6944
+ className: cn(`propeller-cart-item flex flex-wrap md:flex-nowrap items-start gap-4 ${props.cardFrame === false ? "" : "bg-card p-4 rounded-container shadow-sm border border-border"} ${props.className || ""}`),
6868
6945
  "data-bundle": isBundleItem() ? "true" : "false",
6869
6946
  "data-loading": loading ? "true" : "false",
6870
6947
  children: [
@@ -7011,7 +7088,7 @@ function CartItemChildItems(props = {}) {
7011
7088
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle hidden sm:inline", children: "-" }),
7012
7089
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle text-xs self-center", children: child.product.sku }),
7013
7090
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 border-b border-dotted border-border mx-1 mb-1" }),
7014
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: propellerV2CoreUi.formatPrice(child.totalSum, { symbol: resolved.currency ?? "\u20AC" }) })
7091
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: propellerV2CoreUi.formatPrice(child.totalSum, { symbol: resolved.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(resolved.language) }) })
7015
7092
  ] }, idx))
7016
7093
  ] });
7017
7094
  }
@@ -7252,7 +7329,7 @@ function CartIconAndSidebar(rawProps) {
7252
7329
  const CartBonusItemsImpl = props.cartBonusItemsComponent ?? CartBonusItems_default;
7253
7330
  const CartItemImpl = props.cartItemComponent ?? CartItem_default;
7254
7331
  const currencySymbol = props.currency ?? "\u20AC";
7255
- const money = (value) => value === void 0 || value === null ? "" : propellerV2CoreUi.formatPrice(value, { symbol: currencySymbol });
7332
+ const money = (value) => value === void 0 || value === null ? "" : propellerV2CoreUi.formatPrice(value, { symbol: currencySymbol, locale: propellerV2CoreUi.localeForLanguage(props.language) });
7256
7333
  const { requestAuthorization } = useCart({
7257
7334
  graphqlClient: props.graphqlClient,
7258
7335
  user: props.user ?? null,
@@ -7273,6 +7350,9 @@ function CartIconAndSidebar(rawProps) {
7273
7350
  const useTax = !!props.includeTax;
7274
7351
  const totalRaw = useTax ? props.cart?.total?.totalNet : props.cart?.total?.totalGross;
7275
7352
  const totalPrice = totalRaw === void 0 || totalRaw === null ? money(0) : money(totalRaw);
7353
+ function totalLabel(key) {
7354
+ return useTax ? propellerV2CoreUi.getLabel(props.labels, key, "Total") : propellerV2CoreUi.getLabel(props.labels, "totalExclVat", "Total excl. VAT");
7355
+ }
7276
7356
  const sidebarTitle = props.cartSidebarTitle || props.labels?.["cartSidebarTitle"] || "Shopping cart";
7277
7357
  const purchaserPAC = findPurchaserPAC(props.user, props.companyId);
7278
7358
  const totalGross = props.cart?.total?.totalGross ?? 0;
@@ -7336,7 +7416,7 @@ function CartIconAndSidebar(rawProps) {
7336
7416
  type: "button",
7337
7417
  onClick: () => handleIconClick(),
7338
7418
  "aria-label": propellerV2CoreUi.getLabel(props.labels, "cartIconLabel", "Shopping cart"),
7339
- className: `propeller-cart-icon__trigger relative inline-flex items-center justify-center p-2 rounded-control transition-colors text-foreground${props.iconClassName ? " " + props.iconClassName : ""}`,
7419
+ className: cn(`propeller-cart-icon__trigger relative inline-flex items-center justify-center p-2 rounded-control transition-colors text-foreground${props.iconClassName ? " " + props.iconClassName : ""}`),
7340
7420
  children: [
7341
7421
  /* @__PURE__ */ jsxRuntime.jsx(
7342
7422
  "svg",
@@ -7362,7 +7442,7 @@ function CartIconAndSidebar(rawProps) {
7362
7442
  ),
7363
7443
  props.showTotals && isHovered && totalItems > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-icon__popover absolute top-full right-0 mt-1 z-40 bg-popover border border-border rounded-container shadow-lg px-3 py-2 min-w-[140px] text-sm whitespace-nowrap", children: [
7364
7444
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between gap-4", children: [
7365
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-icon__popover-label text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "totalLabel", "Total") }),
7445
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-icon__popover-label text-muted-foreground", children: totalLabel("totalLabel") }),
7366
7446
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-icon__popover-total font-semibold text-foreground", children: totalPrice })
7367
7447
  ] }),
7368
7448
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-icon__popover-count text-xs text-foreground-subtle mt-0.5", children: [
@@ -7388,7 +7468,7 @@ function CartIconAndSidebar(rawProps) {
7388
7468
  "aria-modal": "true",
7389
7469
  "aria-label": sidebarTitle,
7390
7470
  "data-open": sidebarOpen ? "true" : "false",
7391
- className: `propeller-cart-icon__sidebar fixed inset-y-0 right-0 z-[70] w-full max-w-md bg-card shadow-2xl transform transition-transform duration-300 ease-in-out border-l border-border${sidebarOpen ? " translate-x-0" : " translate-x-full"}${props.sidebarClassName ? " " + props.sidebarClassName : ""}`,
7471
+ className: cn(`propeller-cart-icon__sidebar fixed inset-y-0 right-0 z-[70] w-full max-w-md bg-card shadow-2xl transform transition-transform duration-300 ease-in-out border-l border-border${sidebarOpen ? " translate-x-0" : " translate-x-full"}${props.sidebarClassName ? " " + props.sidebarClassName : ""}`),
7392
7472
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col h-full", children: isMounted ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7393
7473
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-icon__sidebar-header flex items-center justify-between px-5 py-4 border-b border-border", children: [
7394
7474
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
@@ -7517,7 +7597,7 @@ function CartIconAndSidebar(rawProps) {
7517
7597
  " ",
7518
7598
  items.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-icon__sidebar-footer px-5 py-4 border-t border-border space-y-3 bg-surface-hover", children: [
7519
7599
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-icon__total-row flex justify-between items-center", children: [
7520
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-icon__total-label text-sm font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "total", "Total") }),
7600
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-icon__total-label text-sm font-medium text-muted-foreground", children: totalLabel("total") }),
7521
7601
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-icon__total-value text-base font-bold text-foreground", children: totalPrice })
7522
7602
  ] }),
7523
7603
  showCheckoutButton && !showRequestAuthorizationButton ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -7759,7 +7839,7 @@ function CartPaymethods(rawProps) {
7759
7839
  });
7760
7840
  function formatMethodPrice(price) {
7761
7841
  if (props.formatPrice) return props.formatPrice(price);
7762
- return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC" });
7842
+ return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
7763
7843
  }
7764
7844
  function methodName(method) {
7765
7845
  const code = (method.code || "").toLowerCase();
@@ -7845,7 +7925,7 @@ function CartSummary(rawProps) {
7845
7925
  if (props.formatPrice) {
7846
7926
  return props.formatPrice(price);
7847
7927
  }
7848
- return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC" });
7928
+ return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
7849
7929
  }
7850
7930
  function subtotal() {
7851
7931
  return props.cart?.total?.subTotal || 0;
@@ -7924,83 +8004,96 @@ function CartSummary(rawProps) {
7924
8004
  setRequestLoading(false);
7925
8005
  }
7926
8006
  }
7927
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary w-full bg-card space-y-3", children: [
7928
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "propeller-cart-summary__title text-xl font-bold mb-4", children: title() }),
7929
- showSubtotal() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground", "data-row": "subtotal", children: [
7930
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "subtotal", "Subtotal:") }),
7931
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(subtotal()) })
7932
- ] }) : null,
7933
- showDiscount() && hasDiscount() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-success", "data-row": "discount", children: [
7934
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "discount", "Discount:") }),
7935
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "propeller-cart-summary__value", children: [
7936
- "-",
7937
- formatItemPrice(discountAmount())
7938
- ] })
7939
- ] }) : null,
7940
- hasTransactionCosts() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground", "data-row": "transaction-costs", children: [
7941
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "transactionCosts", "Transaction costs:") }),
7942
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(transactionCosts()) })
7943
- ] }) : null,
7944
- showShippingCosts() && hasShippingCosts() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground", "data-row": "shipping-costs", children: [
7945
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "shippingCosts", "Shipping costs:") }),
7946
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(shippingCosts()) })
7947
- ] }) : null,
7948
- showTotalExclVat() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground pt-2 border-t", "data-row": "total-excl-vat", children: [
7949
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "totalExclVat", "Total excl. VAT:") }),
7950
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(totalExclVat()) })
7951
- ] }) : null,
7952
- showVATs() && taxLevels().length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: taxLevels()?.map((tax, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground text-sm", "data-row": "vat-line", children: [
7953
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "propeller-cart-summary__label", children: [
7954
- tax.taxPercentage,
7955
- "% ",
7956
- propellerV2CoreUi.getLabel(props.labels, "vat", "VAT"),
7957
- ":"
7958
- ] }),
7959
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(Number(tax.price)) })
7960
- ] }, index)) }) : null,
7961
- showTotalVat() && totalVat() > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground text-sm", "data-row": "total-vat", children: [
7962
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "totalVat", "Total VAT:") }),
7963
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(totalVat()) })
7964
- ] }) : null,
7965
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row propeller-cart-summary__row--total flex justify-between text-xl font-bold pt-4 border-t text-foreground mt-2", "data-row": "total", children: [
7966
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "total", "Total:") }),
7967
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(totalInclVat()) })
7968
- ] }),
7969
- showCheckoutButton() && !showRequestAuthorizationButton() ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7970
- /* @__PURE__ */ jsxRuntime.jsx(
7971
- "button",
7972
- {
7973
- type: "button",
7974
- className: "propeller-cart-summary__checkout-btn block w-full bg-secondary text-secondary-foreground text-center py-3 rounded-container hover:bg-secondary/90 transition font-semibold mt-4",
7975
- onClick: (event) => handleCheckoutClick(),
7976
- children: propellerV2CoreUi.getLabel(props.labels, "checkoutButton", "Continue to Checkout")
7977
- }
8007
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8008
+ "div",
8009
+ {
8010
+ className: cn(
8011
+ // Padding, radius and shadow to match ActionCode, which sits directly
8012
+ // under this panel on the cart page. Without them the summary painted
8013
+ // a card background with its text against the edges and a full-bleed
8014
+ // checkout button — the same column, two different card treatments.
8015
+ "propeller-cart-summary w-full bg-card p-6 rounded-container shadow space-y-3",
8016
+ props.className
7978
8017
  ),
7979
- " ",
7980
- !!props.onRequestQuoteClick && showRequestQuoteButton() ? /* @__PURE__ */ jsxRuntime.jsx(
7981
- "button",
7982
- {
7983
- type: "button",
7984
- className: "propeller-cart-summary__quote-btn block w-full bg-card border border-secondary text-secondary text-center py-3 rounded-container hover:bg-secondary/5 transition font-semibold mt-2",
7985
- onClick: (event) => props.onRequestQuoteClick && props.onRequestQuoteClick(props.cart),
7986
- children: propellerV2CoreUi.getLabel(props.labels, "requestQuoteButton", "Request a Quote")
7987
- }
7988
- ) : null
7989
- ] }) : null,
7990
- showRequestAuthorizationButton() ? /* @__PURE__ */ jsxRuntime.jsxs(
7991
- "button",
7992
- {
7993
- type: "button",
7994
- className: "propeller-cart-summary__authorization-btn block w-full bg-secondary text-secondary-foreground text-center py-3 rounded-container hover:bg-secondary/90 transition font-semibold mt-4 disabled:opacity-50 disabled:cursor-not-allowed",
7995
- onClick: (event) => handleRequestAuthorizationClick(),
7996
- disabled: requestLoading,
7997
- children: [
7998
- requestLoading ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: propellerV2CoreUi.getLabel(props.labels, "requestingAuthorization", "Requesting...") }) : null,
7999
- !requestLoading ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: propellerV2CoreUi.getLabel(props.labels, "requestAuthorizationButton", "Request Authorization") }) : null
8000
- ]
8001
- }
8002
- ) : null
8003
- ] });
8018
+ children: [
8019
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "propeller-cart-summary__title text-xl font-bold mb-4", children: title() }),
8020
+ showSubtotal() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground", "data-row": "subtotal", children: [
8021
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "subtotal", "Subtotal:") }),
8022
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(subtotal()) })
8023
+ ] }) : null,
8024
+ showDiscount() && hasDiscount() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-success", "data-row": "discount", children: [
8025
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "discount", "Discount:") }),
8026
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "propeller-cart-summary__value", children: [
8027
+ "-",
8028
+ formatItemPrice(discountAmount())
8029
+ ] })
8030
+ ] }) : null,
8031
+ hasTransactionCosts() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground", "data-row": "transaction-costs", children: [
8032
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "transactionCosts", "Transaction costs:") }),
8033
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(transactionCosts()) })
8034
+ ] }) : null,
8035
+ showShippingCosts() && hasShippingCosts() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground", "data-row": "shipping-costs", children: [
8036
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "shippingCosts", "Shipping costs:") }),
8037
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(shippingCosts()) })
8038
+ ] }) : null,
8039
+ showTotalExclVat() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground pt-2 border-t", "data-row": "total-excl-vat", children: [
8040
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "totalExclVat", "Total excl. VAT:") }),
8041
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(totalExclVat()) })
8042
+ ] }) : null,
8043
+ showVATs() && taxLevels().length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: taxLevels()?.map((tax, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground text-sm", "data-row": "vat-line", children: [
8044
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "propeller-cart-summary__label", children: [
8045
+ tax.taxPercentage,
8046
+ "% ",
8047
+ propellerV2CoreUi.getLabel(props.labels, "vat", "VAT"),
8048
+ ":"
8049
+ ] }),
8050
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(Number(tax.price)) })
8051
+ ] }, index)) }) : null,
8052
+ showTotalVat() && totalVat() > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground text-sm", "data-row": "total-vat", children: [
8053
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "totalVat", "Total VAT:") }),
8054
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(totalVat()) })
8055
+ ] }) : null,
8056
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-summary__row propeller-cart-summary__row--total flex justify-between text-xl font-bold pt-4 border-t text-foreground mt-2", "data-row": "total", children: [
8057
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__label", children: propellerV2CoreUi.getLabel(props.labels, "total", "Total:") }),
8058
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(totalInclVat()) })
8059
+ ] }),
8060
+ showCheckoutButton() && !showRequestAuthorizationButton() ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8061
+ /* @__PURE__ */ jsxRuntime.jsx(
8062
+ "button",
8063
+ {
8064
+ type: "button",
8065
+ className: "propeller-cart-summary__checkout-btn block w-full bg-secondary text-secondary-foreground text-center py-3 rounded-container hover:bg-secondary/90 transition font-semibold mt-4",
8066
+ onClick: (event) => handleCheckoutClick(),
8067
+ children: propellerV2CoreUi.getLabel(props.labels, "checkoutButton", "Continue to Checkout")
8068
+ }
8069
+ ),
8070
+ " ",
8071
+ !!props.onRequestQuoteClick && showRequestQuoteButton() ? /* @__PURE__ */ jsxRuntime.jsx(
8072
+ "button",
8073
+ {
8074
+ type: "button",
8075
+ className: "propeller-cart-summary__quote-btn block w-full bg-card border border-secondary text-secondary text-center py-3 rounded-container hover:bg-secondary/5 transition font-semibold mt-2",
8076
+ onClick: (event) => props.onRequestQuoteClick && props.onRequestQuoteClick(props.cart),
8077
+ children: propellerV2CoreUi.getLabel(props.labels, "requestQuoteButton", "Request a Quote")
8078
+ }
8079
+ ) : null
8080
+ ] }) : null,
8081
+ showRequestAuthorizationButton() ? /* @__PURE__ */ jsxRuntime.jsxs(
8082
+ "button",
8083
+ {
8084
+ type: "button",
8085
+ className: "propeller-cart-summary__authorization-btn block w-full bg-secondary text-secondary-foreground text-center py-3 rounded-container hover:bg-secondary/90 transition font-semibold mt-4 disabled:opacity-50 disabled:cursor-not-allowed",
8086
+ onClick: (event) => handleRequestAuthorizationClick(),
8087
+ disabled: requestLoading,
8088
+ children: [
8089
+ requestLoading ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: propellerV2CoreUi.getLabel(props.labels, "requestingAuthorization", "Requesting...") }) : null,
8090
+ !requestLoading ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: propellerV2CoreUi.getLabel(props.labels, "requestAuthorizationButton", "Request Authorization") }) : null
8091
+ ]
8092
+ }
8093
+ ) : null
8094
+ ]
8095
+ }
8096
+ );
8004
8097
  }
8005
8098
  var CartSummary_default = CartSummary;
8006
8099
  function CategoryDescription(props) {
@@ -8020,7 +8113,7 @@ function CategoryDescription(props) {
8020
8113
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!html ? /* @__PURE__ */ jsxRuntime.jsxs(
8021
8114
  "div",
8022
8115
  {
8023
- className: `propeller-category-description mb-6 ${props.className || ""}`,
8116
+ className: cn(`propeller-category-description mb-6 ${props.className || ""}`),
8024
8117
  "data-expanded": expanded ? "true" : "false",
8025
8118
  "data-truncatable": shouldTruncate ? "true" : "false",
8026
8119
  children: [
@@ -8050,7 +8143,7 @@ function CategoryShortDescription(props) {
8050
8143
  (d) => d.language === props.language
8051
8144
  );
8052
8145
  const html = match?.value || "";
8053
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!html ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-category-short-description mb-6 ${props.className || ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(
8146
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!html ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-category-short-description mb-6 ${props.className || ""}`), children: /* @__PURE__ */ jsxRuntime.jsx(
8054
8147
  "div",
8055
8148
  {
8056
8149
  className: "propeller-category-short-description__content prose prose-slate max-w-none text-muted-foreground",
@@ -8140,7 +8233,7 @@ function ClusterCard(rawProps) {
8140
8233
  const useTax = props.includeTax !== void 0 ? !!props.includeTax : false;
8141
8234
  const priceObj = contentHidden ? void 0 : cluster?.defaultProduct?.price;
8142
8235
  const priceValue = useTax ? priceObj?.net : priceObj?.gross;
8143
- const clusterPrice = props.showPrice === false ? "" : propellerV2CoreUi.formatPrice(priceValue, { symbol: props.currency ?? "\u20AC" });
8236
+ const clusterPrice = props.showPrice === false ? "" : propellerV2CoreUi.formatPrice(priceValue, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
8144
8237
  function handleClusterClick(e) {
8145
8238
  if (props.onClusterClick) {
8146
8239
  e.preventDefault();
@@ -8185,7 +8278,7 @@ function ClusterCard(rawProps) {
8185
8278
  return /* @__PURE__ */ jsxRuntime.jsx(ClusterCardContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
8186
8279
  "div",
8187
8280
  {
8188
- className: `propeller-cluster-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className ?? ""}`,
8281
+ className: cn(`propeller-cluster-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className ?? ""}`),
8189
8282
  "data-cluster-id": cluster.clusterId,
8190
8283
  "data-layout": isRow ? "row" : "grid",
8191
8284
  children: rawProps.children
@@ -8195,7 +8288,7 @@ function ClusterCard(rawProps) {
8195
8288
  return /* @__PURE__ */ jsxRuntime.jsx(ClusterCardContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs(
8196
8289
  "div",
8197
8290
  {
8198
- className: `propeller-cluster-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}`,
8291
+ className: cn(`propeller-cluster-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}`),
8199
8292
  "data-layout": isRow ? "row" : "grid",
8200
8293
  children: [
8201
8294
  props.showImage !== false ? /* @__PURE__ */ jsxRuntime.jsx(ClusterCardImage, {}) : null,
@@ -8487,7 +8580,7 @@ function MachineCard(props) {
8487
8580
  return /* @__PURE__ */ jsxRuntime.jsx(
8488
8581
  "div",
8489
8582
  {
8490
- className: `propeller-machine-card group relative flex h-full flex-col overflow-hidden rounded-lg border border-border bg-background ${props.className ?? ""}`,
8583
+ className: cn(`propeller-machine-card group relative flex h-full flex-col overflow-hidden rounded-lg border border-border bg-background ${props.className ?? ""}`),
8491
8584
  children: /* @__PURE__ */ jsxRuntime.jsxs(
8492
8585
  "a",
8493
8586
  {
@@ -8548,7 +8641,7 @@ function LoginToOrderButton(props) {
8548
8641
  "button",
8549
8642
  {
8550
8643
  type: "button",
8551
- className: `propeller-login-to-order inline-flex items-center justify-center gap-2 h-10 px-4 w-full rounded-control bg-primary text-primary-foreground text-sm font-medium hover:opacity-90 transition-opacity ${props.className || ""}`,
8644
+ className: cn(`propeller-login-to-order inline-flex items-center justify-center gap-2 h-10 px-4 w-full rounded-control bg-primary text-primary-foreground text-sm font-medium hover:opacity-90 transition-opacity ${props.className || ""}`),
8552
8645
  onClick: () => {
8553
8646
  if (props.onLoginClick) props.onLoginClick();
8554
8647
  },
@@ -8566,7 +8659,7 @@ function ProductPriceDisplay(props) {
8566
8659
  }
8567
8660
  function formatPrice17(value) {
8568
8661
  if (value === null || value === void 0) return "";
8569
- return propellerV2CoreUi.formatPrice(value, { symbol: props.currency ?? "\u20AC" });
8662
+ return propellerV2CoreUi.formatPrice(value, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
8570
8663
  }
8571
8664
  function getOptionsTotal(useNet) {
8572
8665
  const options = props.options || [];
@@ -8609,7 +8702,7 @@ function ProductPriceDisplay(props) {
8609
8702
  function getSecondaryTaxLabel() {
8610
8703
  return props.includeTax ? propellerV2CoreUi.getLabel(props.labels, "exclTax", "excl. VAT") : propellerV2CoreUi.getLabel(props.labels, "inclTax", "incl. VAT");
8611
8704
  }
8612
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-price ${props.className || ""}`, "data-hidden": isHidden2() ? "true" : "false", children: [
8705
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-price ${props.className || ""}`), "data-hidden": isHidden2() ? "true" : "false", children: [
8613
8706
  isHidden2() && props.showLoginPrompt !== false ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-product-price__login-prompt text-sm text-muted-foreground italic", children: propellerV2CoreUi.getLabel(props.labels, "loginToSeePrices", "Log in to see prices") }) : null,
8614
8707
  !isHidden2() && !!getLeadingPrice() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-price__content flex flex-col gap-0.5", children: [
8615
8708
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-price__primary flex items-baseline gap-2", children: [
@@ -8655,6 +8748,11 @@ var RESOLVE_SPEC2 = {
8655
8748
  includeTax: { infra: "includeTax" },
8656
8749
  portalMode: { infra: "portalMode" },
8657
8750
  configuration: { infra: "configuration" },
8751
+ // Same entry ClusterCard has always had. Without it a shop priced in
8752
+ // anything but euros had no route to the cards at all: the grid resolved the
8753
+ // currency and then dropped it, and the card fell through to the package
8754
+ // default on every price it rendered.
8755
+ currency: { infra: "currency", default: "\u20AC" },
8658
8756
  columns: { grid: "columns", default: 3 },
8659
8757
  showPrice: { grid: "showPrice" },
8660
8758
  showStock: { grid: "showStock" },
@@ -8756,7 +8854,7 @@ function ProductCardRoot(rawProps) {
8756
8854
  return /* @__PURE__ */ jsxRuntime.jsx(ProductCardContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
8757
8855
  "div",
8758
8856
  {
8759
- className: `propeller-product-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}`,
8857
+ className: cn(`propeller-product-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}`),
8760
8858
  "data-layout": isRow ? "row" : "grid",
8761
8859
  children: rawProps.children
8762
8860
  }
@@ -8765,7 +8863,7 @@ function ProductCardRoot(rawProps) {
8765
8863
  return /* @__PURE__ */ jsxRuntime.jsx(ProductCardContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs(
8766
8864
  "div",
8767
8865
  {
8768
- className: `propeller-product-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}`,
8866
+ className: cn(`propeller-product-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}`),
8769
8867
  "data-layout": isRow ? "row" : "grid",
8770
8868
  children: [
8771
8869
  props.showImage !== false ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardImage, {}) : null,
@@ -8989,7 +9087,8 @@ function ProductCardPrice(props) {
8989
9087
  {
8990
9088
  price: product.price,
8991
9089
  includeTax: derived.useTax,
8992
- labels: resolved.priceLabels
9090
+ labels: resolved.priceLabels,
9091
+ currency: resolved.currency
8993
9092
  }
8994
9093
  ) });
8995
9094
  }
@@ -9000,6 +9099,8 @@ function ProductCardPrice(props) {
9000
9099
  includeTax: derived.useTax,
9001
9100
  priceSize: props.priceSize ?? "text-base sm:text-lg",
9002
9101
  labels: resolved.priceLabels,
9102
+ currency: resolved.currency,
9103
+ language: resolved.language,
9003
9104
  portalMode: resolved.portalMode,
9004
9105
  user: resolved.user,
9005
9106
  showLoginPrompt: false
@@ -9212,7 +9313,7 @@ function ProductGrid(rawProps) {
9212
9313
  return /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: gridConfig, children: /* @__PURE__ */ jsxRuntime.jsx(ProductGridSearchContext.Provider, { value: compoundCtx, children: /* @__PURE__ */ jsxRuntime.jsx(
9213
9314
  "div",
9214
9315
  {
9215
- className: `propeller-product-grid w-full ${props.className || ""}`,
9316
+ className: cn(`propeller-product-grid w-full ${props.className || ""}`),
9216
9317
  "data-loading": getIsLoading() ? "true" : "false",
9217
9318
  "data-mode": "compound",
9218
9319
  children: rawProps.children
@@ -9222,7 +9323,7 @@ function ProductGrid(rawProps) {
9222
9323
  return /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: gridConfig, children: /* @__PURE__ */ jsxRuntime.jsxs(
9223
9324
  "div",
9224
9325
  {
9225
- className: `propeller-product-grid w-full ${props.className || ""}`,
9326
+ className: cn(`propeller-product-grid w-full ${props.className || ""}`),
9226
9327
  "data-loading": getIsLoading() ? "true" : "false",
9227
9328
  children: [
9228
9329
  getIsLoading() ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-product-grid__skeleton-grid ${getGridColsClass()}`, children: getSkeletonItems()?.map((_, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
@@ -9325,7 +9426,7 @@ function ProductGridItems(props) {
9325
9426
  const gridClass = cols === 1 ? "flex flex-col gap-4" : cols === 2 ? "grid grid-cols-2 gap-3 sm:gap-6 auto-rows-fr" : cols === 4 ? "grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-6 auto-rows-fr" : cols === 5 ? "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 sm:gap-6 auto-rows-fr" : cols === 6 ? "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3 sm:gap-6 auto-rows-fr" : "grid grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-6 auto-rows-fr";
9326
9427
  if (isLoading) {
9327
9428
  const skeletonCount = cols === 2 ? 4 : cols === 4 ? 8 : cols === 5 ? 10 : cols === 6 ? 12 : 6;
9328
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-product-grid__skeleton-grid ${gridClass} ${props.className ?? ""}`, children: Array.from({ length: skeletonCount }).map((_, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
9429
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-product-grid__skeleton-grid ${gridClass} ${props.className ?? ""}`), children: Array.from({ length: skeletonCount }).map((_, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
9329
9430
  "div",
9330
9431
  {
9331
9432
  className: "propeller-product-grid__skeleton-card flex flex-col overflow-hidden rounded-container border border-border bg-card shadow-sm",
@@ -9347,7 +9448,7 @@ function ProductGridItems(props) {
9347
9448
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-product-grid__empty-message mt-1 text-sm text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "noProductsHelp", "Try adjusting your filters or search term.") })
9348
9449
  ] }) });
9349
9450
  }
9350
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-product-grid__grid ${gridClass} ${props.className ?? ""}`, children: items.map((item, idx) => {
9451
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-product-grid__grid ${gridClass} ${props.className ?? ""}`), children: items.map((item, idx) => {
9351
9452
  const isCluster = "clusterId" in item && !!item.clusterId;
9352
9453
  const key = item.productId || item.clusterId || idx;
9353
9454
  return /* @__PURE__ */ jsxRuntime.jsxs(React6__namespace.Fragment, { children: [
@@ -9405,6 +9506,7 @@ ProductGridCompound.Pagination = ProductGridPagination;
9405
9506
  var ProductGrid_default = ProductGridCompound;
9406
9507
  function GridFilters(rawProps) {
9407
9508
  const props = useInfraProps(rawProps);
9509
+ const currencySymbol = props.currency ?? "\u20AC";
9408
9510
  const [selectedFilters, setSelectedFilters] = React6.useState(
9409
9511
  () => ({ ...props.activeTextFilters || {} })
9410
9512
  );
@@ -9608,7 +9710,7 @@ function GridFilters(rawProps) {
9608
9710
  return /* @__PURE__ */ jsxRuntime.jsxs(
9609
9711
  "div",
9610
9712
  {
9611
- className: `propeller-grid-filters space-y-4 ${props.isMobile ? "pb-8" : "sticky top-24"} ${isPending ? "opacity-50 pointer-events-none" : ""} ${props.className || ""}`,
9713
+ className: cn(`propeller-grid-filters space-y-4 ${props.isMobile ? "pb-8" : "sticky top-24"} ${isPending ? "opacity-50 pointer-events-none" : ""} ${props.className || ""}`),
9612
9714
  "data-mobile": props.isMobile ? "true" : "false",
9613
9715
  "data-pending": isPending ? "true" : "false",
9614
9716
  children: [
@@ -9621,7 +9723,7 @@ function GridFilters(rawProps) {
9621
9723
  ] }),
9622
9724
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
9623
9725
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
9624
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-grid-filters__price-currency absolute left-2.5 top-1/2 -translate-y-1/2 text-xs text-foreground-subtle pointer-events-none", children: "\u20AC" }),
9726
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-grid-filters__price-currency absolute left-2.5 top-1/2 -translate-y-1/2 text-xs text-foreground-subtle pointer-events-none", children: currencySymbol }),
9625
9727
  /* @__PURE__ */ jsxRuntime.jsx(
9626
9728
  "input",
9627
9729
  {
@@ -9640,7 +9742,7 @@ function GridFilters(rawProps) {
9640
9742
  ] }),
9641
9743
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-grid-filters__price-separator text-foreground-subtle text-sm select-none", children: "\u2013" }),
9642
9744
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
9643
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-grid-filters__price-currency absolute left-2.5 top-1/2 -translate-y-1/2 text-xs text-foreground-subtle pointer-events-none", children: "\u20AC" }),
9745
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-grid-filters__price-currency absolute left-2.5 top-1/2 -translate-y-1/2 text-xs text-foreground-subtle pointer-events-none", children: currencySymbol }),
9644
9746
  /* @__PURE__ */ jsxRuntime.jsx(
9645
9747
  "input",
9646
9748
  {
@@ -9948,6 +10050,7 @@ var DEFAULT_LABELS = {
9948
10050
  };
9949
10051
  function GridToolbar(rawProps) {
9950
10052
  const props = useInfraProps(rawProps);
10053
+ const currencySymbol = props.currency ?? "\u20AC";
9951
10054
  const [currentSortField, setCurrentSortField] = React6.useState(
9952
10055
  propellerSdkV2.ProductSortField.CATEGORY_ORDER
9953
10056
  );
@@ -10032,7 +10135,7 @@ function GridToolbar(rawProps) {
10032
10135
  return /* @__PURE__ */ jsxRuntime.jsxs(
10033
10136
  "div",
10034
10137
  {
10035
- className: `propeller-grid-toolbar ${props.className || ""}`,
10138
+ className: cn(`propeller-grid-toolbar ${props.className || ""}`),
10036
10139
  "data-view-mode": currentViewMode,
10037
10140
  children: [
10038
10141
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-grid-toolbar__bar flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-4", children: [
@@ -10160,9 +10263,11 @@ function GridToolbar(rawProps) {
10160
10263
  },
10161
10264
  children: [
10162
10265
  getLabel59("price"),
10163
- ": \u20AC",
10266
+ ": ",
10267
+ currencySymbol,
10164
10268
  props.priceFilterMin ?? 0,
10165
- " \u2013 \u20AC",
10269
+ " \u2013 ",
10270
+ currencySymbol,
10166
10271
  props.priceFilterMax ?? "\u221E",
10167
10272
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-grid-toolbar__filter-badge-remove", children: "\xD7" })
10168
10273
  ]
@@ -10271,7 +10376,7 @@ function GridPagination(props) {
10271
10376
  return /* @__PURE__ */ jsxRuntime.jsx(
10272
10377
  "div",
10273
10378
  {
10274
- className: `propeller-grid-pagination ${props.className || ""}`,
10379
+ className: cn(`propeller-grid-pagination ${props.className || ""}`),
10275
10380
  "data-variant": variant,
10276
10381
  children: showPagination ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10277
10382
  variant === "compact" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-grid-pagination__compact flex justify-center items-center gap-2", children: [
@@ -10649,7 +10754,7 @@ function ClusterConfigurator(props) {
10649
10754
  initFromProduct(props.defaultProduct);
10650
10755
  }
10651
10756
  }, []);
10652
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-cluster-configurator ${props.className || ""}`, children: !!props.config?.settings?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cluster-configurator__content flex flex-col gap-6", children: settingsWithValues?.map((setting) => /* @__PURE__ */ jsxRuntime.jsxs(
10757
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-cluster-configurator ${props.className || ""}`), children: !!props.config?.settings?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cluster-configurator__content flex flex-col gap-6", children: settingsWithValues?.map((setting) => /* @__PURE__ */ jsxRuntime.jsxs(
10653
10758
  "div",
10654
10759
  {
10655
10760
  className: "propeller-cluster-configurator__group",
@@ -10798,7 +10903,7 @@ function ClusterInfo(rawProps) {
10798
10903
  props.onClusterLoaded(fetchedCluster);
10799
10904
  }
10800
10905
  }, [fetchedCluster]);
10801
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-cluster-info ${props.className || ""}`, "data-loading": loading ? "true" : "false", children: [
10906
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-cluster-info ${props.className || ""}`), "data-loading": loading ? "true" : "false", children: [
10802
10907
  loading && !props.cluster ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cluster-info__skeleton animate-pulse space-y-3", children: [
10803
10908
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cluster-info__skeleton-line h-4 bg-surface-hover rounded w-1/4" }),
10804
10909
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cluster-info__skeleton-line h-8 bg-surface-hover rounded w-3/4" })
@@ -10813,8 +10918,8 @@ function ClusterInfo(rawProps) {
10813
10918
  ] });
10814
10919
  }
10815
10920
  var ClusterInfo_default = ClusterInfo;
10816
- function formatPrice9(price, currency) {
10817
- return propellerV2CoreUi.formatPrice(price, { symbol: currency });
10921
+ function formatPrice9(price, currency, language) {
10922
+ return propellerV2CoreUi.formatPrice(price, { symbol: currency, locale: propellerV2CoreUi.localeForLanguage(language) });
10818
10923
  }
10819
10924
  function getProductName2(product, language) {
10820
10925
  return propellerV2CoreUi.getLocalizedValue(product.names, language, `Product ${product.productId}`);
@@ -10841,7 +10946,7 @@ function ClusterOptions(rawProps) {
10841
10946
  const products = (option.products || []).map((p) => ({
10842
10947
  productId: p.productId,
10843
10948
  productIdStr: p.productId.toString(),
10844
- label: hidePrices ? getProductName2(p, language) : `${getProductName2(p, language)} \u2014 ${formatPrice9(p.price?.gross || 0, props.currency ?? "\u20AC")}`
10949
+ label: hidePrices ? getProductName2(p, language) : `${getProductName2(p, language)} \u2014 ${formatPrice9(p.price?.gross || 0, props.currency ?? "\u20AC", language)}`
10845
10950
  }));
10846
10951
  let previewImageUrl = "";
10847
10952
  let previewName = "";
@@ -10853,7 +10958,7 @@ function ClusterOptions(rawProps) {
10853
10958
  if (selectedProduct) {
10854
10959
  previewImageUrl = getProductImageUrl4(selectedProduct);
10855
10960
  previewName = getProductName2(selectedProduct, language);
10856
- previewPrice = hidePrices ? "" : formatPrice9(selectedProduct.price?.gross || 0, props.currency ?? "\u20AC");
10961
+ previewPrice = hidePrices ? "" : formatPrice9(selectedProduct.price?.gross || 0, props.currency ?? "\u20AC", props.language);
10857
10962
  }
10858
10963
  }
10859
10964
  const isRequired = option.isRequired === propellerSdkV2.YesNo.Y;
@@ -10889,7 +10994,7 @@ function ClusterOptions(rawProps) {
10889
10994
  }
10890
10995
  }
10891
10996
  const renderedOptions = getOptionsForRender();
10892
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-cluster-options ${props.className || ""}`, children: renderedOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cluster-options__content flex flex-col gap-6", children: renderedOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
10997
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-cluster-options ${props.className || ""}`), children: renderedOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cluster-options__content flex flex-col gap-6", children: renderedOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
10893
10998
  "div",
10894
10999
  {
10895
11000
  className: "propeller-cluster-options__group",
@@ -11342,7 +11447,7 @@ function FavoriteListItem(rawProps) {
11342
11447
  if (!priceObj) return "";
11343
11448
  const value = useTax ? priceObj.net : priceObj.gross;
11344
11449
  if (!value && value !== 0) return "";
11345
- return propellerV2CoreUi.formatPrice(value, { symbol: currency });
11450
+ return propellerV2CoreUi.formatPrice(value, { symbol: currency, locale: propellerV2CoreUi.localeForLanguage(props.language) });
11346
11451
  })();
11347
11452
  function handleItemClick(e) {
11348
11453
  if (props.onItemClick) {
@@ -11382,7 +11487,7 @@ function FavoriteListItem(rawProps) {
11382
11487
  {
11383
11488
  onClick: (e) => handleItemClick(e),
11384
11489
  "data-type": isProduct ? "product" : "cluster",
11385
- className: `propeller-favorite-list-item flex flex-row items-center gap-4 rounded-container border border-border bg-card p-4 transition-colors hover:border-secondary/20 hover:shadow-sm cursor-pointer ${props.className || ""}`,
11490
+ className: cn(`propeller-favorite-list-item flex flex-row items-center gap-4 rounded-container border border-border bg-card p-4 transition-colors hover:border-secondary/20 hover:shadow-sm cursor-pointer ${props.className || ""}`),
11386
11491
  children: rawProps.children
11387
11492
  }
11388
11493
  ) });
@@ -11392,7 +11497,7 @@ function FavoriteListItem(rawProps) {
11392
11497
  {
11393
11498
  onClick: (e) => handleItemClick(e),
11394
11499
  "data-type": isProduct ? "product" : "cluster",
11395
- className: `propeller-favorite-list-item flex flex-row items-center gap-4 rounded-container border border-border bg-card p-4 transition-colors hover:border-secondary/20 hover:shadow-sm cursor-pointer ${props.className || ""}`,
11500
+ className: cn(`propeller-favorite-list-item flex flex-row items-center gap-4 rounded-container border border-border bg-card p-4 transition-colors hover:border-secondary/20 hover:shadow-sm cursor-pointer ${props.className || ""}`),
11396
11501
  children: [
11397
11502
  /* @__PURE__ */ jsxRuntime.jsx(FavoriteListItemImage, {}),
11398
11503
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-favorite-list-item__body flex flex-col gap-0.5 min-w-0 flex-1", children: [
@@ -11906,7 +12011,7 @@ function FavoriteListDetails(rawProps) {
11906
12011
  fetchList();
11907
12012
  }
11908
12013
  }, [props.favoriteListId]);
11909
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-favorite-list-details ${props.className || ""}`, "data-loading": loading ? "true" : "false", children: [
12014
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-favorite-list-details ${props.className || ""}`), "data-loading": loading ? "true" : "false", children: [
11910
12015
  loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-favorite-list-details__skeleton space-y-4", children: [1, 2, 3]?.map((i) => /* @__PURE__ */ jsxRuntime.jsxs(
11911
12016
  "div",
11912
12017
  {
@@ -12351,7 +12456,7 @@ function FavoriteLists(rawProps) {
12351
12456
  setNewSetAsDefault(false);
12352
12457
  closeCreateModal();
12353
12458
  }
12354
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-favorite-lists ${props.className || ""}`, "data-loading": loading ? "true" : "false", children: [
12459
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-favorite-lists ${props.className || ""}`), "data-loading": loading ? "true" : "false", children: [
12355
12460
  props.allowFavoriteListCreate !== false && !loading && displayedLists.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-favorite-lists__toolbar flex justify-end mb-4", children: /* @__PURE__ */ jsxRuntime.jsxs(
12356
12461
  "button",
12357
12462
  {
@@ -12874,7 +12979,7 @@ function ForgotPassword(rawProps) {
12874
12979
  }
12875
12980
  var ForgotPassword_default = ForgotPassword;
12876
12981
  function GridTitle(props) {
12877
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-grid-title mb-8 ${props.className || ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-grid-title__row flex items-baseline gap-3 mb-3", children: [
12982
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-grid-title mb-8 ${props.className || ""}`), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-grid-title__row flex items-baseline gap-3 mb-3", children: [
12878
12983
  props.headingLevel === "h2" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "propeller-grid-title__heading text-3xl sm:text-4xl font-bold tracking-tight", children: props.title }) : null,
12879
12984
  props.headingLevel !== "h2" ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "propeller-grid-title__heading text-3xl sm:text-4xl font-bold tracking-tight", children: props.title }) : null
12880
12985
  ] }) });
@@ -12917,12 +13022,12 @@ function ItemsOverview(rawProps) {
12917
13022
  const showPrice = props.showPrice !== void 0 ? props.showPrice : true;
12918
13023
  const items = props.cart?.items ?? [];
12919
13024
  const currencySymbol = props.currency ?? "\u20AC";
12920
- const money = (value) => value === void 0 || value === null ? "" : propellerV2CoreUi.formatPrice(value, { symbol: currencySymbol });
13025
+ const money = (value) => value === void 0 || value === null ? "" : propellerV2CoreUi.formatPrice(value, { symbol: currencySymbol, locale: propellerV2CoreUi.localeForLanguage(props.language) });
12921
13026
  function formatItemPrice(price) {
12922
13027
  if (props.formatPrice) {
12923
13028
  return props.formatPrice(price);
12924
13029
  }
12925
- return propellerV2CoreUi.formatPrice(price || 0, { symbol: currencySymbol });
13030
+ return propellerV2CoreUi.formatPrice(price || 0, { symbol: currencySymbol, locale: propellerV2CoreUi.localeForLanguage(props.language) });
12926
13031
  }
12927
13032
  function lineTotal(item) {
12928
13033
  return (useTax ? item.totalSumNet : item.totalSum) || 0;
@@ -13281,7 +13386,7 @@ function Menu(rawProps) {
13281
13386
  return /* @__PURE__ */ jsxRuntime.jsx(
13282
13387
  "div",
13283
13388
  {
13284
- className: `propeller-menu ${props.className || ""}`,
13389
+ className: cn(`propeller-menu ${props.className || ""}`),
13285
13390
  "data-variant": props.menuStyle || "custom",
13286
13391
  "data-loading": isLoading ? "true" : "false",
13287
13392
  children: customMenu
@@ -13291,7 +13396,7 @@ function Menu(rawProps) {
13291
13396
  return /* @__PURE__ */ jsxRuntime.jsxs(
13292
13397
  "div",
13293
13398
  {
13294
- className: `propeller-menu ${props.className || ""}`,
13399
+ className: cn(`propeller-menu ${props.className || ""}`),
13295
13400
  "data-variant": getMenuStyle(),
13296
13401
  "data-loading": isLoading ? "true" : "false",
13297
13402
  children: [
@@ -13437,7 +13542,7 @@ function OrderActions(rawProps) {
13437
13542
  // (the bug screenshot showed "Order / confirmation / (PDF)" on three lines).
13438
13543
  // `whitespace-nowrap` on the buttons is the belt-and-braces guarantee that
13439
13544
  // text never wraps even in narrow containers without flex sizing.
13440
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-order-actions flex-shrink-0 ${props.className || ""}`, children: [
13545
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-order-actions flex-shrink-0 ${props.className || ""}`), children: [
13441
13546
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-order-actions__actions flex flex-row items-center gap-3 flex-shrink-0", children: [
13442
13547
  /* @__PURE__ */ jsxRuntime.jsxs(
13443
13548
  "button",
@@ -13525,20 +13630,21 @@ var OrderActions_default = OrderActions;
13525
13630
  function getProductName3(orderItem, language) {
13526
13631
  return propellerV2CoreUi.getLocalizedValue(orderItem?.product?.names, language, "") || orderItem?.name || "Unknown Product";
13527
13632
  }
13528
- function getClusterUrl(orderItem, language) {
13633
+ function getClusterUrl(orderItem, language, urls) {
13529
13634
  const cluster = orderItem?.product?.cluster;
13530
13635
  if (!cluster) return "";
13531
13636
  const id = cluster.clusterId;
13532
13637
  const slug = propellerV2CoreUi.getLocalizedValue(cluster.slugs, language, "");
13533
13638
  if (!id || !slug) return "";
13534
- return `/cluster/${id}/${slug}`;
13639
+ return urls?.getClusterUrl?.(cluster, language) || `/cluster/${id}/${slug}`;
13535
13640
  }
13536
- function getProductUrl(orderItem, language) {
13537
- const cu = getClusterUrl(orderItem, language);
13641
+ function getProductUrl(orderItem, language, urls) {
13642
+ const cu = getClusterUrl(orderItem, language, urls);
13538
13643
  if (cu) return cu;
13539
- const id = orderItem?.product?.productId;
13540
- const slug = propellerV2CoreUi.getLocalizedValue(orderItem?.product?.slugs, language, "");
13541
- if (id && slug) return `/product/${id}/${slug}`;
13644
+ const product = orderItem?.product;
13645
+ const id = product?.productId;
13646
+ const slug = propellerV2CoreUi.getLocalizedValue(product?.slugs, language, "");
13647
+ if (id && slug) return urls?.getProductUrl?.(product, language) || `/product/${id}/${slug}`;
13542
13648
  return "";
13543
13649
  }
13544
13650
  function OrderItemCard(props) {
@@ -13555,7 +13661,7 @@ function OrderItemCard(props) {
13555
13661
  const productName = getProductName3(item, props.language);
13556
13662
  const productSku = item?.product?.sku || item?.sku || "";
13557
13663
  const productImage = item?.product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "";
13558
- const productUrl = getProductUrl(item, props.language);
13664
+ const productUrl = getProductUrl(item, props.language, props.configuration?.urls);
13559
13665
  const quantity = item?.quantity || 0;
13560
13666
  const priceTotal = item?.priceTotal || 0;
13561
13667
  const discount = item?.discount || 0;
@@ -13568,7 +13674,7 @@ function OrderItemCard(props) {
13568
13674
  return props.formatPrice(price);
13569
13675
  }
13570
13676
  if (!price && price !== 0) return "-";
13571
- return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC" });
13677
+ return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
13572
13678
  }
13573
13679
  const discountDisplay = discountPercentage > 0 ? `${formatItemPrice(discount)} (${discountPercentage.toFixed(2).replace(".", ",")}%)` : formatItemPrice(discount);
13574
13680
  return /* @__PURE__ */ jsxRuntime.jsxs("tbody", { className: "propeller-order-item-card", children: [
@@ -13687,7 +13793,7 @@ function OrderBonusItems(rawProps) {
13687
13793
  const bonusItems = propellerV2CoreUi.getNettedBonusItems(allItems);
13688
13794
  if (bonusItems.length === 0) return null;
13689
13795
  const OrderItemCardImpl = props.orderItemCardComponent ?? OrderItemCard_default;
13690
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-order-bonus-items ${props.className || "mb-8"}`, children: [
13796
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-order-bonus-items ${props.className || "mb-8"}`), children: [
13691
13797
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "propeller-order-bonus-items__title text-lg font-bold mb-3 text-foreground", children: propellerV2CoreUi.getLabel(props.labels, "title", "Bonus items") }),
13692
13798
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-order-bonus-items__table bg-card rounded-container shadow overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full", children: bonusItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
13693
13799
  OrderItemCardImpl,
@@ -13733,7 +13839,7 @@ function OrderList(rawProps) {
13733
13839
  function formatPrice17(price) {
13734
13840
  if (props.formatPrice) return props.formatPrice(price);
13735
13841
  if (!price) return "-";
13736
- return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC" });
13842
+ return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
13737
13843
  }
13738
13844
  function getStatusColor(status) {
13739
13845
  if (props.getStatusColor) return props.getStatusColor(status);
@@ -13777,7 +13883,7 @@ function OrderList(rawProps) {
13777
13883
  }
13778
13884
  return fields;
13779
13885
  }
13780
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-order-list ${props.className || ""}`, "data-loading": loading ? "true" : "false", children: [
13886
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-order-list ${props.className || ""}`), "data-loading": loading ? "true" : "false", children: [
13781
13887
  props.enableSearch && searchFields().length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-order-list__filters mb-6 bg-card p-4 rounded-container shadow space-y-4", children: [
13782
13888
  searchFields().includes("term") ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-order-list__search-field w-full", children: [
13783
13889
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "propeller-order-list__filter-label block text-sm font-medium text-muted-foreground capitalize mb-1", children: getColumnLabel("term") }),
@@ -14162,7 +14268,31 @@ function OrderList(rawProps) {
14162
14268
  ) })
14163
14269
  ] })
14164
14270
  ] }) : null
14165
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-order-list__empty${props.flat ? "" : " bg-card rounded-container shadow"} p-8 text-center`, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: propellerV2CoreUi.getLabel(props.labels, "noOrders", "No orders found.") }) }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-order-list__loading p-8 text-center text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "loading", "Loading orders...") })
14271
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-order-list__empty${props.flat ? "" : " bg-card rounded-container shadow"} p-8 text-center`, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: propellerV2CoreUi.getLabel(props.labels, "noOrders", "No orders found.") }) }) }) : (
14272
+ // A centred line of text collapsed the list to one row and then
14273
+ // snapped back, which is what made a language switch on the account
14274
+ // pages look broken. Skeleton rows hold the layout instead.
14275
+ /* @__PURE__ */ jsxRuntime.jsx(
14276
+ "div",
14277
+ {
14278
+ className: `propeller-order-list__loading${props.flat ? "" : " bg-card rounded-container shadow"} p-4`,
14279
+ "aria-busy": "true",
14280
+ "aria-label": propellerV2CoreUi.getLabel(props.labels, "loading", "Loading orders..."),
14281
+ children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsxs(
14282
+ "div",
14283
+ {
14284
+ className: "propeller-order-list__skeleton-row flex items-center gap-4 py-4 border-b border-border last:border-b-0 animate-pulse",
14285
+ children: [
14286
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-order-list__skeleton-line h-4 bg-surface-hover rounded w-24" }),
14287
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-order-list__skeleton-line h-4 bg-surface-hover rounded w-32" }),
14288
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-order-list__skeleton-line h-4 bg-surface-hover rounded w-20 ml-auto" })
14289
+ ]
14290
+ },
14291
+ index
14292
+ ))
14293
+ }
14294
+ )
14295
+ )
14166
14296
  ] });
14167
14297
  }
14168
14298
  var OrderList_default = OrderList;
@@ -14203,7 +14333,7 @@ function QuickOrderInner(props) {
14203
14333
  } = props;
14204
14334
  const user = props.user ?? null;
14205
14335
  const graphqlClient = props.graphqlClient;
14206
- const displayPrice = (n) => props.formatPrice ? props.formatPrice(n) : propellerV2CoreUi.formatPrice(n, { symbol: currency });
14336
+ const displayPrice = (n) => props.formatPrice ? props.formatPrice(n) : propellerV2CoreUi.formatPrice(n, { symbol: currency, locale: propellerV2CoreUi.localeForLanguage(props.language) });
14207
14337
  const L = (key, fallback) => propellerV2CoreUi.getLabel(labels, key, fallback);
14208
14338
  const { submitting, searchProducts, submit } = useQuickOrder({
14209
14339
  graphqlClient,
@@ -14367,6 +14497,7 @@ function QuickOrderInner(props) {
14367
14497
  target: "_blank",
14368
14498
  rel: "noopener nofollow",
14369
14499
  className: "text-primary hover:underline text-sm inline-block mb-4",
14500
+ onClick: () => props.onTemplateDownload?.(),
14370
14501
  children: L("downloadTemplate", "Download XLSX template")
14371
14502
  }
14372
14503
  ) : null,
@@ -14530,7 +14661,7 @@ function OrderShipments(props) {
14530
14661
  const code = tat.code || "";
14531
14662
  return `${baseUrl}${code}`;
14532
14663
  }
14533
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `order-shipments ${props.className || ""}`, children: [
14664
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`order-shipments ${props.className || ""}`), children: [
14534
14665
  shipments.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
14535
14666
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold", children: propellerV2CoreUi.getLabel(props.labels, "title", "Shipping details") }),
14536
14667
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto rounded-lg border border-border bg-card shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full text-sm", children: [
@@ -14736,7 +14867,7 @@ function OrderSummary(props) {
14736
14867
  if (props.formatPrice) {
14737
14868
  return props.formatPrice(price);
14738
14869
  }
14739
- return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC" });
14870
+ return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
14740
14871
  }
14741
14872
  function numericDate(dateString) {
14742
14873
  const d = new Date(dateString);
@@ -14844,7 +14975,7 @@ function OrderTotals(props) {
14844
14975
  const postageData = props.order?.postageData;
14845
14976
  function formatItemPrice(price) {
14846
14977
  if (props.formatPrice) return props.formatPrice(price);
14847
- return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC" });
14978
+ return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
14848
14979
  }
14849
14980
  const subtotal = total?.gross || 0;
14850
14981
  const hasDiscount = !!total && total.discountType !== propellerSdkV2.OrderDiscountType.N && total.discountValue > 0;
@@ -14931,7 +15062,7 @@ function PriceToggle(props) {
14931
15062
  return /* @__PURE__ */ jsxRuntime.jsxs(
14932
15063
  "div",
14933
15064
  {
14934
- className: `propeller-price-toggle flex items-center gap-2 ${props.className || ""}`,
15065
+ className: cn(`propeller-price-toggle flex items-center gap-2 ${props.className || ""}`),
14935
15066
  "data-state": isOn ? "on" : "off",
14936
15067
  children: [
14937
15068
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-price-toggle__label hidden sm:inline text-xs", children: label }),
@@ -15009,7 +15140,7 @@ function ProductBulkPrices(props) {
15009
15140
  function getPrice(tier) {
15010
15141
  const value = includeTax ? tier.net : tier.gross;
15011
15142
  if (value === null || value === void 0) return "";
15012
- return propellerV2CoreUi.formatPrice(value, { symbol: props.currency ?? "\u20AC" });
15143
+ return propellerV2CoreUi.formatPrice(value, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
15013
15144
  }
15014
15145
  function getQuantityLabel(tier, index) {
15015
15146
  const discount = tier.discount;
@@ -15020,13 +15151,14 @@ function ProductBulkPrices(props) {
15020
15151
  if (nextQty) return `${qty}\u2013${nextQty - 1}`;
15021
15152
  return `${qty}+`;
15022
15153
  }
15154
+ const title = props.labels?.title ?? "Volume pricing";
15023
15155
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !isHidden2 && hasItems ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
15024
15156
  "div",
15025
15157
  {
15026
- className: `propeller-product-bulk-prices ${props.className || ""}`,
15158
+ className: cn(`propeller-product-bulk-prices ${props.className || ""}`),
15027
15159
  "data-include-tax": includeTax ? "true" : "false",
15028
15160
  children: [
15029
- propellerV2CoreUi.getLabel(props.labels, "title", "Volume pricing") ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "propeller-product-bulk-prices__title text-base font-semibold text-foreground mb-3", children: propellerV2CoreUi.getLabel(props.labels, "title", "Volume pricing") }) : null,
15161
+ title ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "propeller-product-bulk-prices__title text-base font-semibold text-foreground mb-3", children: title }) : null,
15030
15162
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-bulk-prices__table-wrapper overflow-hidden rounded-container border border-border", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "propeller-product-bulk-prices__table w-full text-sm", children: [
15031
15163
  /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "propeller-product-bulk-prices__thead bg-muted/50", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
15032
15164
  /* @__PURE__ */ jsxRuntime.jsx("th", { className: "propeller-product-bulk-prices__th propeller-product-bulk-prices__th--quantity px-4 py-2 text-left font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "quantityFrom", "Qty from") }),
@@ -15073,7 +15205,7 @@ function ProductBundles(rawProps) {
15073
15205
  const props = useInfraProps(rawProps);
15074
15206
  const language = props.language;
15075
15207
  const currencySymbol = props.currency ?? "\u20AC";
15076
- const money = (value) => propellerV2CoreUi.formatPrice(value, { symbol: currencySymbol });
15208
+ const money = (value) => propellerV2CoreUi.formatPrice(value, { symbol: currencySymbol, locale: propellerV2CoreUi.localeForLanguage(props.language) });
15077
15209
  const [isMounted, setIsMounted] = React6.useState(false);
15078
15210
  const [addingBundleId, setAddingBundleId] = React6.useState(null);
15079
15211
  const [lastAddedBundle, setLastAddedBundle] = React6.useState(null);
@@ -15170,7 +15302,7 @@ function ProductBundles(rawProps) {
15170
15302
  React6.useEffect(() => {
15171
15303
  fetchBundles(props.productId);
15172
15304
  }, [props.productId]);
15173
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: isMounted && !isLoading && bundles.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-bundles ${props.className || "mb-12"}`, children: [
15305
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: isMounted && !isLoading && bundles.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-bundles ${props.className || "mb-12"}`), children: [
15174
15306
  bundles.map((bundle, bundleIdx) => {
15175
15307
  const bundlePrice = getBundlePrice(bundle, includeTax);
15176
15308
  const originalPrice = getOriginalPrice(bundle, includeTax);
@@ -15264,7 +15396,7 @@ function ProductBundles(rawProps) {
15264
15396
  onClick: () => handleAddToCart(bundle),
15265
15397
  disabled: addingBundleId === bundle.id,
15266
15398
  "data-loading": addingBundleId === bundle.id ? "true" : "false",
15267
- children: addingBundleId === bundle.id ? propellerV2CoreUi.getLabel(props.labels, "adding", "Adding...") : propellerV2CoreUi.getLabel(props.labels, "addToCart", "In cart")
15399
+ children: addingBundleId === bundle.id ? propellerV2CoreUi.getLabel(props.labels, "adding", "Adding...") : propellerV2CoreUi.getLabel(props.labels, "addToCart", "Add to cart")
15268
15400
  }
15269
15401
  )
15270
15402
  ] }) : props.showLoginPrompt !== false ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-bundles__login-prompt text-center text-sm text-muted-foreground py-2", children: propellerV2CoreUi.getLabel(
@@ -15469,7 +15601,7 @@ function ProductDescription(props) {
15469
15601
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!html ? /* @__PURE__ */ jsxRuntime.jsxs(
15470
15602
  "div",
15471
15603
  {
15472
- className: `propeller-product-description ${props.className || ""}`,
15604
+ className: cn(`propeller-product-description ${props.className || ""}`),
15473
15605
  "data-expanded": expanded ? "true" : "false",
15474
15606
  "data-truncatable": shouldTruncate ? "true" : "false",
15475
15607
  children: [
@@ -15508,7 +15640,7 @@ function ProductDownloads(props) {
15508
15640
  const match = alts.find((a) => a.language === lang);
15509
15641
  return match?.value || alts?.[0]?.value || "Download";
15510
15642
  }
15511
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-downloads ${props.className || ""}`, children: [
15643
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-downloads ${props.className || ""}`), children: [
15512
15644
  hasItems ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "propeller-product-downloads__title text-base font-semibold text-foreground mb-3", children: propellerV2CoreUi.getLabel(props.labels, "title", "Downloads") }) : null,
15513
15645
  hasItems ? /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "propeller-product-downloads__list space-y-2", children: items.map((doc, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "propeller-product-downloads__item", children: !!getDocumentUrl(doc) ? /* @__PURE__ */ jsxRuntime.jsxs(
15514
15646
  "a",
@@ -15579,7 +15711,7 @@ function ProductGallery(props) {
15579
15711
  if (images.length === 0) return;
15580
15712
  setSelectedIndex((idx) => (idx + 1) % images.length);
15581
15713
  }
15582
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-gallery ${props.className || ""}`, children: [
15714
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-gallery ${props.className || ""}`), children: [
15583
15715
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-gallery__stage relative aspect-square bg-card overflow-hidden", children: [
15584
15716
  images.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-gallery__empty flex h-full w-full items-center justify-center bg-surface-hover", children: /* @__PURE__ */ jsxRuntime.jsx(
15585
15717
  "svg",
@@ -15914,13 +16046,13 @@ function ProductInfo(rawProps) {
15914
16046
  }
15915
16047
  };
15916
16048
  if (rawProps.children !== void 0) {
15917
- return /* @__PURE__ */ jsxRuntime.jsx(ProductInfoContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: pdpConfig, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-info ${props.className || ""}`, children: [
16049
+ return /* @__PURE__ */ jsxRuntime.jsx(ProductInfoContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: pdpConfig, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-info ${props.className || ""}`), children: [
15918
16050
  props.beforeContent ? props.beforeContent(product) : null,
15919
16051
  rawProps.children,
15920
16052
  props.afterContent ? props.afterContent(product) : null
15921
16053
  ] }) }) });
15922
16054
  }
15923
- return /* @__PURE__ */ jsxRuntime.jsx(ProductInfoContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: pdpConfig, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-info ${props.className || ""}`, children: [
16055
+ return /* @__PURE__ */ jsxRuntime.jsx(ProductInfoContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: pdpConfig, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-info ${props.className || ""}`), children: [
15924
16056
  props.beforeContent ? props.beforeContent(product) : null,
15925
16057
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
15926
16058
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-info__media relative", children: [
@@ -15942,7 +16074,7 @@ function ProductInfo(rawProps) {
15942
16074
  props.afterContent ? props.afterContent(product) : null
15943
16075
  ] }) }) });
15944
16076
  }
15945
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-info ${props.className || ""}`, "data-loading": loading ? "true" : "false", children: [
16077
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-info ${props.className || ""}`), "data-loading": loading ? "true" : "false", children: [
15946
16078
  loading && !props.product ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-info__skeleton animate-pulse space-y-3", children: [
15947
16079
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-info__skeleton-line h-4 bg-surface-hover rounded w-1/4" }),
15948
16080
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-info__skeleton-line h-8 bg-surface-hover rounded w-3/4" })
@@ -16218,7 +16350,7 @@ function ProductShortDescription(props) {
16218
16350
  "div",
16219
16351
  {
16220
16352
  dangerouslySetInnerHTML: { __html: html },
16221
- className: `propeller-product-short-description prose prose-slate max-w-none text-muted-foreground ${props.className || ""}`
16353
+ className: cn(`propeller-product-short-description prose prose-slate max-w-none text-muted-foreground ${props.className || ""}`)
16222
16354
  }
16223
16355
  ) : null });
16224
16356
  }
@@ -16385,7 +16517,7 @@ function ProductSlider(rawProps) {
16385
16517
  }, [sliderId, items().length]);
16386
16518
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16387
16519
  " ",
16388
- !(isCrossUpsellMode() && !isLoading && items().length === 0) ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-slider ${props.containerClassName || "mb-12"}`, "data-loading": isLoading ? "true" : "false", children: [
16520
+ !(isCrossUpsellMode() && !isLoading && items().length === 0) ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-slider ${props.containerClassName || "mb-12"}`), "data-loading": isLoading ? "true" : "false", children: [
16389
16521
  sliderTitle() || items().length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-slider__header flex items-center justify-between mb-6", children: [
16390
16522
  sliderTitle() ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "propeller-product-slider__title text-2xl font-bold", children: sliderTitle() }) : null,
16391
16523
  items().length > desktopCount() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-slider__nav flex gap-2", children: [
@@ -16573,7 +16705,7 @@ function ProductSpecifications(rawProps) {
16573
16705
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !loading && (hasPublicAttributes() || props.packageDescription || hasSlotContent) ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
16574
16706
  "div",
16575
16707
  {
16576
- className: `propeller-product-specifications ${props.className || ""}`,
16708
+ className: cn(`propeller-product-specifications ${props.className || ""}`),
16577
16709
  "data-layout": props.layout === "list" ? "list" : "table",
16578
16710
  "data-grouped": props.grouping ? "true" : "false",
16579
16711
  children: [
@@ -16654,7 +16786,7 @@ function ProductVideos(props) {
16654
16786
  }
16655
16787
  return uri;
16656
16788
  }
16657
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-videos ${props.className || ""}`, children: [
16789
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-videos ${props.className || ""}`), children: [
16658
16790
  hasItems ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "propeller-product-videos__title text-base font-semibold text-foreground mb-3", children: propellerV2CoreUi.getLabel(props.labels, "title", "Videos") }) : null,
16659
16791
  hasItems ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-videos__list space-y-4", children: items.map((video, index) => /* @__PURE__ */ jsxRuntime.jsx(
16660
16792
  "div",
@@ -16752,7 +16884,7 @@ function ProductTabs(rawProps) {
16752
16884
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.product ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
16753
16885
  "div",
16754
16886
  {
16755
- className: `propeller-product-tabs ${props.className || ""}`,
16887
+ className: cn(`propeller-product-tabs ${props.className || ""}`),
16756
16888
  "data-active-tab": activeTab,
16757
16889
  children: [
16758
16890
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-tabs__desktop hidden md:block", children: [
@@ -17058,7 +17190,7 @@ function PurchaseAuthorizationConfigurator(rawProps) {
17058
17190
  onPurchaseAuthorizationDelete: props.onPurchaseAuthorizationDelete,
17059
17191
  afterPurchaseAuthorizationDelete: props.afterPurchaseAuthorizationDelete
17060
17192
  });
17061
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-purchase-authorization-configurator ${props.className || ""}`, children: isAuthManager ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
17193
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-purchase-authorization-configurator ${props.className || ""}`), children: isAuthManager ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
17062
17194
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
17063
17195
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
17064
17196
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold", children: propellerV2CoreUi.getLabel(props.labels, "title", "Purchase Authorization Settings") }),
@@ -17403,7 +17535,7 @@ function PurchaseAuthorizationRequests(rawProps) {
17403
17535
  }
17404
17536
  function formatPrice17(price) {
17405
17537
  if (props.formatPrice) return props.formatPrice(price);
17406
- return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC" });
17538
+ return propellerV2CoreUi.formatPrice(price, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
17407
17539
  }
17408
17540
  const columnLabelKeys = {
17409
17541
  date: ["colDate", "Date"],
@@ -17425,7 +17557,7 @@ function PurchaseAuthorizationRequests(rawProps) {
17425
17557
  if (fromBundle) return fromBundle;
17426
17558
  return item?.product?.sku || "";
17427
17559
  }
17428
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-purchase-authorization-requests ${props.className || ""}`, children: isAuthManager ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-purchase-authorization-requests__content space-y-4", children: [
17560
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-purchase-authorization-requests ${props.className || ""}`), children: isAuthManager ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-purchase-authorization-requests__content space-y-4", children: [
17429
17561
  !props.hideTitle ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "propeller-purchase-authorization-requests__title text-xl font-semibold", children: propellerV2CoreUi.getLabel(props.labels, "title", "Authorization Requests") }) : null,
17430
17562
  loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 border-4 border-primary border-t-transparent rounded-full animate-spin" }) }) : null,
17431
17563
  !loading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -18624,12 +18756,12 @@ function RegisterForm(rawProps) {
18624
18756
  ] });
18625
18757
  }
18626
18758
  var RegisterForm_default = RegisterForm;
18627
- function mapToSearchBarResult(item, language) {
18759
+ function mapToSearchBarResult(item, language, urls) {
18628
18760
  const isCluster = "clusterId" in item;
18629
18761
  const displayItem = isCluster ? item.defaultProduct : item;
18630
18762
  const id = isCluster ? item.clusterId : item.productId;
18631
18763
  const slug = propellerV2CoreUi.getLocalizedValue(item.slugs, language, "");
18632
- const url = isCluster ? "/cluster/" + id + "/" + slug : "/product/" + id + "/" + slug;
18764
+ const url = isCluster ? urls?.getClusterUrl?.(item, language) || "/cluster/" + id + "/" + slug : urls?.getProductUrl?.(item, language) || "/product/" + id + "/" + slug;
18633
18765
  const priceNet = displayItem?.price?.net || 0;
18634
18766
  const priceGross = displayItem?.price?.gross || 0;
18635
18767
  const localizedName = language && item.names?.find((n) => n.language === language)?.value || item.names?.[0]?.value || "Product";
@@ -18669,13 +18801,19 @@ function SearchBar(rawProps) {
18669
18801
  applyOrderlists: props.applyOrderlists,
18670
18802
  productTrackAttributes: props.productTrackAttributes
18671
18803
  });
18672
- const results = searchResults.slice(0, maxResults).map((item) => mapToSearchBarResult(item, props.language));
18804
+ const results = searchResults.slice(0, maxResults).map(
18805
+ (item) => mapToSearchBarResult(
18806
+ item,
18807
+ props.language,
18808
+ props.configuration?.urls
18809
+ )
18810
+ );
18673
18811
  const itemsFound = searchItemsFound;
18674
18812
  function formatItemPrice(price) {
18675
18813
  if (props.formatPrice) {
18676
18814
  return props.formatPrice(price);
18677
18815
  }
18678
- return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC" });
18816
+ return propellerV2CoreUi.formatPrice(price || 0, { symbol: props.currency ?? "\u20AC", locale: propellerV2CoreUi.localeForLanguage(props.language) });
18679
18817
  }
18680
18818
  const useTax = !!props.includeTax;
18681
18819
  function leadingPrice(result) {
@@ -18745,7 +18883,7 @@ function SearchBar(rawProps) {
18745
18883
  {
18746
18884
  ref: containerRef,
18747
18885
  "data-search-bar": true,
18748
- className: `propeller-search-bar ${props.containerClassName || "relative flex-1 max-w-2xl mx-8"}`,
18886
+ className: cn(`propeller-search-bar ${props.containerClassName || "relative flex-1 max-w-2xl mx-8"}`),
18749
18887
  "data-open": showDropdown ? "true" : "false",
18750
18888
  children: [
18751
18889
  /* @__PURE__ */ jsxRuntime.jsx("form", { className: "propeller-search-bar__form", onSubmit: (e) => handleSubmit(e), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-search-bar__input-wrapper relative", children: [
@@ -18774,7 +18912,14 @@ function SearchBar(rawProps) {
18774
18912
  {
18775
18913
  type: "search",
18776
18914
  autoComplete: "off",
18777
- className: "propeller-search-bar__input w-full pl-10 pr-10 py-2 bg-white/95 border border-white/20 rounded-container focus:outline-none focus:ring-2 focus:ring-secondary placeholder:text-muted-foreground",
18915
+ className: cn(
18916
+ // Themed surface + border rather than the white-on-white the
18917
+ // boilerplate's dark header band happened to make work: on a
18918
+ // light header `bg-white/95 border-white/20` rendered as an
18919
+ // invisible input.
18920
+ "propeller-search-bar__input w-full pl-10 pr-10 py-2 bg-card border border-input rounded-container focus:outline-none focus:ring-2 focus:ring-secondary placeholder:text-muted-foreground",
18921
+ props.inputClassName
18922
+ ),
18778
18923
  placeholder: props.placeholder || "Search products...",
18779
18924
  value: localTerm,
18780
18925
  onChange: (e) => handleInputChange(e.target.value)