@cimplify/sdk 0.71.0 → 0.73.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.
Files changed (41) hide show
  1. package/dist/react.d.mts +64 -17
  2. package/dist/react.d.ts +64 -17
  3. package/dist/react.js +209 -87
  4. package/dist/react.mjs +210 -88
  5. package/dist/styles.css +1 -1
  6. package/dist/testing.d.mts +15 -15
  7. package/dist/testing.d.ts +15 -15
  8. package/package.json +1 -1
  9. package/registry/accommodation-card.json +1 -1
  10. package/registry/add-on-selector.json +1 -1
  11. package/registry/billing-plan-selector.json +1 -1
  12. package/registry/booking-page.json +1 -1
  13. package/registry/bundle-selector.json +1 -1
  14. package/registry/compact-service-card.json +1 -1
  15. package/registry/composite-selector.json +1 -1
  16. package/registry/customer-input-fields.json +1 -1
  17. package/registry/date-slot-picker.json +1 -1
  18. package/registry/default-product-layout.json +1 -1
  19. package/registry/digital-product-card.json +1 -1
  20. package/registry/digital-product-layout.json +1 -1
  21. package/registry/food-product-card.json +1 -1
  22. package/registry/food-product-layout.json +1 -1
  23. package/registry/lease-service-card.json +1 -1
  24. package/registry/price-range.json +1 -1
  25. package/registry/price.json +1 -1
  26. package/registry/product-card.json +1 -1
  27. package/registry/product-customizer.json +1 -1
  28. package/registry/product-image-gallery.json +1 -1
  29. package/registry/product-sheet.json +1 -1
  30. package/registry/rental-service-card.json +1 -1
  31. package/registry/retail-product-card.json +1 -1
  32. package/registry/sale-badge.json +1 -1
  33. package/registry/schedule-service-card.json +1 -1
  34. package/registry/service-product-layout.json +1 -1
  35. package/registry/slot-picker.json +1 -1
  36. package/registry/standard-service-card.json +1 -1
  37. package/registry/subscription-card.json +1 -1
  38. package/registry/variant-selector.json +1 -1
  39. package/registry/volume-pricing.json +1 -1
  40. package/registry/wholesale-product-card.json +1 -1
  41. package/registry/wholesale-product-layout.json +1 -1
