@nextblock-cms/ecom 0.19.0 → 0.19.3

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 (161) hide show
  1. package/index.cjs.js +1 -1
  2. package/index.es.js +26 -25
  3. package/lib/CurrencyProvider.cjs.js +1 -1
  4. package/lib/CurrencyProvider.es.js +41 -45
  5. package/lib/PaymentReadinessProvider.cjs.js +1 -1
  6. package/lib/PaymentReadinessProvider.es.js +15 -19
  7. package/lib/cart-store.cjs.js +1 -1
  8. package/lib/cart-store.d.ts +4 -0
  9. package/lib/cart-store.es.js +77 -69
  10. package/lib/components/AccountNavigationMenu.cjs.js +1 -1
  11. package/lib/components/AccountNavigationMenu.es.js +44 -62
  12. package/lib/components/AddToCartButton.cjs.js +1 -1
  13. package/lib/components/AddToCartButton.es.js +50 -78
  14. package/lib/components/Cart.cjs.js +1 -1
  15. package/lib/components/Cart.d.ts +1 -1
  16. package/lib/components/Cart.es.js +158 -377
  17. package/lib/components/CartDrawer.cjs.js +1 -1
  18. package/lib/components/CartDrawer.es.js +143 -297
  19. package/lib/components/CartIcon.cjs.js +1 -1
  20. package/lib/components/CartIcon.es.js +21 -47
  21. package/lib/components/Checkout.cjs.js +1 -1
  22. package/lib/components/Checkout.d.ts +1 -1
  23. package/lib/components/Checkout.es.js +839 -1627
  24. package/lib/components/CouponForm.cjs.js +1 -1
  25. package/lib/components/CouponForm.es.js +104 -155
  26. package/lib/components/CurrencySwitcher.cjs.js +1 -1
  27. package/lib/components/CurrencySwitcher.es.js +14 -33
  28. package/lib/components/CustomerProfileForm.cjs.js +1 -1
  29. package/lib/components/CustomerProfileForm.d.ts +1 -1
  30. package/lib/components/CustomerProfileForm.es.js +264 -672
  31. package/lib/components/FeaturedProduct.cjs.js +1 -1
  32. package/lib/components/FeaturedProduct.es.js +54 -126
  33. package/lib/components/FreemiusLicensePanel.cjs.js +1 -1
  34. package/lib/components/FreemiusLicensePanel.es.js +45 -125
  35. package/lib/components/InvoiceDocument.cjs.js +1 -1
  36. package/lib/components/InvoiceDocument.es.js +148 -487
  37. package/lib/components/InvoiceViewerShell.cjs.js +2 -2
  38. package/lib/components/InvoiceViewerShell.d.ts +4 -1
  39. package/lib/components/InvoiceViewerShell.es.js +59 -142
  40. package/lib/components/ProductCard.cjs.js +1 -1
  41. package/lib/components/ProductCard.d.ts +3 -1
  42. package/lib/components/ProductCard.es.js +128 -242
  43. package/lib/components/ProductDetailsLayout.cjs.js +1 -1
  44. package/lib/components/ProductDetailsLayout.es.js +315 -657
  45. package/lib/components/ProductGallery.cjs.js +1 -1
  46. package/lib/components/ProductGallery.d.ts +2 -0
  47. package/lib/components/ProductGallery.es.js +37 -66
  48. package/lib/components/ProductGrid.cjs.js +1 -1
  49. package/lib/components/ProductGrid.es.js +23 -32
  50. package/lib/components/ShippingEstimator.cjs.js +1 -1
  51. package/lib/components/ShippingEstimator.es.js +124 -231
  52. package/lib/components/ShortDescription.cjs.js +1 -0
  53. package/lib/components/ShortDescription.d.ts +19 -0
  54. package/lib/components/ShortDescription.es.js +18 -0
  55. package/lib/components/SimpleTiptapRenderer.cjs.js +1 -1
  56. package/lib/components/SimpleTiptapRenderer.es.js +111 -294
  57. package/lib/components/SubscriptionSelector.cjs.js +1 -1
  58. package/lib/components/SubscriptionSelector.es.js +120 -181
  59. package/lib/components/media/MediaPickerDialog.d.ts +1 -1
  60. package/lib/components/media/MediaUploadForm.d.ts +1 -1
  61. package/lib/invoice.cjs.js +1 -1
  62. package/lib/invoice.d.ts +1 -1
  63. package/lib/invoice.es.js +6 -5
  64. package/lib/order-inventory.d.ts +1 -1
  65. package/lib/pages/cms/coupons/CouponEditorForm.cjs.js +1 -1
  66. package/lib/pages/cms/coupons/CouponEditorForm.es.js +115 -375
  67. package/lib/pages/cms/coupons/CouponsPage.cjs.js +2 -2
  68. package/lib/pages/cms/coupons/CouponsPage.es.js +116 -368
  69. package/lib/pages/cms/coupons/CreateCouponDialog.cjs.js +1 -1
  70. package/lib/pages/cms/coupons/CreateCouponDialog.es.js +26 -62
  71. package/lib/pages/cms/coupons/EditCouponPage.cjs.js +1 -1
  72. package/lib/pages/cms/coupons/EditCouponPage.es.js +35 -71
  73. package/lib/pages/cms/coupons/ProductScopePicker.cjs.js +1 -1
  74. package/lib/pages/cms/coupons/ProductScopePicker.es.js +72 -167
  75. package/lib/pages/cms/orders/ExportReportsDialog.cjs.js +1 -1
  76. package/lib/pages/cms/orders/ExportReportsDialog.es.js +87 -247
  77. package/lib/pages/cms/orders/OrderDetailPage.cjs.js +1 -1
  78. package/lib/pages/cms/orders/OrderDetailPage.es.js +95 -283
  79. package/lib/pages/cms/orders/OrderPrintButton.cjs.js +1 -1
  80. package/lib/pages/cms/orders/OrderPrintButton.es.js +9 -21
  81. package/lib/pages/cms/orders/OrderStatusForm.cjs.js +1 -1
  82. package/lib/pages/cms/orders/OrderStatusForm.es.js +46 -106
  83. package/lib/pages/cms/orders/OrdersPage.cjs.js +1 -1
  84. package/lib/pages/cms/orders/OrdersPage.es.js +78 -257
  85. package/lib/pages/cms/payments/PaymentsClient.cjs.js +1 -1
  86. package/lib/pages/cms/payments/PaymentsClient.es.js +192 -580
  87. package/lib/pages/cms/payments/PaymentsPage.cjs.js +1 -1
  88. package/lib/pages/cms/payments/PaymentsPage.es.js +14 -22
  89. package/lib/pages/cms/products/ProductsPage.cjs.js +1 -1
  90. package/lib/pages/cms/products/ProductsPage.es.js +47 -87
  91. package/lib/pages/cms/products/_id_/edit/EditProductPage.cjs.js +1 -1
  92. package/lib/pages/cms/products/_id_/edit/EditProductPage.es.js +97 -177
  93. package/lib/pages/cms/products/actions.d.ts +20 -20
  94. package/lib/pages/cms/products/attributes/AttributeManagementPage.cjs.js +1 -1
  95. package/lib/pages/cms/products/attributes/AttributeManagementPage.es.js +40 -84
  96. package/lib/pages/cms/products/attributes/components/AttributeManager.cjs.js +1 -1
  97. package/lib/pages/cms/products/attributes/components/AttributeManager.d.ts +1 -1
  98. package/lib/pages/cms/products/attributes/components/AttributeManager.es.js +192 -455
  99. package/lib/pages/cms/products/categories/CategoryManagementPage.cjs.js +1 -1
  100. package/lib/pages/cms/products/categories/CategoryManagementPage.es.js +28 -72
  101. package/lib/pages/cms/products/categories/components/CategoryManager.cjs.js +1 -1
  102. package/lib/pages/cms/products/categories/components/CategoryManager.es.js +183 -490
  103. package/lib/pages/cms/products/components/CopyProductFromLanguage.cjs.js +1 -1
  104. package/lib/pages/cms/products/components/CopyProductFromLanguage.es.js +69 -177
  105. package/lib/pages/cms/products/components/CurrencyPriceFields.cjs.js +1 -1
  106. package/lib/pages/cms/products/components/CurrencyPriceFields.es.js +102 -213
  107. package/lib/pages/cms/products/components/DeleteProductButton.cjs.js +1 -1
  108. package/lib/pages/cms/products/components/DeleteProductButton.es.js +25 -45
  109. package/lib/pages/cms/products/components/FreemiusPricingDashboard.cjs.js +1 -1
  110. package/lib/pages/cms/products/components/FreemiusPricingDashboard.es.js +58 -202
  111. package/lib/pages/cms/products/components/ProductCategorySelector.cjs.js +1 -1
  112. package/lib/pages/cms/products/components/ProductCategorySelector.es.js +89 -235
  113. package/lib/pages/cms/products/components/ProductForm.cjs.js +1 -1
  114. package/lib/pages/cms/products/components/ProductForm.es.js +526 -1110
  115. package/lib/pages/cms/products/components/ProductMediaManager.cjs.js +1 -1
  116. package/lib/pages/cms/products/components/ProductMediaManager.es.js +63 -154
  117. package/lib/pages/cms/products/components/ProductsBulkTable.cjs.js +1 -1
  118. package/lib/pages/cms/products/components/ProductsBulkTable.es.js +213 -544
  119. package/lib/pages/cms/products/components/SaleScheduleFields.cjs.js +1 -1
  120. package/lib/pages/cms/products/components/SaleScheduleFields.es.js +91 -207
  121. package/lib/pages/cms/products/components/SyncFreemiusButton.cjs.js +1 -1
  122. package/lib/pages/cms/products/components/SyncFreemiusButton.es.js +16 -28
  123. package/lib/pages/cms/products/components/SyncFreemiusPricingButton.cjs.js +2 -2
  124. package/lib/pages/cms/products/components/SyncFreemiusPricingButton.es.js +25 -37
  125. package/lib/pages/cms/products/components/VariationsEditor.cjs.js +1 -1
  126. package/lib/pages/cms/products/components/VariationsEditor.es.js +261 -492
  127. package/lib/pages/cms/products/inventory/InventoryPage.cjs.js +1 -1
  128. package/lib/pages/cms/products/inventory/InventoryPage.es.js +12 -32
  129. package/lib/pages/cms/products/inventory/InventoryTableClient.cjs.js +2 -2
  130. package/lib/pages/cms/products/inventory/InventoryTableClient.es.js +145 -365
  131. package/lib/pages/cms/products/new/NewProductPage.cjs.js +1 -1
  132. package/lib/pages/cms/products/new/NewProductPage.es.js +30 -42
  133. package/lib/pages/cms/shipping/ShippingPage.cjs.js +2 -2
  134. package/lib/pages/cms/shipping/ShippingPage.es.js +155 -507
  135. package/lib/pages/cms/shipping/components/RateForm.cjs.js +1 -1
  136. package/lib/pages/cms/shipping/components/RateForm.d.ts +1 -1
  137. package/lib/pages/cms/shipping/components/RateForm.es.js +334 -717
  138. package/lib/pages/cms/shipping/components/ZoneForm.cjs.js +1 -1
  139. package/lib/pages/cms/shipping/components/ZoneForm.es.js +158 -392
  140. package/lib/pages/cms/taxes/TaxesPage.cjs.js +1 -1
  141. package/lib/pages/cms/taxes/TaxesPage.es.js +119 -447
  142. package/lib/pages/cms/taxes/components/TaxRateForm.cjs.js +1 -1
  143. package/lib/pages/cms/taxes/components/TaxRateForm.es.js +52 -156
  144. package/lib/product-actions.d.ts +31 -31
  145. package/lib/product-context.cjs.js +1 -1
  146. package/lib/product-context.es.js +10 -14
  147. package/lib/shared-inventory.d.ts +1 -1
  148. package/lib/states.cjs.js +1 -1
  149. package/lib/states.d.ts +2 -0
  150. package/lib/states.es.js +63 -29
  151. package/lib/trials.cjs.js +1 -1
  152. package/lib/trials.d.ts +10 -3
  153. package/lib/trials.es.js +28 -21
  154. package/lib/types.d.ts +2 -0
  155. package/lib/use-price-formatter.cjs.js +1 -0
  156. package/lib/use-price-formatter.d.ts +11 -0
  157. package/lib/use-price-formatter.es.js +13 -0
  158. package/lib/variation-utils.cjs.js +1 -1
  159. package/lib/variation-utils.d.ts +10 -0
  160. package/lib/variation-utils.es.js +139 -123
  161. package/package.json +4 -4