package/dist/react.mjs CHANGED
@@ -3,7 +3,7 @@ import { DURATION_UNIT, getVariantDisplayName, INPUT_FIELD_TYPE, PRODUCT_TYPE, r
3
3
  export { getVariantDisplayName } from './chunk-E6T5VJMG.mjs';
4
4
  import { createCimplifyClient } from './chunk-H337NF4O.mjs';
5
5
  import { ELEMENT_TYPES, EVENT_TYPES, startSignIn } from './chunk-3BKMNVTR.mjs';
6
- import { parsePrice, formatMoney, formatPrice, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-TD3AY34U.mjs';
6
+ import { parsePrice, formatMoney, formatPrice, getProductCurrency, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-TD3AY34U.mjs';
7
7
  import { isSupportedCurrency } from './chunk-AMZXALF6.mjs';
8
8
  import './chunk-3G6RQLXK.mjs';
9
9
  import React14, { createContext, useRef, useState, useCallback, useEffect, useContext, useMemo, useId, useSyncExternalStore } from 'react';
@@ -1144,14 +1144,20 @@ function CimplifyProvider({
1144
1144
  client,
1145
1145
  children,
1146
1146
  onLocationChange,
1147
+ initialBusiness,
1148
+ initialLocations,
1147
1149
  optimistic = true
1148
1150
  }) {
1149
1151
  const resolvedClient = useMemo(() => client ?? createDefaultClient(), [client]);
1150
1152
  const onLocationChangeRef = useRef(onLocationChange);
1151
- const [business, setBusiness] = useState(null);
1152
- const [locations, setLocations] = useState([]);
1153
- const [currentLocation, setCurrentLocationState] = useState(null);
1154
- const [isReady, setIsReady] = useState(false);
1153
+ const seeded = initialBusiness !== void 0;
1154
+ const initialBootstrapDone = useRef(seeded);
1155
+ const [business, setBusiness] = useState(initialBusiness ?? null);
1156
+ const [locations, setLocations] = useState(initialLocations ?? []);
1157
+ const [currentLocation, setCurrentLocationState] = useState(
1158
+ initialLocations && initialLocations.length > 0 ? initialLocations[0] : null
1159
+ );
1160
+ const [isReady, setIsReady] = useState(seeded);
1155
1161
  useEffect(() => {
1156
1162
  onLocationChangeRef.current = onLocationChange;
1157
1163
  }, [onLocationChange]);
@@ -1225,7 +1231,9 @@ function CimplifyProvider({
1225
1231
  useEffect(() => {
1226
1232
  let cancelled = false;
1227
1233
  async function bootstrap() {
1228
- setIsReady(false);
1234
+ if (!initialBootstrapDone.current) {
1235
+ setIsReady(false);
1236
+ }
1229
1237
  const [businessResult, locationsResult] = await Promise.all([
1230
1238
  resolvedClient.business.getInfo(),
1231
1239
  resolvedClient.business.getLocations()
@@ -1250,23 +1258,27 @@ function CimplifyProvider({
1250
1258
  resolvedClient.setLocationId(null);
1251
1259
  setStoredLocationId(null);
1252
1260
  }
1261
+ initialBootstrapDone.current = true;
1253
1262
  setIsReady(true);
1254
1263
  }
1255
1264
  bootstrap().catch(() => {
1256
1265
  if (cancelled) {
1257
1266
  return;
1258
1267
  }
1259
- setBusiness(null);
1260
- setLocations([]);
1261
- setCurrentLocationState(null);
1262
- resolvedClient.setLocationId(null);
1263
- setStoredLocationId(null);
1268
+ if (!seeded) {
1269
+ setBusiness(null);
1270
+ setLocations([]);
1271
+ setCurrentLocationState(null);
1272
+ resolvedClient.setLocationId(null);
1273
+ setStoredLocationId(null);
1274
+ }
1275
+ initialBootstrapDone.current = true;
1264
1276
  setIsReady(true);
1265
1277
  });
1266
1278
  return () => {
1267
1279
  cancelled = true;
1268
1280
  };
1269
- }, [resolvedClient]);
1281
+ }, [resolvedClient, seeded]);
1270
1282
  const clientContextValue = useMemo(
1271
1283
  () => ({
1272
1284
  client: resolvedClient,
@@ -4198,11 +4210,18 @@ function CimplifyUserButton({
4198
4210
  )
4199
4211
  ] });
4200
4212
  }
4201
- function Price({ amount, currency, className, prefix }) {
4213
+ function Price({
4214
+ amount,
4215
+ currency,
4216
+ className,
4217
+ prefix,
4218
+ convert = true
4219
+ }) {
4202
4220
  const context = useOptionalCimplify();
4203
- const resolvedCurrency = currency ?? context?.displayCurrency ?? "USD";
4204
- const convertedAmount = !currency && context?.convertPrice ? context.convertPrice(amount) : amount;
4205
- const resolvedAmount = typeof convertedAmount === "string" ? parseFloat(convertedAmount) || 0 : convertedAmount;
4221
+ const sourceCurrency = currency ?? context?.baseCurrency ?? "USD";
4222
+ const fxActive = convert && context?.fxRate != null && context.displayCurrency !== sourceCurrency && sourceCurrency === context.baseCurrency;
4223
+ const resolvedCurrency = fxActive ? context.displayCurrency : sourceCurrency;
4224
+ const resolvedAmount = fxActive ? context.convertPrice(amount) : typeof amount === "string" ? parseFloat(amount) || 0 : amount;
4206
4225
  return /* @__PURE__ */ jsxs("span", { className, children: [
4207
4226
  prefix,
4208
4227
  formatPrice(resolvedAmount, resolvedCurrency)
@@ -6158,6 +6177,7 @@ function VariantSelector({
6158
6177
  variants,
6159
6178
  variantAxes,
6160
6179
  basePrice,
6180
+ currency,
6161
6181
  selectedVariantId,
6162
6182
  onVariantChange,
6163
6183
  productName,
@@ -6230,6 +6250,36 @@ function VariantSelector({
6230
6250
  className: cn("flex flex-wrap gap-2", classNames?.axisOptions),
6231
6251
  children: axis.values.map((value) => {
6232
6252
  const isSelected = axisSelections[axis.id] === value.id;
6253
+ if (value.image_url || value.color_hex) {
6254
+ const isImage = Boolean(value.image_url);
6255
+ return /* @__PURE__ */ jsx(
6256
+ Radio.Root,
6257
+ {
6258
+ value: value.id,
6259
+ "data-cimplify-variant-option": true,
6260
+ "data-cimplify-variant-swatch": true,
6261
+ "data-selected": isSelected || void 0,
6262
+ "aria-label": value.name,
6263
+ title: value.name,
6264
+ style: isImage ? void 0 : { backgroundColor: value.color_hex },
6265
+ className: cn(
6266
+ "relative overflow-hidden border border-border transition-shadow",
6267
+ isImage ? "h-12 w-12 rounded-md" : "h-9 w-9 rounded-full",
6268
+ isSelected && "ring-2 ring-foreground ring-offset-2 ring-offset-background border-transparent",
6269
+ isSelected ? classNames?.swatchSelected : classNames?.swatch
6270
+ ),
6271
+ children: isImage && /* @__PURE__ */ jsx(
6272
+ "img",
6273
+ {
6274
+ src: value.image_url,
6275
+ alt: "",
6276
+ className: "h-full w-full object-cover"
6277
+ }
6278
+ )
6279
+ },
6280
+ value.id
6281
+ );
6282
+ }
6233
6283
  return /* @__PURE__ */ jsx(
6234
6284
  Radio.Root,
6235
6285
  {
@@ -6310,7 +6360,7 @@ function VariantSelector({
6310
6360
  ),
6311
6361
  /* @__PURE__ */ jsxs("span", { "data-cimplify-variant-pricing": true, className: cn("text-sm text-muted-foreground", classNames?.pricing), children: [
6312
6362
  adjustment > 0 ? "+" : adjustment < 0 ? "" : "+",
6313
- /* @__PURE__ */ jsx(Price, { amount: variant.price_adjustment })
6363
+ /* @__PURE__ */ jsx(Price, { amount: variant.price_adjustment, currency })
6314
6364
  ] })
6315
6365
  ]
6316
6366
  },
@@ -6325,6 +6375,7 @@ function AddOnSelector({
6325
6375
  addOns,
6326
6376
  selectedOptions,
6327
6377
  onOptionsChange,
6378
+ currency,
6328
6379
  className,
6329
6380
  classNames
6330
6381
  }) {
@@ -6483,7 +6534,7 @@ function AddOnSelector({
6483
6534
  ),
6484
6535
  option.default_price != null && /* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
6485
6536
  "+",
6486
- /* @__PURE__ */ jsx(Price, { amount: option.default_price })
6537
+ /* @__PURE__ */ jsx(Price, { amount: option.default_price, currency })
6487
6538
  ] })
6488
6539
  ]
6489
6540
  },
@@ -6503,6 +6554,7 @@ function BundleSelector({
6503
6554
  bundlePrice,
6504
6555
  discountValue,
6505
6556
  pricingType,
6557
+ currency,
6506
6558
  onSelectionsChange,
6507
6559
  onPriceChange,
6508
6560
  onReady,
@@ -6583,6 +6635,7 @@ function BundleSelector({
6583
6635
  component: comp,
6584
6636
  selectedVariantId: variantChoices[comp.id],
6585
6637
  onVariantChange: (variantId) => handleVariantChange(comp.id, variantId),
6638
+ currency,
6586
6639
  classNames
6587
6640
  },
6588
6641
  comp.id
@@ -6594,7 +6647,7 @@ function BundleSelector({
6594
6647
  className: cn("border-t border-border pt-4 flex justify-between text-sm", classNames?.summary),
6595
6648
  children: [
6596
6649
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Bundle price" }),
6597
- /* @__PURE__ */ jsx(Price, { amount: bundlePrice, className: "font-medium text-primary" })
6650
+ /* @__PURE__ */ jsx(Price, { amount: bundlePrice, currency, className: "font-medium text-primary" })
6598
6651
  ]
6599
6652
  }
6600
6653
  ),
@@ -6605,7 +6658,7 @@ function BundleSelector({
6605
6658
  className: cn("flex justify-between text-sm", classNames?.savings),
6606
6659
  children: [
6607
6660
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "You save" }),
6608
- /* @__PURE__ */ jsx(Price, { amount: discountValue, className: "text-green-600 font-medium" })
6661
+ /* @__PURE__ */ jsx(Price, { amount: discountValue, currency, className: "text-green-600 font-medium" })
6609
6662
  ]
6610
6663
  }
6611
6664
  )
@@ -6638,6 +6691,7 @@ function BundleComponentCard({
6638
6691
  component,
6639
6692
  selectedVariantId,
6640
6693
  onVariantChange,
6694
+ currency,
6641
6695
  classNames
6642
6696
  }) {
6643
6697
  const idPrefix = useId();
@@ -6718,7 +6772,7 @@ function BundleComponentCard({
6718
6772
  }
6719
6773
  )
6720
6774
  ] }),
6721
- /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ jsx(Price, { amount: displayPrice }) })
6775
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ jsx(Price, { amount: displayPrice, currency }) })
6722
6776
  ]
6723
6777
  }
6724
6778
  ),
@@ -6764,7 +6818,7 @@ function BundleComponentCard({
6764
6818
  className: cn("text-sm text-muted-foreground", classNames?.variantAdjustment),
6765
6819
  children: [
6766
6820
  adjustment > 0 ? "+" : "",
6767
- /* @__PURE__ */ jsx(Price, { amount: variant.price_adjustment })
6821
+ /* @__PURE__ */ jsx(Price, { amount: variant.price_adjustment, currency })
6768
6822
  ]
6769
6823
  }
6770
6824
  )
@@ -6782,6 +6836,7 @@ function BundleComponentCard({
6782
6836
  function CompositeSelector({
6783
6837
  compositeId,
6784
6838
  groups,
6839
+ currency,
6785
6840
  onSelectionsChange,
6786
6841
  onPriceChange,
6787
6842
  onReady,
@@ -7160,7 +7215,7 @@ function CompositeSelector({
7160
7215
  ),
7161
7216
  component.price != null && /* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground shrink-0", children: [
7162
7217
  "+",
7163
- /* @__PURE__ */ jsx(Price, { amount: component.price })
7218
+ /* @__PURE__ */ jsx(Price, { amount: component.price, currency })
7164
7219
  ] })
7165
7220
  ]
7166
7221
  },
@@ -7187,7 +7242,7 @@ function CompositeSelector({
7187
7242
  className: cn("flex justify-between text-muted-foreground", classNames?.summaryLine),
7188
7243
  children: [
7189
7244
  /* @__PURE__ */ jsx("span", { children: "Base" }),
7190
- /* @__PURE__ */ jsx(Price, { amount: priceResult.base_price })
7245
+ /* @__PURE__ */ jsx(Price, { amount: priceResult.base_price, currency })
7191
7246
  ]
7192
7247
  }
7193
7248
  ),
@@ -7198,7 +7253,7 @@ function CompositeSelector({
7198
7253
  className: cn("flex justify-between text-muted-foreground", classNames?.summaryLine),
7199
7254
  children: [
7200
7255
  /* @__PURE__ */ jsx("span", { children: "Selections" }),
7201
- /* @__PURE__ */ jsx(Price, { amount: priceResult.components_total })
7256
+ /* @__PURE__ */ jsx(Price, { amount: priceResult.components_total, currency })
7202
7257
  ]
7203
7258
  }
7204
7259
  ),
@@ -7209,7 +7264,7 @@ function CompositeSelector({
7209
7264
  className: cn("flex justify-between font-medium pt-1 border-t border-border", classNames?.summaryTotal),
7210
7265
  children: [
7211
7266
  /* @__PURE__ */ jsx("span", { children: "Total" }),
7212
- /* @__PURE__ */ jsx(Price, { amount: priceResult.final_price, className: "text-primary" })
7267
+ /* @__PURE__ */ jsx(Price, { amount: priceResult.final_price, currency, className: "text-primary" })
7213
7268
  ]
7214
7269
  }
7215
7270
  )
@@ -7266,6 +7321,7 @@ function formatMarkup(plan) {
7266
7321
  function BillingPlanSelector({
7267
7322
  productId,
7268
7323
  plans: plansProp,
7324
+ currency,
7269
7325
  onPlanSelect,
7270
7326
  selectedPlanId,
7271
7327
  showOneTimePurchase = false,
@@ -7327,7 +7383,7 @@ function BillingPlanSelector({
7327
7383
  markup && /* @__PURE__ */ jsx("span", { "data-cimplify-billing-markup": true, className: classNames?.price, children: markup }),
7328
7384
  plan.markup_type === "fixed" && plan.markup_amount != null && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-markup": true, className: classNames?.price, children: [
7329
7385
  "+",
7330
- /* @__PURE__ */ jsx(Price, { amount: plan.markup_amount })
7386
+ /* @__PURE__ */ jsx(Price, { amount: plan.markup_amount, currency })
7331
7387
  ] }),
7332
7388
  plan.trial_days > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-trial": true, className: classNames?.trialBadge, children: [
7333
7389
  plan.trial_days,
@@ -7335,7 +7391,7 @@ function BillingPlanSelector({
7335
7391
  ] }),
7336
7392
  plan.setup_fee > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-setup-fee": true, className: classNames?.setupFee, children: [
7337
7393
  "Setup fee: ",
7338
- /* @__PURE__ */ jsx(Price, { amount: plan.setup_fee })
7394
+ /* @__PURE__ */ jsx(Price, { amount: plan.setup_fee, currency })
7339
7395
  ] }),
7340
7396
  plan.plan_type === "installment" && plan.installment_periods != null && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-periods": true, children: [
7341
7397
  plan.installment_periods,
@@ -7363,6 +7419,7 @@ function VolumePricing({
7363
7419
  tiers,
7364
7420
  currentQuantity,
7365
7421
  defaultOpen = false,
7422
+ currency,
7366
7423
  className,
7367
7424
  classNames
7368
7425
  }) {
@@ -7427,7 +7484,7 @@ function VolumePricing({
7427
7484
  }
7428
7485
  ),
7429
7486
  /* @__PURE__ */ jsxs("span", { "data-cimplify-volume-pricing-price": true, className: classNames?.tierPrice, children: [
7430
- /* @__PURE__ */ jsx(Price, { amount: tier.unit_price, prefix: "" }),
7487
+ /* @__PURE__ */ jsx(Price, { amount: tier.unit_price, currency, prefix: "" }),
7431
7488
  " /ea"
7432
7489
  ] })
7433
7490
  ]
@@ -7702,6 +7759,7 @@ function CustomerInputFields({
7702
7759
  values,
7703
7760
  onChange,
7704
7761
  onFileUpload,
7762
+ currency,
7705
7763
  className,
7706
7764
  classNames
7707
7765
  }) {
@@ -7731,6 +7789,7 @@ function CustomerInputFields({
7731
7789
  value: values[field.id],
7732
7790
  onValueChange: (value) => setValue(field.id, value),
7733
7791
  onFileUpload: onFileUpload ?? (clientContext?.client ? (_file, _field) => defaultFileUpload(_file) : void 0),
7792
+ currency,
7734
7793
  classNames
7735
7794
  },
7736
7795
  field.id
@@ -7741,6 +7800,7 @@ function InputField({
7741
7800
  value,
7742
7801
  onValueChange,
7743
7802
  onFileUpload,
7803
+ currency,
7744
7804
  classNames
7745
7805
  }) {
7746
7806
  const hasPriceAdjustment = field.price_adjustment != null && parsePrice(field.price_adjustment) > 0;
@@ -7750,7 +7810,7 @@ function InputField({
7750
7810
  field.is_required && /* @__PURE__ */ jsx("span", { className: cn("text-xs text-destructive", classNames?.required), children: "Required" }),
7751
7811
  hasPriceAdjustment && /* @__PURE__ */ jsxs("span", { className: cn("text-xs text-muted-foreground", classNames?.priceAdjustment), children: [
7752
7812
  "+",
7753
- /* @__PURE__ */ jsx(Price, { amount: field.price_adjustment })
7813
+ /* @__PURE__ */ jsx(Price, { amount: field.price_adjustment, currency })
7754
7814
  ] })
7755
7815
  ] }),
7756
7816
  field.help_text && /* @__PURE__ */ jsx("p", { className: cn("text-xs text-muted-foreground mb-1.5", classNames?.helpText), children: field.help_text }),
@@ -8673,6 +8733,8 @@ function SlotPicker({
8673
8733
  onSlotSelect,
8674
8734
  groupByTimeOfDay = true,
8675
8735
  showPrice = true,
8736
+ lowCapacityThreshold = 3,
8737
+ currency,
8676
8738
  schedulingMode = "intraday",
8677
8739
  durationUnit,
8678
8740
  durationValue,
@@ -8765,14 +8827,18 @@ function SlotPicker({
8765
8827
  children: group.slots.map((slot) => {
8766
8828
  const value = slotToValue(slot);
8767
8829
  const isSelected = selectedSlot?.start_time === slot.start_time && selectedSlot?.end_time === slot.end_time;
8830
+ const capacity = slot.capacity_available ?? slot.remaining_capacity;
8831
+ const soldOut = capacity === 0;
8832
+ const unavailable = slot.is_available === false || soldOut;
8833
+ const lowCapacity = lowCapacityThreshold > 0 && capacity != null && capacity > 0 && capacity <= lowCapacityThreshold;
8768
8834
  return /* @__PURE__ */ jsxs(
8769
8835
  Radio.Root,
8770
8836
  {
8771
8837
  value,
8772
- disabled: slot.is_available === false,
8838
+ disabled: unavailable,
8773
8839
  "data-cimplify-slot": true,
8774
8840
  "data-selected": isSelected || void 0,
8775
- "data-unavailable": slot.is_available === false || void 0,
8841
+ "data-unavailable": unavailable || void 0,
8776
8842
  className: cn(
8777
8843
  "inline-flex items-center justify-center gap-2 rounded-md border border-border bg-background px-3 py-2 text-sm font-medium text-foreground transition-colors hover:border-foreground/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[selected]:border-foreground data-[selected]:bg-foreground data-[selected]:text-background data-[unavailable]:cursor-not-allowed data-[unavailable]:opacity-40 data-[unavailable]:line-through",
8778
8844
  isMultiDay && "justify-between text-left",
@@ -8785,7 +8851,18 @@ function SlotPicker({
8785
8851
  {
8786
8852
  "data-cimplify-slot-price": true,
8787
8853
  className: cn("text-xs opacity-70", classNames?.slotPrice),
8788
- children: /* @__PURE__ */ jsx(Price, { amount: slot.price })
8854
+ children: /* @__PURE__ */ jsx(Price, { amount: slot.price, currency })
8855
+ }
8856
+ ),
8857
+ lowCapacity && /* @__PURE__ */ jsxs(
8858
+ "span",
8859
+ {
8860
+ "data-cimplify-slot-scarcity": true,
8861
+ className: cn("text-xs font-medium text-amber-600", classNames?.slotScarcity),
8862
+ children: [
8863
+ capacity,
8864
+ " left"
8865
+ ]
8789
8866
  }
8790
8867
  )
8791
8868
  ]
@@ -8822,6 +8899,7 @@ function DateSlotPicker({
8822
8899
  onSlotSelect,
8823
8900
  availability: availabilityProp,
8824
8901
  showPrice = true,
8902
+ currency,
8825
8903
  schedulingMode,
8826
8904
  durationUnit,
8827
8905
  durationValue,
@@ -8970,6 +9048,7 @@ function DateSlotPicker({
8970
9048
  selectedSlot,
8971
9049
  onSlotSelect: handleSlotSelect,
8972
9050
  showPrice,
9051
+ currency,
8973
9052
  schedulingMode,
8974
9053
  durationUnit,
8975
9054
  durationValue,
@@ -9006,6 +9085,7 @@ function ProductCustomizer({
9006
9085
  const [specialInstructions, setSpecialInstructions] = useState("");
9007
9086
  const [selectedSlot, setSelectedSlot] = useState(null);
9008
9087
  const cart = useCart();
9088
+ const currency = getProductCurrency(product);
9009
9089
  const productType = product.type || "product";
9010
9090
  const isComposite = productType === "composite";
9011
9091
  const isBundle = productType === "bundle";
@@ -9172,6 +9252,7 @@ function ProductCustomizer({
9172
9252
  {
9173
9253
  compositeId: product.composite_id,
9174
9254
  groups: product.groups,
9255
+ currency,
9175
9256
  onSelectionsChange: setCompositeSelections,
9176
9257
  onPriceChange: setCompositePrice,
9177
9258
  onReady: setCompositeReady,
@@ -9185,6 +9266,7 @@ function ProductCustomizer({
9185
9266
  bundlePrice: product.bundle_price,
9186
9267
  discountValue: product.discount_value,
9187
9268
  pricingType: product.pricing_type,
9269
+ currency,
9188
9270
  onSelectionsChange: setBundleSelections,
9189
9271
  onPriceChange: setBundleTotalPrice,
9190
9272
  onReady: setBundleReady
@@ -9196,7 +9278,8 @@ function ProductCustomizer({
9196
9278
  serviceId: product.id,
9197
9279
  selectedSlot,
9198
9280
  onSlotSelect: (slot) => setSelectedSlot(slot),
9199
- participantCount: quantity
9281
+ participantCount: quantity,
9282
+ currency
9200
9283
  }
9201
9284
  ),
9202
9285
  hasVariants && /* @__PURE__ */ jsx(
@@ -9205,6 +9288,7 @@ function ProductCustomizer({
9205
9288
  variants: product.variants,
9206
9289
  variantAxes: product.variant_axes,
9207
9290
  basePrice: product.default_price,
9291
+ currency,
9208
9292
  selectedVariantId,
9209
9293
  onVariantChange: handleVariantChange,
9210
9294
  productName: product.name
@@ -9215,7 +9299,8 @@ function ProductCustomizer({
9215
9299
  {
9216
9300
  addOns: product.add_ons,
9217
9301
  selectedOptions: selectedAddOnOptionIds,
9218
- onOptionsChange: setSelectedAddOnOptionIds
9302
+ onOptionsChange: setSelectedAddOnOptionIds,
9303
+ currency
9219
9304
  }
9220
9305
  ),
9221
9306
  product.billing_plans && product.billing_plans.length > 0 && /* @__PURE__ */ jsx(
@@ -9223,6 +9308,7 @@ function ProductCustomizer({
9223
9308
  {
9224
9309
  productId: product.id,
9225
9310
  plans: product.billing_plans,
9311
+ currency,
9226
9312
  onPlanSelect: setSelectedBillingPlan,
9227
9313
  selectedPlanId: selectedBillingPlan?.id ?? null,
9228
9314
  showOneTimePurchase: true
@@ -9232,7 +9318,8 @@ function ProductCustomizer({
9232
9318
  VolumePricing,
9233
9319
  {
9234
9320
  tiers: product.quantity_pricing,
9235
- currentQuantity: quantity
9321
+ currentQuantity: quantity,
9322
+ currency
9236
9323
  }
9237
9324
  ),
9238
9325
  product.input_fields && product.input_fields.length > 0 && /* @__PURE__ */ jsx(
@@ -9240,12 +9327,13 @@ function ProductCustomizer({
9240
9327
  {
9241
9328
  fields: product.input_fields,
9242
9329
  values: customerInputValues,
9243
- onChange: setCustomerInputValues
9330
+ onChange: setCustomerInputValues,
9331
+ currency
9244
9332
  }
9245
9333
  ),
9246
9334
  product.deposit_type && product.deposit_type !== "none" && product.deposit_amount && /* @__PURE__ */ jsx("div", { "data-cimplify-customizer-deposit": true, className: cn("text-sm text-muted-foreground", classNames?.depositInfo), children: product.deposit_type === "fixed" ? /* @__PURE__ */ jsxs("span", { children: [
9247
9335
  "Deposit required: ",
9248
- /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount })
9336
+ /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount, currency })
9249
9337
  ] }) : /* @__PURE__ */ jsxs("span", { children: [
9250
9338
  "Deposit required: ",
9251
9339
  parsePrice(product.deposit_amount),
@@ -9309,7 +9397,7 @@ function ProductCustomizer({
9309
9397
  ] })
9310
9398
  ] }),
9311
9399
  product.quantity_pricing && product.quantity_pricing.length > 0 && /* @__PURE__ */ jsxs("div", { "data-cimplify-customizer-unit-price": true, className: "text-sm text-muted-foreground text-right shrink-0", children: [
9312
- /* @__PURE__ */ jsx(Price, { amount: getUnitPriceAtQuantity(product.quantity_pricing, quantity, parsePrice(product.default_price)), className: "font-medium text-foreground" }),
9400
+ /* @__PURE__ */ jsx(Price, { amount: getUnitPriceAtQuantity(product.quantity_pricing, quantity, parsePrice(product.default_price)), currency, className: "font-medium text-foreground" }),
9313
9401
  " ea."
9314
9402
  ] }),
9315
9403
  /* @__PURE__ */ jsx(
@@ -9326,7 +9414,7 @@ function ProductCustomizer({
9326
9414
  ),
9327
9415
  children: isAdded ? "Added to Cart" : /* @__PURE__ */ jsxs(Fragment, { children: [
9328
9416
  "Add to Cart \xB7 ",
9329
- /* @__PURE__ */ jsx(Price, { amount: displayTotalPrice })
9417
+ /* @__PURE__ */ jsx(Price, { amount: displayTotalPrice, currency })
9330
9418
  ] })
9331
9419
  }
9332
9420
  )
@@ -9355,9 +9443,15 @@ function ProductImageGallery({
9355
9443
  [images]
9356
9444
  );
9357
9445
  const [selectedImage, setSelectedImage] = useState(0);
9446
+ const [fadeIn, setFadeIn] = useState(true);
9358
9447
  useEffect(() => {
9359
9448
  setSelectedImage(0);
9360
9449
  }, [normalizedImages.length, productName]);
9450
+ useEffect(() => {
9451
+ setFadeIn(false);
9452
+ const id = requestAnimationFrame(() => setFadeIn(true));
9453
+ return () => cancelAnimationFrame(id);
9454
+ }, [selectedImage]);
9361
9455
  if (normalizedImages.length === 0) {
9362
9456
  return null;
9363
9457
  }
@@ -9373,7 +9467,13 @@ function ProductImageGallery({
9373
9467
  {
9374
9468
  src: activeImage,
9375
9469
  alt: productName,
9376
- style: { width: "100%", height: "100%", objectFit: "cover" },
9470
+ style: {
9471
+ width: "100%",
9472
+ height: "100%",
9473
+ objectFit: "cover",
9474
+ opacity: fadeIn ? 1 : 0,
9475
+ transition: "opacity 300ms ease"
9476
+ },
9377
9477
  "data-cimplify-image-gallery-active": true
9378
9478
  }
9379
9479
  )
@@ -10075,7 +10175,7 @@ function SaleBadge({
10075
10175
  "%"
10076
10176
  ] }),
10077
10177
  /* @__PURE__ */ jsx("span", { "data-cimplify-sale-label": true, className: classNames?.label, children: badgeText }),
10078
- showOriginalPrice && onSale && /* @__PURE__ */ jsx("span", { "data-cimplify-sale-original-price": true, className: classNames?.originalPrice, children: /* @__PURE__ */ jsx(Price, { amount: getBasePrice(product) }) })
10178
+ showOriginalPrice && onSale && /* @__PURE__ */ jsx("span", { "data-cimplify-sale-original-price": true, className: classNames?.originalPrice, children: /* @__PURE__ */ jsx(Price, { amount: getBasePrice(product), currency: getProductCurrency(product) }) })
10079
10179
  ]
10080
10180
  }
10081
10181
  );
@@ -10370,6 +10470,7 @@ function ProductSheet({
10370
10470
  Price,
10371
10471
  {
10372
10472
  amount: fullProduct.default_price,
10473
+ currency: getProductCurrency(fullProduct),
10373
10474
  className: classNames?.price
10374
10475
  }
10375
10476
  )
@@ -10536,6 +10637,7 @@ function FoodProductCard({
10536
10637
  className
10537
10638
  }) {
10538
10639
  const image = product.image_url || product.images?.[0] || "";
10640
+ const currency = getProductCurrency(product);
10539
10641
  const tags = product.tags || [];
10540
10642
  const isSignature = product.metadata?.is_signature === true;
10541
10643
  const isNew = product.metadata?.is_new === true;
@@ -10562,8 +10664,8 @@ function FoodProductCard({
10562
10664
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-3", children: [
10563
10665
  isComposite ? /* @__PURE__ */ jsxs("span", { className: "text-sm font-bold", children: [
10564
10666
  "From ",
10565
- /* @__PURE__ */ jsx(Price, { amount: product.default_price })
10566
- ] }) : /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-sm font-bold" }),
10667
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency })
10668
+ ] }) : /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-sm font-bold" }),
10567
10669
  tags.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex gap-1", children: tags.slice(0, 2).map((tag) => /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium text-muted-foreground px-1.5 py-0.5 bg-muted rounded", children: tag }, tag)) })
10568
10670
  ] })
10569
10671
  ] })
@@ -10591,6 +10693,7 @@ function RetailProductCard({
10591
10693
  className
10592
10694
  }) {
10593
10695
  const image = product.image_url || product.images?.[0] || "";
10696
+ const currency = getProductCurrency(product);
10594
10697
  const outOfStock = product.inventory_status?.in_stock === false;
10595
10698
  const onSale = isOnSale(product);
10596
10699
  const swatches = getColorSwatches(product);
@@ -10609,8 +10712,8 @@ function RetailProductCard({
10609
10712
  product.vendor && /* @__PURE__ */ jsx("p", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-widest", children: product.vendor }),
10610
10713
  /* @__PURE__ */ jsx("h3", { className: "text-[14.5px] font-semibold text-foreground leading-snug tracking-tight mt-1 truncate", children: product.name }),
10611
10714
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-2", children: [
10612
- /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-sm font-bold" }),
10613
- onSale && /* @__PURE__ */ jsx(Price, { amount: getBasePrice(product), className: "text-xs text-muted-foreground line-through" })
10715
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-sm font-bold" }),
10716
+ onSale && /* @__PURE__ */ jsx(Price, { amount: getBasePrice(product), currency, className: "text-xs text-muted-foreground line-through" })
10614
10717
  ] }),
10615
10718
  swatches.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 mt-2.5", children: swatches.map((name) => /* @__PURE__ */ jsx(
10616
10719
  "span",
@@ -10625,8 +10728,7 @@ function RetailProductCard({
10625
10728
  ] });
10626
10729
  }
10627
10730
  function PriceRange({ product, currency, className }) {
10628
- const context = useOptionalCimplify();
10629
- const resolvedCurrency = currency ?? context?.displayCurrency ?? "USD";
10731
+ const resolvedCurrency = currency ?? getProductCurrency(product);
10630
10732
  const range = getPriceRange(product);
10631
10733
  if (!range) return null;
10632
10734
  return /* @__PURE__ */ jsx("span", { "data-cimplify-price-range": true, className, children: formatPriceRange(range.min, range.max, resolvedCurrency) });
@@ -10639,6 +10741,7 @@ function WholesaleProductCard({
10639
10741
  className
10640
10742
  }) {
10641
10743
  const image = product.image_url || product.images?.[0] || "";
10744
+ const currency = getProductCurrency(product);
10642
10745
  const hasTiers = product.quantity_pricing && product.quantity_pricing.length > 1;
10643
10746
  const status = product.inventory_status;
10644
10747
  return /* @__PURE__ */ jsxs(CardShell, { product, renderLink, className, children: [
@@ -10658,7 +10761,7 @@ function WholesaleProductCard({
10658
10761
  /* @__PURE__ */ jsxs("div", { className: "p-3.5", children: [
10659
10762
  product.sku && /* @__PURE__ */ jsx("p", { className: "text-[10px] text-muted-foreground font-mono", children: product.sku }),
10660
10763
  /* @__PURE__ */ jsx("h3", { className: "text-[14.5px] font-semibold text-foreground leading-snug tracking-tight mt-1 truncate", children: product.name }),
10661
- /* @__PURE__ */ jsx("div", { className: "mt-2", children: hasTiers ? /* @__PURE__ */ jsx(PriceRange, { product, className: "text-sm font-bold" }) : /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-sm font-bold" }) }),
10764
+ /* @__PURE__ */ jsx("div", { className: "mt-2", children: hasTiers ? /* @__PURE__ */ jsx(PriceRange, { product, className: "text-sm font-bold" }) : /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-sm font-bold" }) }),
10662
10765
  status && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mt-2", children: [
10663
10766
  /* @__PURE__ */ jsx("span", { className: cn(
10664
10767
  "w-[7px] h-[7px] rounded-full shrink-0",
@@ -10686,6 +10789,7 @@ function DigitalProductCard({
10686
10789
  className
10687
10790
  }) {
10688
10791
  const image = product.image_url || product.images?.[0] || "";
10792
+ const currency = getProductCurrency(product);
10689
10793
  const typeBadge = product.digital_type ? TYPE_BADGES[product.digital_type] : null;
10690
10794
  const isTicket = product.digital_type === "event_ticket";
10691
10795
  return /* @__PURE__ */ jsxs(CardShell, { product, renderLink, className, children: [
@@ -10699,7 +10803,7 @@ function DigitalProductCard({
10699
10803
  ] }),
10700
10804
  !isTicket && product.description && /* @__PURE__ */ jsx("p", { className: "text-[12px] text-muted-foreground mt-1 line-clamp-1", children: stripHtmlToText(product.description) }),
10701
10805
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-2.5", children: [
10702
- /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-sm font-bold" }),
10806
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-sm font-bold" }),
10703
10807
  product.file_type && /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-muted-foreground bg-muted px-1.5 py-0.5 rounded", children: [
10704
10808
  product.file_type.toUpperCase(),
10705
10809
  product.file_size_mb != null && ` \xB7 ${product.file_size_mb >= 1024 ? `${(product.file_size_mb / 1024).toFixed(1)}GB` : `${product.file_size_mb}MB`}`
@@ -10716,6 +10820,7 @@ function BundleProductCard({
10716
10820
  className
10717
10821
  }) {
10718
10822
  const image = product.image_url || product.images?.[0] || "";
10823
+ const currency = getProductCurrency(product);
10719
10824
  const components = product.components || [];
10720
10825
  const componentCount = components.length;
10721
10826
  const onSale = isOnSale(product);
@@ -10744,9 +10849,9 @@ function BundleProductCard({
10744
10849
  components.map((c) => c.product_name || c.product_id).join(", ")
10745
10850
  ] }),
10746
10851
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-2.5", children: [
10747
- /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-sm font-bold" }),
10852
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-sm font-bold" }),
10748
10853
  onSale && product.bundle_price && /* @__PURE__ */ jsxs(Fragment, { children: [
10749
- /* @__PURE__ */ jsx(Price, { amount: getBasePrice(product), className: "text-xs text-muted-foreground line-through" }),
10854
+ /* @__PURE__ */ jsx(Price, { amount: getBasePrice(product), currency, className: "text-xs text-muted-foreground line-through" }),
10750
10855
  discount != null && discount > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px] font-semibold text-emerald-600", children: [
10751
10856
  "Save ",
10752
10857
  discount,
@@ -10766,6 +10871,7 @@ function CompositeProductCard({
10766
10871
  className
10767
10872
  }) {
10768
10873
  const image = product.image_url || product.images?.[0] || "";
10874
+ const currency = getProductCurrency(product);
10769
10875
  const groups = product.groups || [];
10770
10876
  const groupCount = groups.length;
10771
10877
  groups.reduce((sum, g) => sum + g.components.length, 0);
@@ -10793,7 +10899,7 @@ function CompositeProductCard({
10793
10899
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-2.5", children: [
10794
10900
  /* @__PURE__ */ jsxs("span", { className: "text-sm font-bold", children: [
10795
10901
  "From ",
10796
- /* @__PURE__ */ jsx(Price, { amount: product.default_price })
10902
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency })
10797
10903
  ] }),
10798
10904
  tags.length > 0 && /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium text-muted-foreground px-1.5 py-0.5 bg-muted rounded", children: tags[0] })
10799
10905
  ] })
@@ -10817,12 +10923,13 @@ function StandardServiceCard({
10817
10923
  className
10818
10924
  }) {
10819
10925
  const image = product.image_url || product.images?.[0] || "";
10926
+ const currency = getProductCurrency(product);
10820
10927
  const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
10821
10928
  return /* @__PURE__ */ jsxs(CardShell, { product, renderLink, className, children: [
10822
10929
  /* @__PURE__ */ jsxs(CardImage, { src: image, alt: product.name, aspectRatio: "16/9", renderImage, children: [
10823
10930
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/50 to-transparent pointer-events-none" }),
10824
10931
  product.duration_minutes != null && /* @__PURE__ */ jsx("span", { className: "absolute bottom-3 left-3 inline-flex items-center gap-1 text-[12px] font-semibold px-2.5 py-1 rounded-lg bg-background/92 backdrop-blur-xl text-foreground shadow-sm", children: formatDuration3(product.duration_minutes, product.duration_unit) }),
10825
- /* @__PURE__ */ jsx("span", { className: "absolute bottom-3 right-3 text-white font-bold text-lg drop-shadow-sm", children: /* @__PURE__ */ jsx(Price, { amount: product.default_price }) })
10932
+ /* @__PURE__ */ jsx("span", { className: "absolute bottom-3 right-3 text-white font-bold text-lg drop-shadow-sm", children: /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency }) })
10826
10933
  ] }),
10827
10934
  /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
10828
10935
  /* @__PURE__ */ jsx("h3", { className: "text-[14.5px] font-bold text-foreground leading-snug tracking-tight", children: product.name }),
@@ -10834,7 +10941,7 @@ function StandardServiceCard({
10834
10941
  hasDeposit && /* @__PURE__ */ jsxs(Fragment, { children: [
10835
10942
  /* @__PURE__ */ jsx("span", { className: "text-border", children: "\xB7" }),
10836
10943
  /* @__PURE__ */ jsxs("span", { children: [
10837
- /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount }),
10944
+ /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount, currency }),
10838
10945
  " deposit"
10839
10946
  ] })
10840
10947
  ] })
@@ -10871,6 +10978,7 @@ function CompactServiceCard({
10871
10978
  className
10872
10979
  }) {
10873
10980
  const image = product.image_url || product.images?.[0] || "";
10981
+ const currency = getProductCurrency(product);
10874
10982
  const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
10875
10983
  const hasBillingPlans = product.billing_plans && product.billing_plans.length > 0;
10876
10984
  const href = `/products/${product.slug}`;
@@ -10886,14 +10994,14 @@ function CompactServiceCard({
10886
10994
  "Available"
10887
10995
  ] }),
10888
10996
  hasDeposit && /* @__PURE__ */ jsxs("span", { className: "text-[10.5px] font-medium text-amber-600", children: [
10889
- /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount }),
10997
+ /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount, currency }),
10890
10998
  " deposit"
10891
10999
  ] }),
10892
11000
  hasBillingPlans && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center gap-0.5 text-[10.5px] font-semibold text-primary px-1.5 py-0.5 bg-primary/10 rounded", children: "Subscription" })
10893
11001
  ] })
10894
11002
  ] }),
10895
11003
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [
10896
- /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-sm font-bold" }),
11004
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-sm font-bold" }),
10897
11005
  /* @__PURE__ */ jsx("svg", { className: "w-4 h-4 text-muted-foreground group-hover:text-primary transition-colors", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
10898
11006
  ] })
10899
11007
  ] });
@@ -10919,6 +11027,7 @@ function ScheduleServiceCard({
10919
11027
  className
10920
11028
  }) {
10921
11029
  const image = product.image_url || product.images?.[0] || "";
11030
+ const currency = getProductCurrency(product);
10922
11031
  const href = `/products/${product.slug}`;
10923
11032
  const durationLabel = product.duration_minutes != null ? formatDuration2(product.duration_minutes, product.duration_unit) : null;
10924
11033
  const displaySlots = (slots || []).slice(0, 3);
@@ -10938,7 +11047,7 @@ function ScheduleServiceCard({
10938
11047
  durationLabel,
10939
11048
  " \xB7 "
10940
11049
  ] }),
10941
- /* @__PURE__ */ jsx(Price, { amount: product.default_price })
11050
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency })
10942
11051
  ] })
10943
11052
  ] }),
10944
11053
  image && /* @__PURE__ */ jsx("div", { className: "w-14 h-14 rounded-xl overflow-hidden bg-muted shrink-0", children: renderImage ? renderImage({ src: image, alt: product.name, className: "w-full h-full object-cover" }) : /* @__PURE__ */ jsx("img", { src: image, alt: product.name, className: "w-full h-full object-cover" }) })
@@ -10990,6 +11099,7 @@ function RentalServiceCard({
10990
11099
  className
10991
11100
  }) {
10992
11101
  const image = product.image_url || product.images?.[0] || "";
11102
+ const currency = getProductCurrency(product);
10993
11103
  const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
10994
11104
  const unit = product.duration_unit ? UNIT_LABELS2[product.duration_unit] || product.duration_unit : "day";
10995
11105
  const status = product.inventory_status;
@@ -11001,7 +11111,7 @@ function RentalServiceCard({
11001
11111
  unit
11002
11112
  ] }),
11003
11113
  /* @__PURE__ */ jsxs("span", { className: "absolute bottom-3 right-3 text-white font-bold text-lg drop-shadow-sm", children: [
11004
- /* @__PURE__ */ jsx(Price, { amount: product.default_price }),
11114
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency }),
11005
11115
  "/",
11006
11116
  unit
11007
11117
  ] }),
@@ -11023,7 +11133,7 @@ function RentalServiceCard({
11023
11133
  product.min_order_quantity > 1 ? "s" : ""
11024
11134
  ] }),
11025
11135
  hasDeposit && /* @__PURE__ */ jsxs("span", { className: "text-[10.5px] font-medium text-amber-600", children: [
11026
- /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount }),
11136
+ /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount, currency }),
11027
11137
  " deposit"
11028
11138
  ] })
11029
11139
  ] }),
@@ -11059,6 +11169,7 @@ function AccommodationCard({
11059
11169
  className
11060
11170
  }) {
11061
11171
  const image = product.image_url || product.images?.[0] || "";
11172
+ const currency = getProductCurrency(product);
11062
11173
  const hasTiers = product.quantity_pricing && product.quantity_pricing.length > 1;
11063
11174
  const cancellationHours = product.cancellation_window_minutes ? Math.floor(product.cancellation_window_minutes / 60) : null;
11064
11175
  const tags = product.tags || [];
@@ -11067,7 +11178,7 @@ function AccommodationCard({
11067
11178
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/50 to-transparent pointer-events-none" }),
11068
11179
  /* @__PURE__ */ jsx("span", { className: "absolute bottom-3 left-3 inline-flex items-center text-[12px] font-semibold px-2.5 py-1 rounded-lg bg-background/92 backdrop-blur-xl text-foreground shadow-sm", children: "Per night" }),
11069
11180
  /* @__PURE__ */ jsxs("span", { className: "absolute bottom-3 right-3 text-white font-bold text-lg drop-shadow-sm", children: [
11070
- /* @__PURE__ */ jsx(Price, { amount: product.default_price }),
11181
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency }),
11071
11182
  "/night"
11072
11183
  ] })
11073
11184
  ] }),
@@ -11124,6 +11235,7 @@ function LeaseServiceCard({
11124
11235
  className
11125
11236
  }) {
11126
11237
  const image = product.image_url || product.images?.[0] || "";
11238
+ const currency = getProductCurrency(product);
11127
11239
  const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
11128
11240
  const hasTiers = product.quantity_pricing && product.quantity_pricing.length > 1;
11129
11241
  const unit = product.duration_unit ? UNIT_LABELS3[product.duration_unit] || product.duration_unit : "mo";
@@ -11137,7 +11249,7 @@ function LeaseServiceCard({
11137
11249
  unit
11138
11250
  ] }),
11139
11251
  /* @__PURE__ */ jsxs("span", { className: "absolute bottom-3 right-3 text-white font-bold text-lg drop-shadow-sm", children: [
11140
- /* @__PURE__ */ jsx(Price, { amount: product.default_price }),
11252
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency }),
11141
11253
  "/",
11142
11254
  unit
11143
11255
  ] })
@@ -11156,7 +11268,7 @@ function LeaseServiceCard({
11156
11268
  product.min_order_quantity > 1 ? "s" : ""
11157
11269
  ] }),
11158
11270
  hasDeposit && /* @__PURE__ */ jsxs("span", { className: "text-[10.5px] font-medium text-amber-600", children: [
11159
- /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount }),
11271
+ /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount, currency }),
11160
11272
  " deposit"
11161
11273
  ] }),
11162
11274
  cancellationHours != null && /* @__PURE__ */ jsx("span", { className: "text-[10.5px] font-medium text-muted-foreground", children: cancellationHours >= 720 ? `${Math.floor(cancellationHours / 720)} month notice` : `${cancellationHours}h notice` })
@@ -11197,6 +11309,7 @@ function SubscriptionCard({
11197
11309
  className
11198
11310
  }) {
11199
11311
  const image = product.image_url || product.images?.[0] || "";
11312
+ const currency = getProductCurrency(product);
11200
11313
  const plans = product.billing_plans || [];
11201
11314
  const primaryPlan = plans[0];
11202
11315
  const frequency = primaryPlan?.frequency ? FREQUENCY_LABELS2[primaryPlan.frequency] || `/${primaryPlan.frequency}` : "/mo";
@@ -11206,7 +11319,7 @@ function SubscriptionCard({
11206
11319
  /* @__PURE__ */ jsxs(CardImage, { src: image, alt: product.name, aspectRatio: "16/9", renderImage, children: [
11207
11320
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/50 to-transparent pointer-events-none" }),
11208
11321
  /* @__PURE__ */ jsxs("span", { className: "absolute bottom-3 right-3 text-white font-bold text-lg drop-shadow-sm", children: [
11209
- /* @__PURE__ */ jsx(Price, { amount: product.default_price }),
11322
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency }),
11210
11323
  frequency
11211
11324
  ] }),
11212
11325
  hasTrial && /* @__PURE__ */ jsxs("span", { className: "absolute top-3 left-3 text-[11px] font-semibold tracking-wide bg-emerald-50/90 text-emerald-700 border border-emerald-200/50 backdrop-blur px-2 py-0.5 rounded-md", children: [
@@ -11235,7 +11348,7 @@ function SubscriptionCard({
11235
11348
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-[11px] text-muted-foreground", children: [
11236
11349
  hasTrial && /* @__PURE__ */ jsx("span", { className: "text-emerald-600 font-medium", children: "Free trial" }),
11237
11350
  primaryPlan?.setup_fee != null && primaryPlan.setup_fee > 0 && /* @__PURE__ */ jsxs("span", { children: [
11238
- /* @__PURE__ */ jsx(Price, { amount: primaryPlan.setup_fee }),
11351
+ /* @__PURE__ */ jsx(Price, { amount: primaryPlan.setup_fee, currency }),
11239
11352
  " setup"
11240
11353
  ] })
11241
11354
  ] }),
@@ -11398,7 +11511,7 @@ function ProductCard({
11398
11511
  /* @__PURE__ */ jsxs("div", { "data-cimplify-product-card-body": true, className: cn("p-4 flex flex-col gap-1", classNames?.body), children: [
11399
11512
  /* @__PURE__ */ jsx("span", { "data-cimplify-product-card-name": true, className: cn("font-semibold text-foreground leading-tight", classNames?.name), children: product.name }),
11400
11513
  descriptionPreview && /* @__PURE__ */ jsx("span", { "data-cimplify-product-card-description": true, className: cn("text-sm text-muted-foreground line-clamp-2", classNames?.description), children: descriptionPreview }),
11401
- /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: cn("text-sm font-medium text-foreground mt-1", classNames?.price) })
11514
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency: getProductCurrency(product), className: cn("text-sm font-medium text-foreground mt-1", classNames?.price) })
11402
11515
  ] })
11403
11516
  ] });
11404
11517
  })();
@@ -12741,6 +12854,7 @@ function BookingPage({
12741
12854
  }) {
12742
12855
  const { addItem } = useCart();
12743
12856
  const { client } = useCimplifyClient();
12857
+ const currency = service.currency;
12744
12858
  const isReschedule = existingBooking !== void 0;
12745
12859
  const [step, setStep] = useState(STEP.SELECT_SLOT);
12746
12860
  const [selectedSlot, setSelectedSlot] = useState(null);
@@ -12882,10 +12996,10 @@ function BookingPage({
12882
12996
  /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-service-info": true, className: classNames?.serviceInfo, children: [
12883
12997
  /* @__PURE__ */ jsx("span", { "data-cimplify-booking-service-name": true, children: service.name }),
12884
12998
  /* @__PURE__ */ jsx("span", { "data-cimplify-booking-service-duration": true, children: formatDuration2(service.duration_minutes, service.duration_unit) }),
12885
- service.price && /* @__PURE__ */ jsx("span", { "data-cimplify-booking-service-price": true, children: /* @__PURE__ */ jsx(Price, { amount: service.price }) }),
12999
+ service.price && /* @__PURE__ */ jsx("span", { "data-cimplify-booking-service-price": true, children: /* @__PURE__ */ jsx(Price, { amount: service.price, currency }) }),
12886
13000
  hasDeposit && /* @__PURE__ */ jsxs("span", { "data-cimplify-booking-deposit-info": true, className: classNames?.depositInfo, children: [
12887
13001
  "Deposit: ",
12888
- depositType === "percentage" ? `${parsePrice(depositAmount)}%` : /* @__PURE__ */ jsx(Price, { amount: depositAmount })
13002
+ depositType === "percentage" ? `${parsePrice(depositAmount)}%` : /* @__PURE__ */ jsx(Price, { amount: depositAmount, currency })
12889
13003
  ] }),
12890
13004
  cancellationMinutes !== void 0 && cancellationMinutes > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-booking-cancellation-policy": true, className: classNames?.cancellationPolicy, children: [
12891
13005
  "Free cancellation up to ",
@@ -12894,7 +13008,7 @@ function BookingPage({
12894
13008
  ] }),
12895
13009
  noShowFee !== void 0 && parsePrice(noShowFee) !== 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-booking-no-show-fee": true, className: classNames?.cancellationPolicy, children: [
12896
13010
  "No-show fee: ",
12897
- /* @__PURE__ */ jsx(Price, { amount: noShowFee })
13011
+ /* @__PURE__ */ jsx(Price, { amount: noShowFee, currency })
12898
13012
  ] })