@@ -1,749 +1,407 @@
1
1
  'use client';
2
- import { jsxDEV as e, Fragment as Z } from "react/jsx-dev-runtime";
3
- import ee, { useState as V, useEffect as j, useMemo as B } from "react";
4
- import { Download as se, Package as te, ShieldCheck as re } from "lucide-react";
5
- import { Badge as H } from "@nextblock-cms/ui/badge";
6
- import { Button as oe } from "@nextblock-cms/ui/button";
7
- import { Label as ie } from "@nextblock-cms/ui/label";
8
- import { Separator as ne } from "@nextblock-cms/ui/separator";
9
- import { useTranslations as le, cn as ce, formatPrice as O } from "@nextblock-cms/utils";
10
- import { useProduct as ae } from "../product-context.es.js";
11
- import { ProductGallery as de } from "./ProductGallery.es.js";
12
- import { AddToCartButton as me } from "./AddToCartButton.es.js";
13
- import { SubscriptionSelector as ue } from "./SubscriptionSelector.es.js";
14
- import { toNoCookieEmbedSrc as Ne, SimpleTiptapRenderer as be } from "./SimpleTiptapRenderer.es.js";
15
- import { chooseInitialVariantSelections as $, normalizeSelectionsToAvailableVariants as F, findMatchingVariant as pe, resolveTranslatedText as fe, getAvailableTermIdsForAttribute as xe } from "../variation-utils.es.js";
16
- import { useCurrency as ke } from "../CurrencyProvider.es.js";
17
- import { resolveEffectivePriceForCurrency as M } from "../currency.es.js";
18
- import { isDigitalProduct as ve } from "../types.es.js";
19
- import { getTrialSummary as De } from "../trials.es.js";
20
- function w(a, p, y, _) {
21
- const P = {
2
+ import { jsxs as a, jsx as t, Fragment as te } from "react/jsx-runtime";
3
+ import re, { useState as F, useEffect as A, useMemo as V } from "react";
4
+ import { Download as ae, Package as se, ShieldCheck as ie } from "lucide-react";
5
+ import { Badge as O } from "@nextblock-cms/ui/badge";
6
+ import { Button as ce } from "@nextblock-cms/ui/button";
7
+ import { Label as ne } from "@nextblock-cms/ui/label";
8
+ import { Separator as le } from "@nextblock-cms/ui/separator";
9
+ import { useTranslations as oe, cn as de } from "@nextblock-cms/utils";
10
+ import { usePriceFormatter as me } from "../use-price-formatter.es.js";
11
+ import { useProduct as ue } from "../product-context.es.js";
12
+ import { ProductGallery as pe } from "./ProductGallery.es.js";
13
+ import { AddToCartButton as he } from "./AddToCartButton.es.js";
14
+ import { SubscriptionSelector as fe } from "./SubscriptionSelector.es.js";
15
+ import { SimpleTiptapRenderer as ge } from "./SimpleTiptapRenderer.es.js";
16
+ import { ShortDescription as xe } from "./ShortDescription.es.js";
17
+ import { chooseInitialVariantSelections as M, normalizeSelectionsToAvailableVariants as ve, findMatchingVariant as _e, resolveTranslatedText as be, getAvailableTermIdsForAttribute as Ne, applyVariantSelection as ye } from "../variation-utils.es.js";
18
+ import { useCurrency as we } from "../CurrencyProvider.es.js";
19
+ import { resolveEffectivePriceForCurrency as J } from "../currency.es.js";
20
+ import { isDigitalProduct as ke } from "../types.es.js";
21
+ import { getTrialSummary as Se } from "../trials.es.js";
22
+ function U(d, v, P, E) {
23
+ const C = {
22
24
  kind: "product-field",
23
- field: p,
24
- input: y,
25
- label: _
26
- }, s = typeof window < "u" ? window.location.origin : process.env.NEXT_PUBLIC_URL || process.env.TARGET_URL || (process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : "") || "http://localhost:3000";
27
- let u = (typeof window < "u" ? window.location.origin : process.env.NEXT_PUBLIC_URL || process.env.TARGET_URL || (process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : "") || "http://localhost:3000").replace(/\/+$/, "");
25
+ field: v,
26
+ input: P,
27
+ label: E
28
+ }, e = typeof window < "u" ? window.location.origin : process.env.NEXT_PUBLIC_URL || process.env.TARGET_URL || (process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : "") || "http://localhost:3000";
29
+ let g = (typeof window < "u" ? window.location.origin : process.env.NEXT_PUBLIC_URL || process.env.TARGET_URL || (process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : "") || "http://localhost:3000").replace(/\/+$/, "");
28
30
  try {
29
- (u.startsWith("http://") || u.startsWith("https://")) && (u = new URL(u).hostname);
31
+ (g.startsWith("http://") || g.startsWith("https://")) && (g = new URL(g).hostname);
30
32
  } catch {
31
33
  }
32
- const d = process.env.NEXTBLOCK_VERCEL_PROJECT_ID || process.env.VERCEL_PROJECT_ID, k = process.env.NEXTBLOCK_VERCEL_WORKSPACE_ID || process.env.VERCEL_ORG_ID, v = {
33
- origin: u,
34
- editUrl: `${s}/cms/products/${a.id}/edit`,
34
+ const y = process.env.NEXTBLOCK_VERCEL_PROJECT_ID || process.env.VERCEL_PROJECT_ID, m = process.env.NEXTBLOCK_VERCEL_WORKSPACE_ID || process.env.VERCEL_ORG_ID, _ = {
35
+ origin: g,
36
+ editUrl: `${e}/cms/products/${d.id}/edit`,
35
37
  data: {
36
38
  parentType: "product",
37
- parentId: a.id,
38
- slug: a.slug,
39
- languageId: a.language_id,
39
+ parentId: d.id,
40
+ slug: d.slug,
41
+ languageId: d.language_id,
40
42
  draftId: null,
41
- target: P
43
+ target: C
42
44
  }
43
45
  };
44
- return d && (v.projectId = d), k && (v.workspaceId = k), {
45
- "data-vercel-edit-info": JSON.stringify(v),
46
- "data-vercel-edit-target": JSON.stringify(P),
47
- "data-nextblock-visual-edit": `product:${p}`
46
+ return y && (_.projectId = y), m && (_.workspaceId = m), {
47
+ "data-vercel-edit-info": JSON.stringify(_),
48
+ "data-vercel-edit-target": JSON.stringify(C),
49
+ "data-nextblock-visual-edit": `product:${v}`
48
50
  };
49
51
  }
50
- const Ve = ({
51
- visualEditingEnabled: a = !1,
52
- descriptionNode: p,
53
- reviewsNode: y,
54
- canPurchase: _ = !0,
55
- purchaseFallbackNode: P
52
+ const Ke = ({
53
+ visualEditingEnabled: d = !1,
54
+ descriptionNode: v,
55
+ reviewsNode: P,
56
+ canPurchase: E = !0,
57
+ purchaseFallbackNode: C
56
58
  }) => {
57
- const s = ae(), { t: c, lang: u } = le(), { activeCurrencyCode: d, currencies: k } = ke(), v = a ? w(
58
- s,
59
+ const e = ue(), { t: n, lang: g } = oe(), y = me(), { activeCurrencyCode: m, currencies: _ } = we(), G = d ? U(
60
+ e,
59
61
  "title",
60
62
  "plain-text",
61
63
  "Product title"
62
- ) : void 0, J = a ? w(
63
- s,
64
+ ) : void 0, K = d ? U(
65
+ e,
64
66
  "short_description",
65
67
  "plain-text",
66
68
  "Short description"
67
- ) : void 0, G = a ? w(
68
- s,
69
+ ) : void 0, X = d ? U(
70
+ e,
69
71
  "description_json",
70
72
  "tiptap",
71
73
  "Product description"
72
- ) : void 0, f = (r, l, i) => {
73
- const A = c(r, i);
74
- return A === r ? l : A;
75
- }, L = s.images && s.images.length > 0 ? s.images : s.image_url ? [{ url: s.image_url, alt: s.title }] : [], x = s.custom_props?.provider === "freemius" || ve(s), S = De(s), o = !x && !!(s.has_variants && s.attributes?.length && s.variants?.length), N = s.attributes || [], m = s.variants || [], [D, R] = V(() => $(N, m)), [C, U] = V(1);
76
- j(() => {
77
- U(1);
78
- }, [s.id]), j(() => {
79
- o && R($(N, m));
80
- }, [N, o, s.id, m]);
81
- const b = B(() => o ? F(
82
- N,
83
- m,
84
- D
85
- ) : D, [N, o, D, m]);
86
- j(() => {
87
- JSON.stringify(b) !== JSON.stringify(D) && R(b);
88
- }, [b, D]);
89
- const t = B(() => o ? pe(m, b) : null, [o, b, m]), E = M({
90
- prices: s.prices,
91
- salePrices: s.sale_prices,
92
- fallbackPrice: s.price,
93
- fallbackSalePrice: s.sale_price,
94
- saleStartAt: s.sale_start_at,
95
- saleEndAt: s.sale_end_at,
96
- scheduledPrice: s.scheduled_price,
97
- scheduledPrices: s.scheduled_prices,
98
- scheduledPriceAt: s.scheduled_price_at,
99
- currencyCode: d,
100
- currencies: k
101
- }), T = o && t ? M({
102
- prices: t.prices,
103
- salePrices: t.sale_prices,
104
- fallbackPrice: t.price,
105
- fallbackSalePrice: t.sale_price,
106
- saleStartAt: t.sale_start_at,
107
- saleEndAt: t.sale_end_at,
108
- scheduledPrice: t.scheduled_price,
109
- scheduledPrices: t.scheduled_prices,
110
- scheduledPriceAt: t.scheduled_price_at,
111
- currencyCode: d,
112
- currencies: k
113
- }) : null, h = T?.price ?? E.price, g = T?.sale_price ?? E.sale_price, n = o ? t?.stock_quantity ?? 0 : s.stock ?? 0, K = B(() => {
114
- if (!t?.image_url)
115
- return L;
116
- const r = {
117
- url: t.image_url,
118
- alt: `${s.title} ${t.label}`
119
- }, l = L.filter(
120
- (i) => i.url !== t.image_url
74
+ ) : void 0, o = (s, l, p) => {
75
+ const h = n(s, p);
76
+ return h === s ? l : h;
77
+ }, R = e.images && e.images.length > 0 ? e.images : e.image_url ? [{ url: e.image_url, alt: e.title }] : [], b = e.custom_props?.provider === "freemius" || ke(e), j = Se(e, n), c = !b && !!(e.has_variants && e.attributes?.length && e.variants?.length), x = e.attributes || [], u = e.variants || [], [w, T] = F(() => M(x, u)), [q, I] = F(1);
78
+ A(() => {
79
+ I(1);
80
+ }, [e.id]), A(() => {
81
+ c && T(M(x, u));
82
+ }, [x, c, e.id, u]);
83
+ const N = V(() => c ? ve(
84
+ x,
85
+ u,
86
+ w
87
+ ) : w, [x, c, w, u]);
88
+ A(() => {
89
+ JSON.stringify(N) !== JSON.stringify(w) && T(N);
90
+ }, [N, w]);
91
+ const r = V(() => c ? _e(u, N) : null, [c, N, u]), $ = J({
92
+ prices: e.prices,
93
+ salePrices: e.sale_prices,
94
+ fallbackPrice: e.price,
95
+ fallbackSalePrice: e.sale_price,
96
+ saleStartAt: e.sale_start_at,
97
+ saleEndAt: e.sale_end_at,
98
+ scheduledPrice: e.scheduled_price,
99
+ scheduledPrices: e.scheduled_prices,
100
+ scheduledPriceAt: e.scheduled_price_at,
101
+ currencyCode: m,
102
+ currencies: _
103
+ }), B = c && r ? J({
104
+ prices: r.prices,
105
+ salePrices: r.sale_prices,
106
+ fallbackPrice: r.price,
107
+ fallbackSalePrice: r.sale_price,
108
+ saleStartAt: r.sale_start_at,
109
+ saleEndAt: r.sale_end_at,
110
+ scheduledPrice: r.scheduled_price,
111
+ scheduledPrices: r.scheduled_prices,
112
+ scheduledPriceAt: r.scheduled_price_at,
113
+ currencyCode: m,
114
+ currencies: _
115
+ }) : null, k = B?.price ?? $.price, S = B?.sale_price ?? $.sale_price, i = c ? r?.stock_quantity ?? 0 : e.stock ?? null, L = i === null || i > 0, f = i === null ? q : Math.max(1, Math.min(q, Math.max(i, 1))), z = V(() => {
116
+ if (!r?.image_url)
117
+ return R;
118
+ const s = {
119
+ url: r.image_url,
120
+ alt: `${e.title} ${r.label}`
121
+ }, l = R.filter(
122
+ (p) => p.url !== r.image_url
121
123
  );
122
- return [r, ...l];
123
- }, [L, s.title, t]), X = typeof g == "number" && h > 0 ? Math.round(
124
- (h - g) / h * 100
125
- ) : 0, q = o && t ? {
126
- ...s,
127
- sku: t.sku,
128
- price: t.price,
129
- prices: t.prices,
130
- sale_price: typeof t.sale_price == "number" ? t.sale_price : null,
131
- sale_prices: t.sale_prices,
132
- image_url: t.image_url || s.image_url,
133
- stock: t.stock_quantity,
134
- variant_id: t.id,
135
- variant_label: t.label,
136
- selected_options: t.selected_options,
137
- currency_code: d
124
+ return [s, ...l];
125
+ }, [R, e.title, r]), Q = typeof S == "number" && k > 0 ? Math.round(
126
+ (k - S) / k * 100
127
+ ) : 0, W = c && r ? {
128
+ ...e,
129
+ sku: r.sku,
130
+ price: r.price,
131
+ prices: r.prices,
132
+ sale_price: typeof r.sale_price == "number" ? r.sale_price : null,
133
+ sale_prices: r.sale_prices,
134
+ // The variant's own sale window and scheduled price, not the parent product's.
135
+ sale_start_at: r.sale_start_at,
136
+ sale_end_at: r.sale_end_at,
137
+ scheduled_price: r.scheduled_price,
138
+ scheduled_prices: r.scheduled_prices,
139
+ scheduled_price_at: r.scheduled_price_at,
140
+ image_url: r.image_url || e.image_url,
141
+ stock: r.stock_quantity,
142
+ variant_id: r.id,
143
+ variant_label: r.label,
144
+ selected_options: r.selected_options,
145
+ currency_code: m
138
146
  } : {
139
- ...s,
140
- currency_code: d
141
- }, z = (r, l) => {
142
- R(
143
- (i) => F(N, m, {
144
- ...i,
145
- [r]: l
146
- })
147
+ ...e,
148
+ currency_code: m
149
+ }, H = (s, l) => {
150
+ T(
151
+ (p) => ye(x, u, p, s, l)
147
152
  );
148
- }, W = f(
149
- "ecommerce.in_stock",
150
- `${n} in stock`,
151
- { count: String(n) }
152
- ), I = f(
153
+ }, Y = i === null ? o("ecommerce.in_stock_untracked", "In stock") : o("ecommerce.in_stock", `${i} in stock`, {
154
+ count: String(i)
155
+ }), D = o(
153
156
  "ecommerce.out_of_stock",
154
157
  "Out of stock"
155
- ), Q = f(
158
+ ), Z = o(
156
159
  "ecommerce.select_options",
157
160
  "Select Options"
158
- ), Y = f(
161
+ ), ee = o(
159
162
  "ecommerce.variant_selection_required",
160
163
  "Select one term from every dropdown to resolve a variation."
161
164
  );
162
- return /* @__PURE__ */ e("div", { className: "w-full animate-in fade-in slide-in-from-bottom-4 duration-700 ease-out", children: [
163
- /* @__PURE__ */ e("div", { className: "container mx-auto px-4 md:px-6 py-12", children: /* @__PURE__ */ e("div", { className: "grid gap-12 lg:grid-cols-[2fr_3fr] items-start", children: [
164
- /* @__PURE__ */ e("div", { className: "w-full max-w-2xl mx-auto lg:max-w-none", children: /* @__PURE__ */ e(de, { images: K, className: "w-full" }, void 0, !1, {
165
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
166
- lineNumber: 343,
167
- columnNumber: 13
168
- }, void 0) }, void 0, !1, {
169
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
170
- lineNumber: 342,
171
- columnNumber: 11
172
- }, void 0),
173
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-4 pb-2 max-w-xl mx-auto lg:mx-0 lg:max-w-none", children: [
174
- /* @__PURE__ */ e("div", { className: "space-y-6", children: /* @__PURE__ */ e("div", { className: "space-y-4", children: [
175
- /* @__PURE__ */ e(
165
+ return /* @__PURE__ */ a("div", { className: "w-full animate-in fade-in slide-in-from-bottom-4 duration-700 ease-out", children: [
166
+ /* @__PURE__ */ t("div", { className: "container mx-auto px-4 md:px-6 py-12", children: /* @__PURE__ */ a("div", { className: "grid gap-12 lg:grid-cols-[2fr_3fr] items-start", children: [
167
+ /* @__PURE__ */ t("div", { className: "w-full max-w-2xl mx-auto lg:max-w-none", children: /* @__PURE__ */ t(pe, { images: z, className: "w-full" }) }),
168
+ /* @__PURE__ */ a("div", { className: "flex flex-col gap-4 pb-2 max-w-xl mx-auto lg:mx-0 lg:max-w-none", children: [
169
+ /* @__PURE__ */ t("div", { className: "space-y-6", children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
170
+ /* @__PURE__ */ t(
176
171
  "h1",
177
172
  {
178
173
  className: "text-3xl sm:text-4xl lg:text-5xl font-extrabold tracking-tight text-foreground leading-[1.1] lg:mt-0",
179
- ...v,
180
- children: s.title
181
- },
182
- void 0,
183
- !1,
184
- {
185
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
186
- lineNumber: 351,
187
- columnNumber: 17
188
- },
189
- void 0
174
+ ...G,
175
+ children: e.title
176
+ }
190
177
  ),
191
- /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-2", children: /* @__PURE__ */ e(
178
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2 mt-2", children: /* @__PURE__ */ a(
192
179
  "a",
193
180
  {
194
181
  href: "#reviews-section",
195
182
  className: "flex items-center gap-1.5 group hover:opacity-85 transition-opacity",
196
183
  children: [
197
- /* @__PURE__ */ e("div", { className: "flex items-center text-amber-500", children: Array.from({ length: 5 }).map((r, l) => /* @__PURE__ */ e(
184
+ /* @__PURE__ */ t("div", { className: "flex items-center text-amber-500", children: Array.from({ length: 5 }).map((s, l) => /* @__PURE__ */ t(
198
185
  "svg",
199
186
  {
200
- className: ce(
187
+ className: de(
201
188
  "h-4 w-4 fill-current",
202
- l < Math.round(s.average_rating || 0) ? "text-amber-500" : "text-slate-300 dark:text-slate-700"
189
+ l < Math.round(e.average_rating || 0) ? "text-amber-500" : "text-slate-300 dark:text-slate-700"
203
190
  ),
204
191
  viewBox: "0 0 20 20",
205
192
  fill: "currentColor",
206
- children: /* @__PURE__ */ e("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }, void 0, !1, {
207
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
208
- lineNumber: 377,
209
- columnNumber: 27
210
- }, void 0)
211
- },
212
- l,
213
- !1,
214
- {
215
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
216
- lineNumber: 366,
217
- columnNumber: 25
193
+ children: /* @__PURE__ */ t("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" })
218
194
  },
219
- void 0
220
- )) }, void 0, !1, {
221
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
222
- lineNumber: 364,
223
- columnNumber: 21
224
- }, void 0),
225
- s.total_reviews && s.total_reviews > 0 ? /* @__PURE__ */ e(Z, { children: [
226
- /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: s.average_rating?.toFixed(1) }, void 0, !1, {
227
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
228
- lineNumber: 383,
229
- columnNumber: 25
230
- }, void 0),
231
- /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground underline decoration-dotted group-hover:text-primary", children: [
195
+ l
196
+ )) }),
197
+ e.total_reviews && e.total_reviews > 0 ? /* @__PURE__ */ a(te, { children: [
198
+ /* @__PURE__ */ t("span", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: e.average_rating?.toFixed(1) }),
199
+ /* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground underline decoration-dotted group-hover:text-primary", children: [
232
200
  "(",
233
- s.total_reviews === 1 ? c("reviews.review_count_one", { count: s.total_reviews }) : c("reviews.review_count_other", { count: s.total_reviews }),
201
+ e.total_reviews === 1 ? n("reviews.review_count_one", { count: e.total_reviews }) : n("reviews.review_count_other", { count: e.total_reviews }),
234
202
  ")"
235
- ] }, void 0, !0, {
236
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
237
- lineNumber: 386,
238
- columnNumber: 25
239
- }, void 0)
240
- ] }, void 0, !0, {
241
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
242
- lineNumber: 382,
243
- columnNumber: 23
244
- }, void 0) : /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground group-hover:text-primary underline decoration-dotted", children: c("reviews.be_the_first") }, void 0, !1, {
245
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
246
- lineNumber: 393,
247
- columnNumber: 23
248
- }, void 0)
203
+ ] })
204
+ ] }) : /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground group-hover:text-primary underline decoration-dotted", children: n("reviews.be_the_first") })
249
205
  ]
250
- },
251
- void 0,
252
- !0,
253
- {
254
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
255
- lineNumber: 360,
256
- columnNumber: 19
257
- },
258
- void 0
259
- ) }, void 0, !1, {
260
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
261
- lineNumber: 359,
262
- columnNumber: 17
263
- }, void 0),
264
- s.categories && s.categories.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-1.5 text-xs font-bold uppercase tracking-widest text-amber-600 dark:text-amber-400", children: s.categories.map((r, l) => {
265
- const i = fe(
266
- r.name,
267
- r.name_translations,
268
- u
206
+ }
207
+ ) }),
208
+ e.categories && e.categories.length > 0 && /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-1.5 text-xs font-bold uppercase tracking-widest text-amber-600 dark:text-amber-400", children: e.categories.map((s, l) => {
209
+ const p = be(
210
+ s.name,
211
+ s.name_translations,
212
+ g
269
213
  );
270
- return /* @__PURE__ */ e(ee.Fragment, { children: [
271
- l > 0 && /* @__PURE__ */ e("span", { className: "text-muted-foreground/30", children: "•" }, void 0, !1, {
272
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
273
- lineNumber: 411,
274
- columnNumber: 29
275
- }, void 0),
276
- /* @__PURE__ */ e("span", { children: i }, void 0, !1, {
277
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
278
- lineNumber: 413,
279
- columnNumber: 27
280
- }, void 0)
281
- ] }, r.id, !0, {
282
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
283
- lineNumber: 409,
284
- columnNumber: 25
285
- }, void 0);
286
- }) }, void 0, !1, {
287
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
288
- lineNumber: 401,
289
- columnNumber: 19
290
- }, void 0),
291
- /* @__PURE__ */ e(
214
+ return /* @__PURE__ */ a(re.Fragment, { children: [
215
+ l > 0 && /* @__PURE__ */ t("span", { className: "text-muted-foreground/30", children: "•" }),
216
+ /* @__PURE__ */ t("span", { children: p })
217
+ ] }, s.id);
218
+ }) }),
219
+ /* @__PURE__ */ t(
292
220
  "div",
293
221
  {
294
222
  className: "prose prose-neutral dark:prose-invert max-w-none text-muted-foreground leading-relaxed text-left",
295
- ...J,
296
- children: s.short_description ? /* @__PURE__ */ e(
297
- "div",
223
+ ...K,
224
+ children: e.short_description ? /* @__PURE__ */ t(
225
+ xe,
298
226
  {
299
- className: "text-lg mb-4 leading-relaxed",
300
- dangerouslySetInnerHTML: {
301
- __html: Ne(s.short_description) ?? s.short_description
302
- }
303
- },
304
- void 0,
305
- !1,
306
- {
307
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
308
- lineNumber: 425,
309
- columnNumber: 21
310
- },
311
- void 0
312
- ) : a ? /* @__PURE__ */ e("p", { className: "text-lg mb-4 italic text-muted-foreground", children: "Add a short product description." }, void 0, !1, {
313
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
314
- lineNumber: 434,
315
- columnNumber: 21
316
- }, void 0) : null
317
- },
318
- void 0,
319
- !1,
320
- {
321
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
322
- lineNumber: 420,
323
- columnNumber: 17
324
- },
325
- void 0
227
+ value: e.short_description,
228
+ className: "text-lg mb-4 leading-relaxed"
229
+ }
230
+ ) : d ? /* @__PURE__ */ t("p", { className: "text-lg mb-4 italic text-muted-foreground", children: "Add a short product description." }) : null
231
+ }
326
232
  ),
327
- /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: [
328
- typeof g == "number" && /* @__PURE__ */ e(
329
- H,
233
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
234
+ typeof S == "number" && /* @__PURE__ */ t(
235
+ O,
330
236
  {
331
237
  variant: "destructive",
332
238
  className: "px-2.5 py-1 text-xs font-bold uppercase tracking-wide animate-pulse shadow-sm",
333
- children: c("ecommerce.sale_badge", {
334
- percent: String(X)
239
+ children: n("ecommerce.sale_badge", {
240
+ percent: String(Q)
335
241
  })
336
- },
337
- void 0,
338
- !1,
339
- {
340
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
341
- lineNumber: 442,
342
- columnNumber: 21
343
- },
344
- void 0
242
+ }
345
243
  ),
346
- !x && n > 0 && n < 10 && /* @__PURE__ */ e(
347
- H,
244
+ !b && i !== null && i > 0 && i < 10 && /* @__PURE__ */ t(
245
+ O,
348
246
  {
349
247
  variant: "outline",
350
248
  className: "text-amber-600 border-amber-200 bg-amber-50",
351
- children: c("ecommerce.low_stock", {
352
- count: String(n)
249
+ children: n("ecommerce.low_stock", {
250
+ count: String(i)
353
251
  })
354
- },
355
- void 0,
356
- !1,
357
- {
358
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
359
- lineNumber: 452,
360
- columnNumber: 21
361
- },
362
- void 0
252
+ }
363
253
  ),
364
- S && /* @__PURE__ */ e(
365
- H,
254
+ j && /* @__PURE__ */ t(
255
+ O,
366
256
  {
367
257
  variant: "secondary",
368
258
  className: "border border-emerald-200 bg-emerald-50 text-emerald-800",
369
- children: S.label
370
- },
371
- void 0,
372
- !1,
373
- {
374
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
375
- lineNumber: 462,
376
- columnNumber: 21
377
- },
378
- void 0
259
+ children: j.label
260
+ }
379
261
  )
380
- ] }, void 0, !0, {
381
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
382
- lineNumber: 440,
383
- columnNumber: 17
384
- }, void 0)
385
- ] }, void 0, !0, {
386
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
387
- lineNumber: 348,
388
- columnNumber: 15
389
- }, void 0) }, void 0, !1, {
390
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
391
- lineNumber: 347,
392
- columnNumber: 13
393
- }, void 0),
394
- /* @__PURE__ */ e("div", { className: "p-5 rounded-2xl bg-card/60 border border-border/80 shadow-md backdrop-blur-md space-y-4", children: [
395
- _ ? x ? /* @__PURE__ */ e(ue, { product: s }, void 0, !1, {
396
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
397
- lineNumber: 478,
398
- columnNumber: 17
399
- }, void 0) : /* @__PURE__ */ e("div", { className: "space-y-3.5", children: [
400
- /* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-4", children: [
401
- /* @__PURE__ */ e("div", { className: "space-y-1", children: [
402
- /* @__PURE__ */ e("span", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-widest", children: f("ecommerce.price", "Price") }, void 0, !1, {
403
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
404
- lineNumber: 484,
405
- columnNumber: 23
406
- }, void 0),
407
- /* @__PURE__ */ e("div", { className: "flex items-baseline gap-2.5", children: [
408
- /* @__PURE__ */ e("span", { className: "text-3xl font-extrabold text-foreground", children: O(
409
- g ?? h,
410
- d
411
- ) }, void 0, !1, {
412
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
413
- lineNumber: 488,
414
- columnNumber: 25
415
- }, void 0),
416
- typeof g == "number" && /* @__PURE__ */ e("span", { className: "text-lg text-muted-foreground line-through decoration-destructive/20 decoration-1", children: O(h, d) }, void 0, !1, {
417
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
418
- lineNumber: 495,
419
- columnNumber: 27
420
- }, void 0)
421
- ] }, void 0, !0, {
422
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
423
- lineNumber: 487,
424
- columnNumber: 23
425
- }, void 0)
426
- ] }, void 0, !0, {
427
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
428
- lineNumber: 483,
429
- columnNumber: 21
430
- }, void 0),
431
- !x && (t || !o) && /* @__PURE__ */ e("div", { className: "text-right space-y-1", children: [
432
- /* @__PURE__ */ e("span", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-widest block", children: [
433
- !o && s.sku && /* @__PURE__ */ e("span", { className: "mr-2 font-normal lowercase normal-case text-muted-foreground/70", children: [
434
- "SKU: ",
435
- s.sku
436
- ] }, void 0, !0, {
437
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
438
- lineNumber: 506,
439
- columnNumber: 29
440
- }, void 0),
441
- f("ecommerce.status", "Status")
442
- ] }, void 0, !0, {
443
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
444
- lineNumber: 504,
445
- columnNumber: 25
446
- }, void 0),
447
- /* @__PURE__ */ e("div", { className: (n ?? 0) > 0 ? "text-emerald-600 dark:text-emerald-400 font-semibold text-sm" : "text-destructive font-semibold text-sm", children: (n ?? 0) > 0 ? W : I }, void 0, !1, {
448
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
449
- lineNumber: 512,
450
- columnNumber: 25
451
- }, void 0)
452
- ] }, void 0, !0, {
453
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
454
- lineNumber: 503,
455
- columnNumber: 23
456
- }, void 0)
457
- ] }, void 0, !0, {
458
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
459
- lineNumber: 482,
460
- columnNumber: 19
461
- }, void 0),
462
- o && /* @__PURE__ */ e("div", { className: "space-y-3", children: /* @__PURE__ */ e("div", { className: "grid gap-3 sm:grid-cols-2", children: N.map((r) => {
463
- const l = xe(
464
- m,
465
- r.id,
466
- b
262
+ ] })
263
+ ] }) }),
264
+ /* @__PURE__ */ a("div", { className: "p-5 rounded-2xl bg-card border border-border/80 shadow-md space-y-4", children: [
265
+ E ? b ? /* @__PURE__ */ t(fe, { product: e }) : /* @__PURE__ */ a("div", { className: "space-y-3.5", children: [
266
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-4", children: [
267
+ /* @__PURE__ */ a("div", { className: "space-y-1", children: [
268
+ /* @__PURE__ */ t("span", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-widest", children: o("ecommerce.price", "Price") }),
269
+ /* @__PURE__ */ a("div", { className: "flex items-baseline gap-2.5", children: [
270
+ /* @__PURE__ */ t("span", { className: "text-3xl font-extrabold text-foreground", children: y(
271
+ S ?? k,
272
+ m
273
+ ) }),
274
+ typeof S == "number" && /* @__PURE__ */ t("span", { className: "text-lg text-muted-foreground line-through decoration-destructive/20 decoration-1", children: y(k, m) })
275
+ ] })
276
+ ] }),
277
+ !b && (r || !c) && /* @__PURE__ */ a("div", { className: "text-right space-y-1", children: [
278
+ /* @__PURE__ */ a("span", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-widest block", children: [
279
+ !c && e.sku && /* @__PURE__ */ a("span", { className: "mr-2 font-normal lowercase normal-case text-muted-foreground/70", children: [
280
+ o("ecommerce.sku", "SKU"),
281
+ ": ",
282
+ e.sku
283
+ ] }),
284
+ o("ecommerce.status", "Status")
285
+ ] }),
286
+ /* @__PURE__ */ t("div", { className: L ? "text-emerald-600 dark:text-emerald-400 font-semibold text-sm" : "text-destructive font-semibold text-sm", children: L ? Y : D })
287
+ ] })
288
+ ] }),
289
+ c && /* @__PURE__ */ t("div", { className: "space-y-3", children: /* @__PURE__ */ t("div", { className: "grid gap-3 sm:grid-cols-2", children: x.map((s, l) => {
290
+ const p = Ne(
291
+ u,
292
+ s.id,
293
+ {}
467
294
  );
468
- return /* @__PURE__ */ e("div", { className: "space-y-1", children: [
469
- /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: [
470
- /* @__PURE__ */ e(
471
- ie,
295
+ return /* @__PURE__ */ a("div", { className: "space-y-1", children: [
296
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
297
+ /* @__PURE__ */ t(
298
+ ne,
472
299
  {
473
- htmlFor: `attribute-${r.id}`,
300
+ htmlFor: `attribute-${s.id}`,
474
301
  className: "text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",
475
- children: r.name
476
- },
477
- void 0,
478
- !1,
479
- {
480
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
481
- lineNumber: 534,
482
- columnNumber: 33
483
- },
484
- void 0
302
+ children: s.name
303
+ }
485
304
  ),
486
- t?.sku && /* @__PURE__ */ e("span", { className: "text-[10px] text-muted-foreground font-mono", children: t.sku }, void 0, !1, {
487
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
488
- lineNumber: 541,
489
- columnNumber: 35
490
- }, void 0)
491
- ] }, void 0, !0, {
492
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
493
- lineNumber: 533,
494
- columnNumber: 31
495
- }, void 0),
496
- /* @__PURE__ */ e(
305
+ l === 0 && r?.sku && /* @__PURE__ */ t("span", { className: "text-[10px] text-muted-foreground font-mono", children: r.sku })
306
+ ] }),
307
+ /* @__PURE__ */ t(
497
308
  "select",
498
309
  {
499
- id: `attribute-${r.id}`,
500
- className: "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
501
- value: b[r.id] || "",
502
- onChange: (i) => z(
503
- r.id,
504
- i.target.value
310
+ id: `attribute-${s.id}`,
311
+ className: "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",
312
+ value: N[s.id] || "",
313
+ onChange: (h) => H(
314
+ s.id,
315
+ h.target.value
505
316
  ),
506
- children: r.terms.map((i) => /* @__PURE__ */ e(
317
+ children: s.terms.map((h) => /* @__PURE__ */ t(
507
318
  "option",
508
319
  {
509
- value: i.id,
510
- disabled: !l.has(i.id),
511
- children: i.value
512
- },
513
- i.id,
514
- !1,
515
- {
516
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
517
- lineNumber: 558,
518
- columnNumber: 35
320
+ value: h.id,
321
+ disabled: !p.has(h.id),
322
+ children: h.value
519
323
  },
520
- void 0
324
+ h.id
521
325
  ))
522
- },
523
- void 0,
524
- !1,
525
- {
526
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
527
- lineNumber: 546,
528
- columnNumber: 31
529
- },
530
- void 0
326
+ }
531
327
  )
532
- ] }, r.id, !0, {
533
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
534
- lineNumber: 532,
535
- columnNumber: 29
536
- }, void 0);
537
- }) }, void 0, !1, {
538
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
539
- lineNumber: 522,
540
- columnNumber: 23
541
- }, void 0) }, void 0, !1, {
542
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
543
- lineNumber: 521,
544
- columnNumber: 21
545
- }, void 0),
546
- o && !t && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground italic pt-1", children: Y }, void 0, !1, {
547
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
548
- lineNumber: 575,
549
- columnNumber: 21
550
- }, void 0),
551
- /* @__PURE__ */ e("div", { className: "flex items-center gap-3 pt-1", children: [
552
- !x && (n ?? 0) > 0 && /* @__PURE__ */ e("div", { className: "flex items-center border rounded-lg h-12 bg-background border-input select-none", children: [
553
- /* @__PURE__ */ e(
554
- "button",
555
- {
556
- type: "button",
557
- onClick: () => U((r) => Math.max(1, r - 1)),
558
- className: "px-3 h-full flex items-center justify-center text-muted-foreground hover:text-foreground active:scale-95 transition-all text-lg font-medium",
559
- disabled: C <= 1,
560
- children: "-"
561
- },
562
- void 0,
563
- !1,
564
- {
565
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
566
- lineNumber: 584,
567
- columnNumber: 25
568
- },
569
- void 0
570
- ),
571
- /* @__PURE__ */ e("span", { className: "w-8 text-center text-sm font-semibold", children: C }, void 0, !1, {
572
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
573
- lineNumber: 592,
574
- columnNumber: 25
575
- }, void 0),
576
- /* @__PURE__ */ e(
577
- "button",
578
- {
579
- type: "button",
580
- onClick: () => U(
581
- (r) => n !== null && r >= n ? r : r + 1
328
+ ] }, s.id);
329
+ }) }) }),
330
+ c && !r && /* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground italic pt-1", children: ee }),
331
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-3 pt-1", children: [
332
+ !b && L && /* @__PURE__ */ a(
333
+ "div",
334
+ {
335
+ role: "group",
336
+ "aria-label": o("ecommerce.quantity", "Quantity"),
337
+ className: "flex items-center border rounded-lg h-12 bg-background border-input select-none",
338
+ children: [
339
+ /* @__PURE__ */ t(
340
+ "button",
341
+ {
342
+ type: "button",
343
+ onClick: () => I(Math.max(1, f - 1)),
344
+ "aria-label": o("ecommerce.decrease_quantity", "Decrease quantity"),
345
+ className: "px-3 h-full flex items-center justify-center rounded-l-lg text-muted-foreground hover:text-foreground active:scale-95 transition-colors text-lg font-medium focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
346
+ disabled: f <= 1,
347
+ children: /* @__PURE__ */ t("span", { "aria-hidden": "true", children: "-" })
348
+ }
582
349
  ),
583
- className: "px-3 h-full flex items-center justify-center text-muted-foreground hover:text-foreground active:scale-95 transition-all text-lg font-medium",
584
- disabled: n !== null && C >= n,
585
- children: "+"
586
- },
587
- void 0,
588
- !1,
589
- {
590
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
591
- lineNumber: 595,
592
- columnNumber: 25
593
- },
594
- void 0
595
- )
596
- ] }, void 0, !0, {
597
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
598
- lineNumber: 583,
599
- columnNumber: 23
600
- }, void 0),
601
- o && (!t || (n ?? 0) <= 0) ? /* @__PURE__ */ e(
602
- oe,
350
+ /* @__PURE__ */ t("span", { "aria-live": "polite", "aria-atomic": "true", className: "w-8 text-center text-sm font-semibold tabular-nums", children: f }),
351
+ /* @__PURE__ */ t(
352
+ "button",
353
+ {
354
+ type: "button",
355
+ onClick: () => I(
356
+ i !== null && f >= i ? f : f + 1
357
+ ),
358
+ "aria-label": o("ecommerce.increase_quantity", "Increase quantity"),
359
+ className: "px-3 h-full flex items-center justify-center rounded-r-lg text-muted-foreground hover:text-foreground active:scale-95 transition-colors text-lg font-medium focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
360
+ disabled: i !== null && f >= i,
361
+ children: /* @__PURE__ */ t("span", { "aria-hidden": "true", children: "+" })
362
+ }
363
+ )
364
+ ]
365
+ }
366
+ ),
367
+ c && (!r || !L) ? /* @__PURE__ */ t(
368
+ ce,
603
369
  {
604
370
  disabled: !0,
605
371
  className: "flex-1 h-12 text-md font-bold shadow-md",
606
- children: t ? I : Q
607
- },
608
- void 0,
609
- !1,
610
- {
611
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
612
- lineNumber: 616,
613
- columnNumber: 23
614
- },
615
- void 0
616
- ) : /* @__PURE__ */ e(
617
- me,
618
- {
619
- product: q,
620
- quantity: C,
621
- className: "flex-1 h-12 text-md font-bold shadow-md transition-all hover:shadow-lg active:scale-[0.98]"
622
- },
623
- void 0,
624
- !1,
372
+ children: r ? D : Z
373
+ }
374
+ ) : /* @__PURE__ */ t(
375
+ he,
625
376
  {
626
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
627
- lineNumber: 623,
628
- columnNumber: 23
629
- },
630
- void 0
377
+ product: W,
378
+ quantity: f,
379
+ className: "flex-1 h-12 text-base font-bold shadow-md transition-shadow hover:shadow-lg active:scale-[0.98]"
380
+ }
631
381
  )
632
- ] }, void 0, !0, {
633
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
634
- lineNumber: 581,
635
- columnNumber: 19
636
- }, void 0)
637
- ] }, void 0, !0, {
638
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
639
- lineNumber: 480,
640
- columnNumber: 17
641
- }, void 0) : P,
642
- /* @__PURE__ */ e(ne, { className: "opacity-60 my-0.5" }, void 0, !1, {
643
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
644
- lineNumber: 633,
645
- columnNumber: 15
646
- }, void 0),
647
- /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-4 text-center text-[11px] font-medium text-muted-foreground pt-1", children: [
648
- /* @__PURE__ */ e("div", { className: "flex items-center justify-center gap-2", children: x ? /* @__PURE__ */ e("span", { className: "inline-flex items-center gap-1.5", children: [
649
- /* @__PURE__ */ e(se, { className: "h-3.5 w-3.5" }, void 0, !1, {
650
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
651
- lineNumber: 639,
652
- columnNumber: 23
653
- }, void 0),
654
- c("ecommerce.instant_digital_delivery")
655
- ] }, void 0, !0, {
656
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
657
- lineNumber: 638,
658
- columnNumber: 21
659
- }, void 0) : /* @__PURE__ */ e("span", { className: "inline-flex items-center gap-1.5", children: [
660
- /* @__PURE__ */ e(te, { className: "h-3.5 w-3.5" }, void 0, !1, {
661
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
662
- lineNumber: 644,
663
- columnNumber: 23
664
- }, void 0),
665
- c("ecommerce.free_shipping")
666
- ] }, void 0, !0, {
667
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
668
- lineNumber: 643,
669
- columnNumber: 21
670
- }, void 0) }, void 0, !1, {
671
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
672
- lineNumber: 636,
673
- columnNumber: 17
674
- }, void 0),
675
- /* @__PURE__ */ e("div", { className: "flex items-center justify-center gap-2", children: /* @__PURE__ */ e("span", { className: "inline-flex items-center gap-1.5", children: [
676
- /* @__PURE__ */ e(re, { className: "h-3.5 w-3.5" }, void 0, !1, {
677
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
678
- lineNumber: 651,
679
- columnNumber: 21
680
- }, void 0),
681
- c("ecommerce.secure_checkout")
682
- ] }, void 0, !0, {
683
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
684
- lineNumber: 650,
685
- columnNumber: 19
686
- }, void 0) }, void 0, !1, {
687
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
688
- lineNumber: 649,
689
- columnNumber: 17
690
- }, void 0)
691
- ] }, void 0, !0, {
692
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
693
- lineNumber: 635,
694
- columnNumber: 15
695
- }, void 0)
696
- ] }, void 0, !0, {
697
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
698
- lineNumber: 474,
699
- columnNumber: 13
700
- }, void 0)
701
- ] }, void 0, !0, {
702
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
703
- lineNumber: 346,
704
- columnNumber: 11
705
- }, void 0)
706
- ] }, void 0, !0, {
707
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
708
- lineNumber: 341,
709
- columnNumber: 9
710
- }, void 0) }, void 0, !1, {
711
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
712
- lineNumber: 340,
713
- columnNumber: 7
714
- }, void 0),
715
- /* @__PURE__ */ e("div", { className: "min-w-0 w-full", ...p ? void 0 : G, children: p || (s.description_json ? /* @__PURE__ */ e("div", { className: "container mx-auto px-4 md:px-6 pb-12 prose prose-neutral dark:prose-invert max-w-none leading-relaxed", children: /* @__PURE__ */ e(be, { content: s.description_json }, void 0, !1, {
716
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
717
- lineNumber: 666,
718
- columnNumber: 13
719
- }, void 0) }, void 0, !1, {
720
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
721
- lineNumber: 665,
722
- columnNumber: 11
723
- }, void 0) : /* @__PURE__ */ e("div", { className: "container mx-auto px-4 md:px-6 pb-12", children: /* @__PURE__ */ e("p", { className: "italic text-sm text-muted-foreground", children: c("ecommerce.no_description") }, void 0, !1, {
724
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
725
- lineNumber: 670,
726
- columnNumber: 13
727
- }, void 0) }, void 0, !1, {
728
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
729
- lineNumber: 669,
730
- columnNumber: 11
731
- }, void 0)) }, void 0, !1, {
732
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
733
- lineNumber: 661,
734
- columnNumber: 7
735
- }, void 0),
736
- y && /* @__PURE__ */ e("div", { id: "reviews-section", className: "border-t border-border mt-12 pt-12", children: y }, void 0, !1, {
737
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
738
- lineNumber: 679,
739
- columnNumber: 9
740
- }, void 0)
741
- ] }, void 0, !0, {
742
- fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
743
- lineNumber: 339,
744
- columnNumber: 5
745
- }, void 0);
382
+ ] })
383
+ ] }) : C,
384
+ /* @__PURE__ */ t(le, { className: "opacity-60 my-0.5" }),
385
+ /* @__PURE__ */ a("div", { className: "grid grid-cols-2 gap-4 text-center text-[11px] font-medium text-muted-foreground pt-1", children: [
386
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-center gap-2", children: b ? /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1.5", children: [
387
+ /* @__PURE__ */ t(ae, { className: "h-3.5 w-3.5" }),
388
+ n("ecommerce.instant_digital_delivery")
389
+ ] }) : /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1.5", children: [
390
+ /* @__PURE__ */ t(se, { className: "h-3.5 w-3.5" }),
391
+ n("ecommerce.free_shipping")
392
+ ] }) }),
393
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-center gap-2", children: /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1.5", children: [
394
+ /* @__PURE__ */ t(ie, { className: "h-3.5 w-3.5" }),
395
+ n("ecommerce.secure_checkout")
396
+ ] }) })
397
+ ] })
398
+ ] })
399
+ ] })
400
+ ] }) }),
401
+ /* @__PURE__ */ t("div", { className: "min-w-0 w-full", ...v ? void 0 : X, children: v || (e.description_json ? /* @__PURE__ */ t("div", { className: "container mx-auto px-4 md:px-6 pb-12 prose prose-neutral dark:prose-invert max-w-none leading-relaxed", children: /* @__PURE__ */ t(ge, { content: e.description_json }) }) : /* @__PURE__ */ t("div", { className: "container mx-auto px-4 md:px-6 pb-12", children: /* @__PURE__ */ t("p", { className: "italic text-sm text-muted-foreground", children: n("ecommerce.no_description") }) })) }),
402
+ P && /* @__PURE__ */ t("div", { id: "reviews-section", className: "border-t border-border mt-12 pt-12", children: P })
403
+ ] });
746
404
  };
747
405
  export {
748
- Ve as ProductDetailsLayout
406
+ Ke as ProductDetailsLayout
749
407
  };