12899
13013
  ] }),
12900
13014
  error && /* @__PURE__ */ jsx("div", { "data-cimplify-booking-error": true, className: classNames?.error, children: error }),
@@ -12907,7 +13021,8 @@ function BookingPage({
12907
13021
  participantCount,
12908
13022
  selectedSlot,
12909
13023
  onSlotSelect: handleSlotSelect,
12910
- showPrice
13024
+ showPrice,
13025
+ currency
12911
13026
  }
12912
13027
  )
12913
13028
  ] }),
@@ -12965,11 +13080,11 @@ function BookingPage({
12965
13080
  ] }),
12966
13081
  (selectedSlot.price || service.price) && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-summary-row": true, className: classNames?.summaryRow, children: [
12967
13082
  /* @__PURE__ */ jsx("span", { children: "Price" }),
12968
- /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Price, { amount: selectedSlot.price || service.price }) })
13083
+ /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Price, { amount: selectedSlot.price || service.price, currency }) })
12969
13084
  ] }),
12970
13085
  hasDeposit && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-summary-row": true, className: cn(classNames?.summaryRow, classNames?.depositInfo), children: [
12971
13086
  /* @__PURE__ */ jsx("span", { children: "Deposit" }),
12972
- /* @__PURE__ */ jsx("span", { children: depositType === "percentage" ? `${parsePrice(depositAmount)}%` : /* @__PURE__ */ jsx(Price, { amount: depositAmount }) })
13087
+ /* @__PURE__ */ jsx("span", { children: depositType === "percentage" ? `${parsePrice(depositAmount)}%` : /* @__PURE__ */ jsx(Price, { amount: depositAmount, currency }) })
12973
13088
  ] })
12974
13089
  ] }),
12975
13090
  /* @__PURE__ */ jsx(
@@ -13633,6 +13748,7 @@ function DefaultProductLayout({
13633
13748
  }) {
13634
13749
  const [selectedVariantId, setSelectedVariantId] = React14.useState();
13635
13750
  const images = resolveGallery(product, selectedVariantId);
13751
+ const currency = getProductCurrency(product);
13636
13752
  const hasRange = product.quantity_pricing && product.quantity_pricing.length > 1 || product.variants && product.variants.length > 1;
13637
13753
  const onSale = isOnSale(product);
13638
13754
  const hasPhysicalDetails = product.sku || product.vendor || product.material;
@@ -13654,15 +13770,15 @@ function DefaultProductLayout({
13654
13770
  /* @__PURE__ */ jsx(TagPills, { tags: product.tags || [] })
13655
13771
  ] }),
13656
13772
  /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-extrabold tracking-tight", children: product.name }),
13657
- /* @__PURE__ */ jsx("div", { className: "flex items-baseline gap-3", children: hasRange ? /* @__PURE__ */ jsx(PriceRange, { product, className: "text-2xl font-extrabold" }) : onSale ? /* @__PURE__ */ jsxs(Fragment, { children: [
13658
- /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-extrabold" }),
13659
- /* @__PURE__ */ jsx(Price, { amount: getBasePrice(product), className: "text-lg text-muted-foreground line-through" }),
13773
+ /* @__PURE__ */ jsx("div", { className: "flex items-baseline gap-3", children: hasRange ? /* @__PURE__ */ jsx(PriceRange, { product, currency, className: "text-2xl font-extrabold" }) : onSale ? /* @__PURE__ */ jsxs(Fragment, { children: [
13774
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-2xl font-extrabold" }),
13775
+ /* @__PURE__ */ jsx(Price, { amount: getBasePrice(product), currency, className: "text-lg text-muted-foreground line-through" }),
13660
13776
  /* @__PURE__ */ jsxs("span", { className: "text-sm font-bold text-destructive bg-destructive/10 px-2 py-0.5", children: [
13661
13777
  "Save ",
13662
13778
  getDiscountPercentage(product),
13663
13779
  "%"
13664
13780
  ] })
13665
- ] }) : /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-semibold" }) }),
13781
+ ] }) : /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-2xl font-semibold" }) }),
13666
13782
  /* @__PURE__ */ jsx(InventoryBadge, { product }),
13667
13783
  /* @__PURE__ */ jsx(RichText, { html: product.description, "data-cimplify-product-layout-description": true }),
13668
13784
  hasPhysicalDetails && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-details": true, className: "space-y-1 text-sm text-muted-foreground", children: [
@@ -13721,6 +13837,7 @@ function FoodProductLayout({
13721
13837
  className
13722
13838
  }) {
13723
13839
  const images = product.images || (product.image_url ? [product.image_url] : []);
13840
+ const currency = getProductCurrency(product);
13724
13841
  const tags = product.tags || [];
13725
13842
  const ingredients = getMetadataStringList(product.metadata, "ingredients");
13726
13843
  const pairings = getMetadataStringList(product.metadata, "pairings");
@@ -13746,7 +13863,7 @@ function FoodProductLayout({
13746
13863
  ] }),
13747
13864
  /* @__PURE__ */ jsxs("div", { children: [
13748
13865
  /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-bold tracking-tight", children: product.name }),
13749
- /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-semibold mt-2 block" })
13866
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-2xl font-semibold mt-2 block" })
13750
13867
  ] }),
13751
13868
  (product.calories != null || product.preparation_time_minutes != null) && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-stats": true, className: "flex flex-wrap gap-4 py-3 border-y border-border", children: [
13752
13869
  product.preparation_time_minutes != null && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 text-sm text-muted-foreground", children: [
@@ -13795,6 +13912,7 @@ function WholesaleProductLayout({
13795
13912
  className
13796
13913
  }) {
13797
13914
  const images = product.images || (product.image_url ? [product.image_url] : []);
13915
+ const currency = getProductCurrency(product);
13798
13916
  const hasTiers = product.quantity_pricing && product.quantity_pricing.length > 1;
13799
13917
  return /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout": "wholesale", className: cn("space-y-8", className), children: [
13800
13918
  renderBreadcrumb?.(product),
@@ -13817,7 +13935,7 @@ function WholesaleProductLayout({
13817
13935
  ] }),
13818
13936
  /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-extrabold tracking-tight", children: product.name })
13819
13937
  ] }),
13820
- /* @__PURE__ */ jsx("div", { children: hasTiers ? /* @__PURE__ */ jsx(PriceRange, { product, className: "text-2xl font-extrabold" }) : /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-semibold" }) }),
13938
+ /* @__PURE__ */ jsx("div", { children: hasTiers ? /* @__PURE__ */ jsx(PriceRange, { product, currency, className: "text-2xl font-extrabold" }) : /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-2xl font-semibold" }) }),
13821
13939
  /* @__PURE__ */ jsx(InventoryBadge, { product }),
13822
13940
  product.min_order_quantity != null && product.min_order_quantity > 1 && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-moq": true, className: "flex items-center gap-3 p-3 bg-amber-50 border border-amber-200 text-sm text-amber-800", children: [
13823
13941
  "Minimum order quantity: ",
@@ -13878,6 +13996,7 @@ function ServiceProductLayout({
13878
13996
  className
13879
13997
  }) {
13880
13998
  const images = product.images || (product.image_url ? [product.image_url] : []);
13999
+ const currency = getProductCurrency(product);
13881
14000
  const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
13882
14001
  const depositAmount = hasDeposit ? parsePrice(product.deposit_amount) : 0;
13883
14002
  const cancellationHours = product.cancellation_window_minutes ? Math.floor(product.cancellation_window_minutes / 60) : null;
@@ -13897,12 +14016,12 @@ function ServiceProductLayout({
13897
14016
  /* @__PURE__ */ jsx(TagPills, { tags: product.tags || [] }),
13898
14017
  /* @__PURE__ */ jsxs("div", { children: [
13899
14018
  /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-extrabold tracking-tight", children: product.name }),
13900
- /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-bold text-primary mt-2 block" })
14019
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-2xl font-bold text-primary mt-2 block" })
13901
14020
  ] }),
13902
14021
  /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-service-info": true, className: "flex flex-wrap gap-2", children: [
13903
14022
  product.duration_minutes != null && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center gap-1.5 px-3 py-1.5 bg-muted text-sm text-muted-foreground rounded-full", children: formatDuration2(product.duration_minutes, product.duration_unit) }),
13904
14023
  hasDeposit && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 px-3 py-1.5 bg-muted text-sm text-muted-foreground rounded-full", children: [
13905
- /* @__PURE__ */ jsx(Price, { amount: depositAmount }),
14024
+ /* @__PURE__ */ jsx(Price, { amount: depositAmount, currency }),
13906
14025
  " deposit"
13907
14026
  ] }),
13908
14027
  product.general_service_capacity != null && product.general_service_capacity > 1 && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 px-3 py-1.5 bg-muted text-sm text-muted-foreground rounded-full", children: [
@@ -13941,10 +14060,10 @@ function ServiceProductLayout({
13941
14060
  ] }),
13942
14061
  product.no_show_fee && /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
13943
14062
  "No-show fee: ",
13944
- /* @__PURE__ */ jsx(Price, { amount: product.no_show_fee, className: "font-medium text-foreground" })
14063
+ /* @__PURE__ */ jsx(Price, { amount: product.no_show_fee, currency, className: "font-medium text-foreground" })
13945
14064
  ] }),
13946
14065
  hasDeposit && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: product.deposit_type === "fixed" ? /* @__PURE__ */ jsxs(Fragment, { children: [
13947
- /* @__PURE__ */ jsx(Price, { amount: depositAmount, className: "font-medium text-foreground" }),
14066
+ /* @__PURE__ */ jsx(Price, { amount: depositAmount, currency, className: "font-medium text-foreground" }),
13948
14067
  " deposit charged at booking"
13949
14068
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
13950
14069
  parsePrice(product.deposit_amount),
@@ -13979,6 +14098,7 @@ function DigitalProductLayout({
13979
14098
  className
13980
14099
  }) {
13981
14100
  const images = product.images || (product.image_url ? [product.image_url] : []);
14101
+ const currency = getProductCurrency(product);
13982
14102
  const typeLabel = product.digital_type ? DIGITAL_TYPE_LABELS[product.digital_type] || product.digital_type : "Digital product";
13983
14103
  const isTicket = product.digital_type === "event_ticket";
13984
14104
  const isAccessPass = product.digital_type === "access_pass";
@@ -14002,7 +14122,7 @@ function DigitalProductLayout({
14002
14122
  ] }),
14003
14123
  /* @__PURE__ */ jsxs("div", { children: [
14004
14124
  /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-extrabold tracking-tight", children: product.name }),
14005
- /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-bold mt-2 block" })
14125
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-2xl font-bold mt-2 block" })
14006
14126
  ] }),
14007
14127
  /* @__PURE__ */ jsx(RichText, { html: product.description, "data-cimplify-product-layout-description": true }),
14008
14128
  isDownload && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-delivery": true, className: "flex items-center gap-3 px-4 py-3 bg-muted rounded-lg", children: [
@@ -14105,6 +14225,7 @@ function BundleProductLayout({
14105
14225
  className
14106
14226
  }) {
14107
14227
  const images = product.images || (product.image_url ? [product.image_url] : []);
14228
+ const currency = getProductCurrency(product);
14108
14229
  const components = product.components || [];
14109
14230
  const onSale = isOnSale(product);
14110
14231
  const discount = getDiscountPercentage(product);
@@ -14139,8 +14260,8 @@ function BundleProductLayout({
14139
14260
  /* @__PURE__ */ jsxs("div", { children: [
14140
14261
  /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-bold tracking-tight", children: product.name }),
14141
14262
  /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-3 mt-2", children: [
14142
- /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-bold" }),
14143
- onSale && baseTotal > 0 && /* @__PURE__ */ jsx(Price, { amount: baseTotal, className: "text-lg text-muted-foreground line-through" })
14263
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "text-2xl font-bold" }),
14264
+ onSale && baseTotal > 0 && /* @__PURE__ */ jsx(Price, { amount: baseTotal, currency, className: "text-lg text-muted-foreground line-through" })
14144
14265
  ] })
14145
14266
  ] }),
14146
14267
  /* @__PURE__ */ jsx(RichText, { html: product.description, "data-cimplify-product-layout-description": true }),
@@ -14156,13 +14277,13 @@ function BundleProductLayout({
14156
14277
  ] }),
14157
14278
  component.allow_variant_choice && /* @__PURE__ */ jsx("p", { className: "text-xs text-violet-600 font-medium", children: "Choose variant" })
14158
14279
  ] }),
14159
- /* @__PURE__ */ jsx(Price, { amount: component.effective_price ?? 0, className: "text-sm text-muted-foreground shrink-0" })
14280
+ /* @__PURE__ */ jsx(Price, { amount: component.effective_price ?? 0, currency, className: "text-sm text-muted-foreground shrink-0" })
14160
14281
  ] }, component.id)) })
14161
14282
  ] }),
14162
14283
  savings > 0 && /* @__PURE__ */ jsxs("div", { "data-cimplify-bundle-savings": true, className: "flex items-center gap-2 p-3 bg-emerald-50 border border-emerald-200/60 text-sm text-emerald-800", children: [
14163
14284
  /* @__PURE__ */ jsx("svg", { className: "w-4 h-4 shrink-0", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }),
14164
14285
  "You save ",
14165
- /* @__PURE__ */ jsx(Price, { amount: savings, className: "font-semibold" }),
14286
+ /* @__PURE__ */ jsx(Price, { amount: savings, currency, className: "font-semibold" }),
14166
14287
  " with this bundle"
14167
14288
  ] }),
14168
14289
  /* @__PURE__ */ jsx(CustomAttributesTable, { attributes: product.custom_attributes || [] }),
@@ -14188,6 +14309,7 @@ function CompositeProductLayout({
14188
14309
  className
14189
14310
  }) {
14190
14311
  const images = product.images || (product.image_url ? [product.image_url] : []);
14312
+ const currency = getProductCurrency(product);
14191
14313
  const groups = product.groups || [];
14192
14314
  return /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout": "composite", className: cn("space-y-8", className), children: [
14193
14315
  renderBreadcrumb?.(product),
@@ -14215,7 +14337,7 @@ function CompositeProductLayout({
14215
14337
  /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-bold tracking-tight", children: product.name }),
14216
14338
  /* @__PURE__ */ jsxs("p", { className: "text-lg text-muted-foreground mt-2", children: [
14217
14339
  "From ",
14218
- /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "font-semibold text-foreground" })
14340
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, currency, className: "font-semibold text-foreground" })
14219
14341
  ] })
14220
14342
  ] }),
14221
14343
  /* @__PURE__ */ jsx(RichText, { html: product.description, "data-cimplify-product-layout-description": true }),