@mercurjs/admin 2.2.0-canary.50 → 2.2.0-canary.53

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 (162) hide show
  1. package/dist/{add-campaign-promotions-QQUFYFRH.js → add-campaign-promotions-RH5L6VMH.js} +6 -6
  2. package/dist/{api-key-management-detail-O6KKT7V2.js → api-key-management-detail-2RZ6NOYH.js} +3 -3
  3. package/dist/{api-key-management-list-QVYDHEZQ.js → api-key-management-list-CGHUURWX.js} +5 -5
  4. package/dist/{api-key-management-sales-channels-W5NFP6EW.js → api-key-management-sales-channels-VJMUPYV3.js} +2 -2
  5. package/dist/{attribute-detail-LWKL6UMS.js → attribute-detail-6FMX7IDW.js} +8 -8
  6. package/dist/{attribute-list-QUSXFHRZ.js → attribute-list-PJXWYS4C.js} +5 -5
  7. package/dist/{campaign-detail-PF3LUUZU.js → campaign-detail-3PNOOUGP.js} +8 -8
  8. package/dist/{campaign-list-YXZ5GE7I.js → campaign-list-TNJDWTM5.js} +5 -5
  9. package/dist/{category-detail-NQIXS2WH.js → category-detail-KVGWGOXO.js} +7 -7
  10. package/dist/{category-list-5XGK4PEB.js → category-list-D4J4G6HW.js} +5 -5
  11. package/dist/{category-products-SX6CH3ZZ.js → category-products-3Z7IEXQX.js} +5 -5
  12. package/dist/{chunk-OPE24DZA.js → chunk-3FKB6UTO.js} +1 -1
  13. package/dist/{chunk-PEUWV5YK.js → chunk-3GOUKEPE.js} +22 -8
  14. package/dist/{chunk-3RRHQY24.js → chunk-3KS7PC2Z.js} +4 -4
  15. package/dist/{chunk-Y6C2YIKD.js → chunk-3LDOWS4A.js} +1 -1
  16. package/dist/{chunk-KL4DBMVO.js → chunk-3VMIKSCF.js} +5 -5
  17. package/dist/{chunk-EQGJGBA5.js → chunk-3WCK2FT4.js} +2 -2
  18. package/dist/{chunk-XJQ4MWBR.js → chunk-4CF6MCTB.js} +2 -2
  19. package/dist/{chunk-ZCQMFJ4X.js → chunk-4DJL3XN7.js} +5 -5
  20. package/dist/{chunk-M5BZBKA3.js → chunk-4QQ6BFWQ.js} +1 -1
  21. package/dist/{chunk-K2JORJRZ.js → chunk-4TW5RTWO.js} +2 -2
  22. package/dist/{chunk-BFUHW56P.js → chunk-5NC3VFXY.js} +1 -1
  23. package/dist/{chunk-N2CMOV3N.js → chunk-67KYEPSA.js} +1 -1
  24. package/dist/{chunk-2SMBVF6F.js → chunk-6DDS7IRR.js} +4 -4
  25. package/dist/{chunk-4XGFT4RZ.js → chunk-6FZYSGM6.js} +6 -6
  26. package/dist/{chunk-AO3P27WX.js → chunk-6R767EBC.js} +1 -1
  27. package/dist/{chunk-FIWEITDG.js → chunk-6TMGHMZ2.js} +4 -4
  28. package/dist/{chunk-YPM6XXSO.js → chunk-7KLIV4DG.js} +5 -5
  29. package/dist/{chunk-PAYQJPGK.js → chunk-7PPT3477.js} +2 -2
  30. package/dist/{chunk-MBHP7XGQ.js → chunk-AW5OKJQZ.js} +1 -1
  31. package/dist/{chunk-WNBV2NBG.js → chunk-BBD4WOUK.js} +2 -2
  32. package/dist/{chunk-2GHNKPYY.js → chunk-BHSY6RCN.js} +4 -4
  33. package/dist/{chunk-6PGIRZA6.js → chunk-CKWG7MDV.js} +3 -3
  34. package/dist/{chunk-O6KUSG6F.js → chunk-CLDUJCYN.js} +5 -5
  35. package/dist/{chunk-VHOCBKSA.js → chunk-D74PZCTO.js} +1 -1
  36. package/dist/{chunk-PFD4SHVF.js → chunk-DPBZDNIP.js} +9 -7
  37. package/dist/{chunk-2CHED2KM.js → chunk-EFUP5XI6.js} +3 -3
  38. package/dist/{chunk-Z7XMG6DA.js → chunk-EQV3YDNF.js} +7 -8
  39. package/dist/{chunk-CQKCZECQ.js → chunk-F6DGTW4E.js} +1 -1
  40. package/dist/{chunk-WV4SPFOD.js → chunk-G67PGZDM.js} +2 -2
  41. package/dist/{chunk-6ZVV2XHU.js → chunk-GRFWCCUW.js} +1 -1
  42. package/dist/{chunk-ESC6LVVC.js → chunk-H3D6V3KM.js} +1 -1
  43. package/dist/{chunk-I3RIVWBQ.js → chunk-HC7FWIMY.js} +4 -4
  44. package/dist/{chunk-GLWJ5J3F.js → chunk-HSSKMCXJ.js} +2 -2
  45. package/dist/{chunk-YL7CBNVF.js → chunk-I5FOWDOM.js} +4 -4
  46. package/dist/{chunk-IJ2CSCLP.js → chunk-JSI7IOMU.js} +3 -3
  47. package/dist/{chunk-J772X4Q3.js → chunk-KT7CXVLT.js} +4 -4
  48. package/dist/{chunk-B3IK3FNO.js → chunk-MEDZM6N7.js} +4 -4
  49. package/dist/{chunk-KQVRWXAL.js → chunk-MPRW23TB.js} +2 -2
  50. package/dist/{chunk-VVJPSCBO.js → chunk-MUKW4VRI.js} +4 -4
  51. package/dist/{chunk-JPFPQWNT.js → chunk-NM7UMMTI.js} +5 -5
  52. package/dist/{chunk-26PTCTT3.js → chunk-OSDDXAP2.js} +5 -5
  53. package/dist/{chunk-L6D7AGRF.js → chunk-OX6HZPVY.js} +4 -4
  54. package/dist/{chunk-ZVPTNPLI.js → chunk-P3GGL5JL.js} +1 -1
  55. package/dist/{chunk-VU6KTPOZ.js → chunk-PDID73QY.js} +539 -537
  56. package/dist/{chunk-MVRIYUOU.js → chunk-PPRIEP4H.js} +4 -4
  57. package/dist/{chunk-3WOU2BB5.js → chunk-Q5DRFJPI.js} +4 -4
  58. package/dist/{chunk-5WTNXDRM.js → chunk-QXJFQDMJ.js} +5 -5
  59. package/dist/{chunk-Q2CJGCIA.js → chunk-R2LW5LGL.js} +1 -1
  60. package/dist/{chunk-TVTI7RG5.js → chunk-RX4VERJZ.js} +5 -5
  61. package/dist/{chunk-SHFF3Y5U.js → chunk-RYISNVIR.js} +4 -4
  62. package/dist/{chunk-5NSOIZFB.js → chunk-S4IDR46L.js} +3 -3
  63. package/dist/{chunk-IOAB3VND.js → chunk-SLAWONP2.js} +4 -4
  64. package/dist/{chunk-OAGTPKC5.js → chunk-TIG77LHS.js} +1 -1
  65. package/dist/{chunk-YBVXGODN.js → chunk-UVH7PC5B.js} +4 -4
  66. package/dist/{chunk-KA3BALYJ.js → chunk-VB7LMHAF.js} +5 -5
  67. package/dist/{chunk-GT5A4XN2.js → chunk-VX6OCQLN.js} +4 -4
  68. package/dist/{chunk-THMINQBZ.js → chunk-WF2PHYTE.js} +4 -4
  69. package/dist/{chunk-NASXWD7N.js → chunk-WTVSHPKP.js} +2 -2
  70. package/dist/{chunk-MJTFEVGB.js → chunk-X4SSIHH7.js} +4 -4
  71. package/dist/{chunk-NI4FAFNL.js → chunk-XDMCPTDG.js} +90 -65
  72. package/dist/{chunk-OTGABFC4.js → chunk-XNUH2AOW.js} +4 -4
  73. package/dist/{chunk-NPUD4G37.js → chunk-XXV6ZSWY.js} +1 -1
  74. package/dist/{chunk-GWW6MPYK.js → chunk-YLQ63F5E.js} +4 -4
  75. package/dist/{chunk-7MYE6VFQ.js → chunk-YNR25MNM.js} +4 -4
  76. package/dist/{collection-add-products-TRY52HYQ.js → collection-add-products-LULJ6HVD.js} +5 -5
  77. package/dist/{collection-detail-MQ7ZH6OT.js → collection-detail-WEZP4V3E.js} +7 -7
  78. package/dist/{collection-list-YMCTIJ52.js → collection-list-KBONBULB.js} +8 -8
  79. package/dist/{commissions-list-56S53CQ4.js → commissions-list-SGVCP2O4.js} +5 -5
  80. package/dist/{customer-detail-VIWHZUOZ.js → customer-detail-3KIDRBLW.js} +5 -5
  81. package/dist/{customer-group-add-customers-VKUSW6AS.js → customer-group-add-customers-LKFLDXVO.js} +3 -3
  82. package/dist/{customer-group-detail-JVULZZTT.js → customer-group-detail-KWHS7V6F.js} +5 -5
  83. package/dist/{customer-group-list-SKODEZKB.js → customer-group-list-3FCJBXFY.js} +5 -5
  84. package/dist/{customer-list-LYDL4IEG.js → customer-list-JT6YE2IW.js} +5 -5
  85. package/dist/{customers-add-customer-group-FXRUE5SD.js → customers-add-customer-group-IAGH6MJJ.js} +3 -3
  86. package/dist/extension-targets.d.ts +7 -1
  87. package/dist/index.css +3 -3
  88. package/dist/index.js +121 -121
  89. package/dist/{inventory-detail-J7NMO7EZ.js → inventory-detail-LHWQTJ7S.js} +5 -5
  90. package/dist/{inventory-list-XBDJ7BHE.js → inventory-list-Q2CCGYI5.js} +5 -5
  91. package/dist/{location-detail-DTBVSZBJ.js → location-detail-ZRLP4XVJ.js} +2 -2
  92. package/dist/{location-fulfillment-providers-P5U5K4NO.js → location-fulfillment-providers-CL7PKPTT.js} +6 -6
  93. package/dist/{location-list-LH27WJBT.js → location-list-HW5F37YZ.js} +2 -2
  94. package/dist/{location-sales-channels-PRQUBZIV.js → location-sales-channels-Z4E5VA7M.js} +2 -2
  95. package/dist/{location-service-zone-create-O6GYRZEE.js → location-service-zone-create-WZXZFMA2.js} +4 -4
  96. package/dist/{location-service-zone-manage-areas-DBP3P27I.js → location-service-zone-manage-areas-5SYZKBQK.js} +4 -4
  97. package/dist/{marketplace-add-currencies-IPE5RJF6.js → marketplace-add-currencies-ZBLGQQCX.js} +3 -3
  98. package/dist/{marketplace-detail-VNCNRAE4.js → marketplace-detail-RZWOCVGF.js} +5 -5
  99. package/dist/{offer-detail-page-KQMSZLQN.js → offer-detail-page-XS52BE5U.js} +7 -7
  100. package/dist/{offer-variant-detail-page-GESVAA2S.js → offer-variant-detail-page-QQGOMRUY.js} +4 -4
  101. package/dist/{offers-NW24IATZ.js → offers-UUFYROYV.js} +7 -7
  102. package/dist/{order-create-claim-Y7ESDXLI.js → order-create-claim-AG3GMAE2.js} +5 -5
  103. package/dist/{order-create-edit-CAKL6MJQ.js → order-create-edit-N3TDQQIT.js} +5 -5
  104. package/dist/{order-create-exchange-QGSECB7D.js → order-create-exchange-ZCQBC54O.js} +5 -5
  105. package/dist/{order-create-return-R5WJBQ5W.js → order-create-return-VUHKWVQM.js} +5 -5
  106. package/dist/{order-detail-DGZXN7IQ.js → order-detail-CTZELMAQ.js} +4 -4
  107. package/dist/{order-edit-billing-address-ZAQ3FPRT.js → order-edit-billing-address-S4YOG2EE.js} +1 -1
  108. package/dist/{order-list-6LIYSO2R.js → order-list-D6RWIRDG.js} +8 -8
  109. package/dist/pages/index.js +67 -67
  110. package/dist/{payout-list-VUJKOAOJ.js → payout-list-WE3H7FKO.js} +5 -5
  111. package/dist/{price-list-configuration-DYFBYDQE.js → price-list-configuration-4UNGTKCM.js} +4 -4
  112. package/dist/{price-list-create-U2DMHUQE.js → price-list-create-6XVYEUCA.js} +7 -7
  113. package/dist/{price-list-detail-CAK3AFSU.js → price-list-detail-PBMKVUIE.js} +7 -7
  114. package/dist/{price-list-list-PJIIPQOF.js → price-list-list-EM3TNZQG.js} +5 -5
  115. package/dist/{price-list-prices-add-6TO5RTTD.js → price-list-prices-add-MZXRSG77.js} +6 -6
  116. package/dist/{product-create-KCMW6PCB.js → product-create-3PZNLIDT.js} +10 -4
  117. package/dist/{product-detail-A6DZWYEL.js → product-detail-IVRD2OHL.js} +6 -6
  118. package/dist/{product-edit-KMK7CMLI.js → product-edit-HCJYIONN.js} +3 -5
  119. package/dist/{product-list-CIHKL6N7.js → product-list-E3GWVLRE.js} +9 -10
  120. package/dist/{product-media-P57SRDNX.js → product-media-B5D2HUQF.js} +2 -2
  121. package/dist/{product-organization-QNCCL277.js → product-organization-5FUCDOGD.js} +1 -1
  122. package/dist/{product-sales-channels-GD7NYUP3.js → product-sales-channels-GUK6FTDA.js} +2 -2
  123. package/dist/{product-tag-detail-D54OKWUZ.js → product-tag-detail-RTRJYLTX.js} +8 -8
  124. package/dist/{product-tag-list-QNWZAU5G.js → product-tag-list-OTYBGV3W.js} +8 -8
  125. package/dist/{product-type-detail-TXZ6HTOV.js → product-type-detail-DTFOBWJ6.js} +7 -7
  126. package/dist/{product-type-list-OZILJZLG.js → product-type-list-AQ3GEAZX.js} +5 -5
  127. package/dist/{profile-detail-PFJX3LPX.js → profile-detail-H5QMV4F4.js} +1 -1
  128. package/dist/{profile-edit-O6Z3XJ4U.js → profile-edit-FQYTJKYW.js} +3 -1
  129. package/dist/{promotion-detail-H6S4JYYD.js → promotion-detail-N7JHJGSW.js} +4 -4
  130. package/dist/{promotion-list-A3V4W5DY.js → promotion-list-MIL2B752.js} +8 -8
  131. package/dist/{refund-reason-list-YYCNRERE.js → refund-reason-list-LLDTOBXO.js} +6 -6
  132. package/dist/{region-add-countries-UO5A42HM.js → region-add-countries-WIJCJPOX.js} +3 -3
  133. package/dist/{region-create-7NA6RKWS.js → region-create-B3I3W7QJ.js} +3 -3
  134. package/dist/{region-detail-VA4FGEKA.js → region-detail-3OFMBGML.js} +5 -5
  135. package/dist/{region-list-WU4LTP5Y.js → region-list-DD5S5BD2.js} +5 -5
  136. package/dist/{reservation-list-SGGW2MSN.js → reservation-list-EJPMH7UX.js} +5 -5
  137. package/dist/{reset-password-7KNQD6OM.js → reset-password-AZ2RPOG5.js} +1 -1
  138. package/dist/{return-reason-list-HMSZJDKI.js → return-reason-list-3YXRYEFA.js} +8 -8
  139. package/dist/{sales-channel-add-products-6TXYF3HM.js → sales-channel-add-products-4MJ7BSJQ.js} +5 -5
  140. package/dist/{sales-channel-detail-SYE4FUXD.js → sales-channel-detail-2NDESJPC.js} +7 -7
  141. package/dist/{sales-channel-list-4CNHLSBR.js → sales-channel-list-WBG6DUZJ.js} +3 -3
  142. package/dist/{shipping-option-type-list-7NSGG7ZI.js → shipping-option-type-list-7F5R6ACH.js} +5 -5
  143. package/dist/{shipping-profiles-list-AKSZ4O35.js → shipping-profiles-list-KXXYHJIY.js} +5 -5
  144. package/dist/{store-address-edit-M6A37RFY.js → store-address-edit-4SDHKPM7.js} +3 -1
  145. package/dist/{store-closure-edit-VE7D5F7I.js → store-closure-edit-DCLHOBDW.js} +3 -1
  146. package/dist/{store-details-45RPSTMU.js → store-details-Y3IF7R24.js} +8 -8
  147. package/dist/{store-edit-HABD7SAL.js → store-edit-33N7EQE2.js} +2 -2
  148. package/dist/{store-list-XZU26QTH.js → store-list-P6RDAS5M.js} +8 -8
  149. package/dist/{store-payment-details-edit-JUM745OG.js → store-payment-details-edit-KSD2S64U.js} +3 -1
  150. package/dist/{store-professional-details-edit-NKBYKBCA.js → store-professional-details-edit-BYQQX7FL.js} +3 -1
  151. package/dist/{tax-region-create-SKBBBZXJ.js → tax-region-create-7FXHJKVB.js} +1 -1
  152. package/dist/{tax-region-detail-UGD2KK2H.js → tax-region-detail-6AFMQQP7.js} +6 -6
  153. package/dist/{tax-region-list-GRZIXRD4.js → tax-region-list-IBT5YP3U.js} +4 -4
  154. package/dist/{tax-region-province-detail-LITAO6EZ.js → tax-region-province-detail-CBCYMSGF.js} +5 -5
  155. package/dist/{tax-region-tax-override-create-NCAWHUOU.js → tax-region-tax-override-create-UIF2BQFK.js} +7 -7
  156. package/dist/{tax-region-tax-override-edit-OOP7RQZR.js → tax-region-tax-override-edit-USEIJ2VG.js} +7 -7
  157. package/dist/{user-invite-FCWARLW5.js → user-invite-LSWNFFLT.js} +3 -3
  158. package/dist/{user-list-62A6ZMIX.js → user-list-B66HEMCD.js} +5 -5
  159. package/package.json +9 -9
  160. package/dist/{chunk-PEVS3GLB.js → chunk-5NAX6LXB.js} +3 -3
  161. package/dist/{chunk-7OKYEA6I.js → chunk-HC2TEEKQ.js} +3 -3
  162. package/dist/{product-add-existing-attributes-XIJB2NXI.js → product-add-existing-attributes-UVVJDOEN.js} +3 -3
@@ -78,7 +78,7 @@ import {
78
78
  import {
79
79
  _DataTable,
80
80
  useDataTable
81
- } from "./chunk-6ZVV2XHU.js";
81
+ } from "./chunk-GRFWCCUW.js";
82
82
  import {
83
83
  useDate
84
84
  } from "./chunk-UZWFZMOX.js";
@@ -1386,83 +1386,34 @@ var OrderActivitySection = ({ order }) => {
1386
1386
  ] });
1387
1387
  };
1388
1388
 
1389
- // src/pages/orders/order-detail/components/order-commission-section/order-commission-section.tsx
1390
- import { Container as Container6, Heading as Heading6, Text as Text7 } from "@medusajs/ui";
1391
- import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
1392
- import { useMemo as useMemo3 } from "react";
1393
- import { useTranslation as useTranslation9 } from "react-i18next";
1394
- import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1395
- var OrderCommissionSection = ({
1396
- order
1397
- }) => {
1398
- const { t } = useTranslation9();
1399
- const { commission_lines, isLoading } = useOrderCommissionLines(order.id);
1400
- const itemTitleById = useMemo3(() => {
1401
- const map = /* @__PURE__ */ new Map();
1402
- order.items?.forEach((item) => {
1403
- map.set(item.id, item.product_title ?? item.title);
1404
- });
1405
- return map;
1406
- }, [order.items]);
1407
- if (isLoading || !commission_lines.length) {
1408
- return null;
1409
- }
1410
- const total = commission_lines.reduce(
1411
- (acc, line) => acc + (line.amount ?? 0),
1412
- 0
1413
- );
1414
- return /* @__PURE__ */ jsxs9(Container6, { className: "divide-y p-0", "data-testid": "order-commission-section", children: [
1415
- /* @__PURE__ */ jsx9("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx9(Heading6, { level: "h2", children: t("fields.commission") }) }),
1416
- /* @__PURE__ */ jsx9("div", { className: "divide-y", children: commission_lines.map((line) => {
1417
- const label = line.shipping_method_id ? t("fields.shipping") : itemTitleById.get(line.item_id ?? "") ?? line.code;
1418
- return /* @__PURE__ */ jsxs9(
1419
- "div",
1420
- {
1421
- className: "text-ui-fg-subtle grid grid-cols-2 items-center gap-4 px-6 py-4",
1422
- children: [
1423
- /* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", children: label }),
1424
- /* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", className: "text-right", children: getLocaleAmount(line.amount, order.currency_code) })
1425
- ]
1426
- },
1427
- line.id
1428
- );
1429
- }) }),
1430
- /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between px-6 py-4", children: [
1431
- /* @__PURE__ */ jsx9(Text7, { size: "small", weight: "plus", leading: "compact", children: t("orders.commission.total") }),
1432
- /* @__PURE__ */ jsx9(Text7, { size: "small", weight: "plus", leading: "compact", children: getLocaleAmount(total, order.currency_code) })
1433
- ] }),
1434
- /* @__PURE__ */ jsx9(DisplayExtensionZone2, { model: "order", zone: "commission", data: order })
1435
- ] });
1436
- };
1437
-
1438
1389
  // src/pages/orders/order-detail/components/order-customer-section/order-customer-section.tsx
1439
1390
  import { ArrowPath as ArrowPath2, CurrencyDollar, Envelope, FlyingBox } from "@medusajs/icons";
1440
- import { Container as Container7, Heading as Heading7 } from "@medusajs/ui";
1441
- import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
1442
- import { useTranslation as useTranslation11 } from "react-i18next";
1391
+ import { Container as Container6, Heading as Heading6 } from "@medusajs/ui";
1392
+ import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
1393
+ import { useTranslation as useTranslation10 } from "react-i18next";
1443
1394
 
1444
1395
  // src/components/common/customer-info/customer-info.tsx
1445
- import { Avatar, Copy as Copy2, Text as Text8 } from "@medusajs/ui";
1446
- import { useTranslation as useTranslation10 } from "react-i18next";
1396
+ import { Avatar, Copy as Copy2, Text as Text7 } from "@medusajs/ui";
1397
+ import { useTranslation as useTranslation9 } from "react-i18next";
1447
1398
  import { Link } from "react-router-dom";
1448
- import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1399
+ import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1449
1400
  var ID = ({ data }) => {
1450
- const { t } = useTranslation10();
1401
+ const { t } = useTranslation9();
1451
1402
  const id = data.customer_id;
1452
1403
  const name = getOrderCustomer(data);
1453
1404
  const email = data.email;
1454
1405
  const fallback = (name || email || "").charAt(0).toUpperCase();
1455
- return /* @__PURE__ */ jsxs10("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1456
- /* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", weight: "plus", children: t("fields.id") }),
1457
- /* @__PURE__ */ jsx10(
1406
+ return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1407
+ /* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: t("fields.id") }),
1408
+ /* @__PURE__ */ jsx9(
1458
1409
  Link,
1459
1410
  {
1460
1411
  to: `/customers/${id}`,
1461
1412
  className: "focus:shadow-borders-focus rounded-[4px] outline-none transition-shadow",
1462
- children: /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-x-2 overflow-hidden", children: [
1463
- /* @__PURE__ */ jsx10(Avatar, { size: "2xsmall", fallback }),
1464
- /* @__PURE__ */ jsx10(
1465
- Text8,
1413
+ children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-x-2 overflow-hidden", children: [
1414
+ /* @__PURE__ */ jsx9(Avatar, { size: "2xsmall", fallback }),
1415
+ /* @__PURE__ */ jsx9(
1416
+ Text7,
1466
1417
  {
1467
1418
  size: "small",
1468
1419
  leading: "compact",
@@ -1476,26 +1427,26 @@ var ID = ({ data }) => {
1476
1427
  ] });
1477
1428
  };
1478
1429
  var Company = ({ data }) => {
1479
- const { t } = useTranslation10();
1430
+ const { t } = useTranslation9();
1480
1431
  const company = data.shipping_address?.company || data.billing_address?.company;
1481
1432
  if (!company) {
1482
1433
  return null;
1483
1434
  }
1484
- return /* @__PURE__ */ jsxs10("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1485
- /* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", weight: "plus", children: t("fields.company") }),
1486
- /* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", className: "truncate", children: company })
1435
+ return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1436
+ /* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: t("fields.company") }),
1437
+ /* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", className: "truncate", children: company })
1487
1438
  ] });
1488
1439
  };
1489
1440
  var Contact = ({ data }) => {
1490
- const { t } = useTranslation10();
1441
+ const { t } = useTranslation9();
1491
1442
  const phone = data.shipping_address?.phone || data.billing_address?.phone;
1492
1443
  const email = data.email || "";
1493
- return /* @__PURE__ */ jsxs10("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1494
- /* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.customer.contactLabel") }),
1495
- /* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-y-2", children: [
1496
- /* @__PURE__ */ jsxs10("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1497
- /* @__PURE__ */ jsx10(
1498
- Text8,
1444
+ return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1445
+ /* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: t("orders.customer.contactLabel") }),
1446
+ /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-y-2", children: [
1447
+ /* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1448
+ /* @__PURE__ */ jsx9(
1449
+ Text7,
1499
1450
  {
1500
1451
  size: "small",
1501
1452
  leading: "compact",
@@ -1503,11 +1454,11 @@ var Contact = ({ data }) => {
1503
1454
  children: email
1504
1455
  }
1505
1456
  ),
1506
- /* @__PURE__ */ jsx10("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx10(Copy2, { content: email, className: "text-ui-fg-muted" }) })
1457
+ /* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx9(Copy2, { content: email, className: "text-ui-fg-muted" }) })
1507
1458
  ] }),
1508
- phone && /* @__PURE__ */ jsxs10("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1509
- /* @__PURE__ */ jsx10(
1510
- Text8,
1459
+ phone && /* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1460
+ /* @__PURE__ */ jsx9(
1461
+ Text7,
1511
1462
  {
1512
1463
  size: "small",
1513
1464
  leading: "compact",
@@ -1515,7 +1466,7 @@ var Contact = ({ data }) => {
1515
1466
  children: phone
1516
1467
  }
1517
1468
  ),
1518
- /* @__PURE__ */ jsx10("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx10(Copy2, { content: phone, className: "text-ui-fg-muted" }) })
1469
+ /* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx9(Copy2, { content: phone, className: "text-ui-fg-muted" }) })
1519
1470
  ] })
1520
1471
  ] })
1521
1472
  ] });
@@ -1524,33 +1475,33 @@ var AddressPrint = ({
1524
1475
  address,
1525
1476
  type
1526
1477
  }) => {
1527
- const { t } = useTranslation10();
1528
- return /* @__PURE__ */ jsxs10("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1529
- /* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", weight: "plus", children: type === "shipping" ? t("addresses.shippingAddress.label") : t("addresses.billingAddress.label") }),
1530
- address ? /* @__PURE__ */ jsxs10("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1531
- /* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", children: getFormattedAddress({ address }).map((line, i) => {
1532
- return /* @__PURE__ */ jsxs10("span", { className: "break-words", children: [
1478
+ const { t } = useTranslation9();
1479
+ return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1480
+ /* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: type === "shipping" ? t("addresses.shippingAddress.label") : t("addresses.billingAddress.label") }),
1481
+ address ? /* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1482
+ /* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", children: getFormattedAddress({ address }).map((line, i) => {
1483
+ return /* @__PURE__ */ jsxs9("span", { className: "break-words", children: [
1533
1484
  line,
1534
- /* @__PURE__ */ jsx10("br", {})
1485
+ /* @__PURE__ */ jsx9("br", {})
1535
1486
  ] }, i);
1536
1487
  }) }),
1537
- /* @__PURE__ */ jsx10("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx10(
1488
+ /* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx9(
1538
1489
  Copy2,
1539
1490
  {
1540
1491
  content: getFormattedAddress({ address }).join("\n"),
1541
1492
  className: "text-ui-fg-muted"
1542
1493
  }
1543
1494
  ) })
1544
- ] }) : /* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", children: "-" })
1495
+ ] }) : /* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", children: "-" })
1545
1496
  ] });
1546
1497
  };
1547
1498
  var Addresses = ({ data }) => {
1548
- const { t } = useTranslation10();
1549
- return /* @__PURE__ */ jsxs10("div", { className: "divide-y", children: [
1550
- /* @__PURE__ */ jsx10(AddressPrint, { address: data.shipping_address, type: "shipping" }),
1551
- !isSameAddress(data.shipping_address, data.billing_address) ? /* @__PURE__ */ jsx10(AddressPrint, { address: data.billing_address, type: "billing" }) : /* @__PURE__ */ jsxs10("div", { className: "grid grid-cols-2 items-center px-6 py-4", children: [
1552
- /* @__PURE__ */ jsx10(
1553
- Text8,
1499
+ const { t } = useTranslation9();
1500
+ return /* @__PURE__ */ jsxs9("div", { className: "divide-y", children: [
1501
+ /* @__PURE__ */ jsx9(AddressPrint, { address: data.shipping_address, type: "shipping" }),
1502
+ !isSameAddress(data.shipping_address, data.billing_address) ? /* @__PURE__ */ jsx9(AddressPrint, { address: data.billing_address, type: "billing" }) : /* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-2 items-center px-6 py-4", children: [
1503
+ /* @__PURE__ */ jsx9(
1504
+ Text7,
1554
1505
  {
1555
1506
  size: "small",
1556
1507
  leading: "compact",
@@ -1559,7 +1510,7 @@ var Addresses = ({ data }) => {
1559
1510
  children: t("addresses.billingAddress.label")
1560
1511
  }
1561
1512
  ),
1562
- /* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: t("addresses.billingAddress.sameAsShipping") })
1513
+ /* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: t("addresses.billingAddress.sameAsShipping") })
1563
1514
  ] })
1564
1515
  ] });
1565
1516
  };
@@ -1584,41 +1535,41 @@ var getOrderCustomer = (obj) => {
1584
1535
  };
1585
1536
 
1586
1537
  // src/pages/orders/order-detail/components/order-customer-section/order-customer-section.tsx
1587
- import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
1538
+ import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1588
1539
  var OrderCustomerSection = ({ order }) => {
1589
- return /* @__PURE__ */ jsxs11(
1590
- Container7,
1540
+ return /* @__PURE__ */ jsxs10(
1541
+ Container6,
1591
1542
  {
1592
1543
  className: "divide-y p-0",
1593
1544
  "data-testid": "order-customer-section",
1594
1545
  children: [
1595
- /* @__PURE__ */ jsx11(Header, { order }),
1596
- /* @__PURE__ */ jsx11(CustomerInfo.ID, { data: order }),
1597
- /* @__PURE__ */ jsx11(CustomerInfo.Contact, { data: order }),
1598
- /* @__PURE__ */ jsx11(CustomerInfo.Company, { data: order }),
1599
- /* @__PURE__ */ jsx11(CustomerInfo.Addresses, { data: order }),
1600
- /* @__PURE__ */ jsx11(DisplayExtensionZone3, { model: "order", zone: "customer", data: order })
1546
+ /* @__PURE__ */ jsx10(Header, { order }),
1547
+ /* @__PURE__ */ jsx10(CustomerInfo.ID, { data: order }),
1548
+ /* @__PURE__ */ jsx10(CustomerInfo.Contact, { data: order }),
1549
+ /* @__PURE__ */ jsx10(CustomerInfo.Company, { data: order }),
1550
+ /* @__PURE__ */ jsx10(CustomerInfo.Addresses, { data: order }),
1551
+ /* @__PURE__ */ jsx10(DisplayExtensionZone2, { model: "order", zone: "customer", data: order })
1601
1552
  ]
1602
1553
  }
1603
1554
  );
1604
1555
  };
1605
1556
  var Header = ({ order }) => {
1606
- const { t } = useTranslation11();
1607
- return /* @__PURE__ */ jsxs11(
1557
+ const { t } = useTranslation10();
1558
+ return /* @__PURE__ */ jsxs10(
1608
1559
  "div",
1609
1560
  {
1610
1561
  className: "flex items-center justify-between px-6 py-4",
1611
1562
  "data-testid": "order-customer-header",
1612
1563
  children: [
1613
- /* @__PURE__ */ jsx11(
1614
- Heading7,
1564
+ /* @__PURE__ */ jsx10(
1565
+ Heading6,
1615
1566
  {
1616
1567
  level: "h2",
1617
1568
  "data-testid": "order-customer-heading",
1618
1569
  children: t("fields.customer")
1619
1570
  }
1620
1571
  ),
1621
- /* @__PURE__ */ jsx11(
1572
+ /* @__PURE__ */ jsx10(
1622
1573
  ActionMenu,
1623
1574
  {
1624
1575
  groups: [
@@ -1627,7 +1578,7 @@ var Header = ({ order }) => {
1627
1578
  {
1628
1579
  label: t("transferOwnership.label"),
1629
1580
  to: `transfer`,
1630
- icon: /* @__PURE__ */ jsx11(ArrowPath2, {})
1581
+ icon: /* @__PURE__ */ jsx10(ArrowPath2, {})
1631
1582
  }
1632
1583
  ]
1633
1584
  },
@@ -1636,12 +1587,12 @@ var Header = ({ order }) => {
1636
1587
  {
1637
1588
  label: t("addresses.shippingAddress.editLabel"),
1638
1589
  to: "shipping-address",
1639
- icon: /* @__PURE__ */ jsx11(FlyingBox, {})
1590
+ icon: /* @__PURE__ */ jsx10(FlyingBox, {})
1640
1591
  },
1641
1592
  {
1642
1593
  label: t("addresses.billingAddress.editLabel"),
1643
1594
  to: "billing-address",
1644
- icon: /* @__PURE__ */ jsx11(CurrencyDollar, {})
1595
+ icon: /* @__PURE__ */ jsx10(CurrencyDollar, {})
1645
1596
  }
1646
1597
  ]
1647
1598
  },
@@ -1650,7 +1601,7 @@ var Header = ({ order }) => {
1650
1601
  {
1651
1602
  label: t("email.editLabel"),
1652
1603
  to: `email`,
1653
- icon: /* @__PURE__ */ jsx11(Envelope, {}),
1604
+ icon: /* @__PURE__ */ jsx10(Envelope, {}),
1654
1605
  disabled: order.status === "canceled"
1655
1606
  }
1656
1607
  ]
@@ -1666,40 +1617,40 @@ var Header = ({ order }) => {
1666
1617
 
1667
1618
  // src/pages/orders/order-detail/components/order-fulfillment-section/order-fulfillment-section.tsx
1668
1619
  import {
1669
- Container as Container8,
1620
+ Container as Container7,
1670
1621
  Copy as Copy3,
1671
- Heading as Heading8,
1622
+ Heading as Heading7,
1672
1623
  StatusBadge,
1673
- Text as Text9,
1624
+ Text as Text8,
1674
1625
  Tooltip as Tooltip2
1675
1626
  } from "@medusajs/ui";
1676
1627
  import { format } from "date-fns";
1677
- import { useTranslation as useTranslation12 } from "react-i18next";
1628
+ import { useTranslation as useTranslation11 } from "react-i18next";
1678
1629
  import { Link as Link2 } from "react-router-dom";
1679
- import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
1630
+ import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
1680
1631
  var OrderFulfillmentSection = ({
1681
1632
  order
1682
1633
  }) => {
1683
1634
  const fulfillments = order.fulfillments || [];
1684
- return /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-y-3", "data-testid": "order-fulfillment-section", children: [
1685
- /* @__PURE__ */ jsx12(UnfulfilledItemBreakdown, { order }),
1686
- fulfillments.map((f, index) => /* @__PURE__ */ jsx12(Fulfillment, { index, fulfillment: f, order }, f.id))
1635
+ return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-y-3", "data-testid": "order-fulfillment-section", children: [
1636
+ /* @__PURE__ */ jsx11(UnfulfilledItemBreakdown, { order }),
1637
+ fulfillments.map((f, index) => /* @__PURE__ */ jsx11(Fulfillment, { index, fulfillment: f, order }, f.id))
1687
1638
  ] });
1688
1639
  };
1689
1640
  var UnfulfilledItem = ({
1690
1641
  item,
1691
1642
  currencyCode
1692
1643
  }) => {
1693
- return /* @__PURE__ */ jsxs12(
1644
+ return /* @__PURE__ */ jsxs11(
1694
1645
  "div",
1695
1646
  {
1696
1647
  className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4",
1697
1648
  children: [
1698
- /* @__PURE__ */ jsxs12("div", { className: "flex items-start gap-x-4", children: [
1699
- /* @__PURE__ */ jsx12(Thumbnail, { src: item.thumbnail }),
1700
- /* @__PURE__ */ jsxs12("div", { children: [
1701
- /* @__PURE__ */ jsx12(
1702
- Text9,
1649
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-start gap-x-4", children: [
1650
+ /* @__PURE__ */ jsx11(Thumbnail, { src: item.thumbnail }),
1651
+ /* @__PURE__ */ jsxs11("div", { children: [
1652
+ /* @__PURE__ */ jsx11(
1653
+ Text8,
1703
1654
  {
1704
1655
  size: "small",
1705
1656
  leading: "compact",
@@ -1708,20 +1659,20 @@ var UnfulfilledItem = ({
1708
1659
  children: item.title
1709
1660
  }
1710
1661
  ),
1711
- item.variant_sku && /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-1", children: [
1712
- /* @__PURE__ */ jsx12(Text9, { size: "small", children: item.variant_sku }),
1713
- /* @__PURE__ */ jsx12(Copy3, { content: item.variant_sku, className: "text-ui-fg-muted" })
1662
+ item.variant_sku && /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-x-1", children: [
1663
+ /* @__PURE__ */ jsx11(Text8, { size: "small", children: item.variant_sku }),
1664
+ /* @__PURE__ */ jsx11(Copy3, { content: item.variant_sku, className: "text-ui-fg-muted" })
1714
1665
  ] }),
1715
- /* @__PURE__ */ jsx12(Text9, { size: "small", children: item.variant?.options?.map((o) => o.value).join(" \xB7 ") })
1666
+ /* @__PURE__ */ jsx11(Text8, { size: "small", children: item.variant?.options?.map((o) => o.value).join(" \xB7 ") })
1716
1667
  ] })
1717
1668
  ] }),
1718
- /* @__PURE__ */ jsxs12("div", { className: "grid grid-cols-3 items-center gap-x-4", children: [
1719
- /* @__PURE__ */ jsx12("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx12(Text9, { size: "small", children: getLocaleAmount(item.unit_price, currencyCode) }) }),
1720
- /* @__PURE__ */ jsx12("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsxs12(Text9, { children: [
1721
- /* @__PURE__ */ jsx12("span", { className: "tabular-nums", children: item.quantity - item.detail.fulfilled_quantity }),
1669
+ /* @__PURE__ */ jsxs11("div", { className: "grid grid-cols-3 items-center gap-x-4", children: [
1670
+ /* @__PURE__ */ jsx11("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx11(Text8, { size: "small", children: getLocaleAmount(item.unit_price, currencyCode) }) }),
1671
+ /* @__PURE__ */ jsx11("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsxs11(Text8, { children: [
1672
+ /* @__PURE__ */ jsx11("span", { className: "tabular-nums", children: item.quantity - item.detail.fulfilled_quantity }),
1722
1673
  "x"
1723
1674
  ] }) }),
1724
- /* @__PURE__ */ jsx12("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx12(Text9, { size: "small", children: getLocaleAmount(item.subtotal || 0, currencyCode) }) })
1675
+ /* @__PURE__ */ jsx11("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx11(Text8, { size: "small", children: getLocaleAmount(item.subtotal || 0, currencyCode) }) })
1725
1676
  ] })
1726
1677
  ]
1727
1678
  },
@@ -1735,8 +1686,8 @@ var UnfulfilledItemBreakdown = ({ order }) => {
1735
1686
  const unfulfilledItemsWithoutShipping = order.items.filter(
1736
1687
  (i) => !i.requires_shipping && i.detail.fulfilled_quantity < i.quantity
1737
1688
  );
1738
- return /* @__PURE__ */ jsxs12(Fragment2, { children: [
1739
- !!unfulfilledItemsWithShipping.length && /* @__PURE__ */ jsx12(
1689
+ return /* @__PURE__ */ jsxs11(Fragment2, { children: [
1690
+ !!unfulfilledItemsWithShipping.length && /* @__PURE__ */ jsx11(
1740
1691
  UnfulfilledItemDisplay,
1741
1692
  {
1742
1693
  order,
@@ -1744,7 +1695,7 @@ var UnfulfilledItemBreakdown = ({ order }) => {
1744
1695
  requiresShipping: true
1745
1696
  }
1746
1697
  ),
1747
- !!unfulfilledItemsWithoutShipping.length && /* @__PURE__ */ jsx12(
1698
+ !!unfulfilledItemsWithoutShipping.length && /* @__PURE__ */ jsx11(
1748
1699
  UnfulfilledItemDisplay,
1749
1700
  {
1750
1701
  order,
@@ -1759,19 +1710,19 @@ var UnfulfilledItemDisplay = ({
1759
1710
  unfulfilledItems,
1760
1711
  requiresShipping = false
1761
1712
  }) => {
1762
- const { t } = useTranslation12();
1713
+ const { t } = useTranslation11();
1763
1714
  if (order.status === "canceled") {
1764
1715
  return;
1765
1716
  }
1766
- return /* @__PURE__ */ jsxs12(Container8, { className: "divide-y p-0", "data-testid": "order-fulfillment-unfulfilled", children: [
1767
- /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "order-fulfillment-unfulfilled-header", children: [
1768
- /* @__PURE__ */ jsx12(Heading8, { level: "h2", "data-testid": "order-fulfillment-unfulfilled-heading", children: t("orders.fulfillment.unfulfilledItems") }),
1769
- /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-4", "data-testid": "order-fulfillment-unfulfilled-badges", children: [
1770
- requiresShipping && /* @__PURE__ */ jsx12(StatusBadge, { color: "red", className: "text-nowrap", "data-testid": "order-fulfillment-unfulfilled-requires-shipping-badge", children: t("orders.fulfillment.requiresShipping") }),
1771
- /* @__PURE__ */ jsx12(StatusBadge, { color: "red", className: "text-nowrap", "data-testid": "order-fulfillment-unfulfilled-awaiting-badge", children: t("orders.fulfillment.awaitingFulfillmentBadge") })
1717
+ return /* @__PURE__ */ jsxs11(Container7, { className: "divide-y p-0", "data-testid": "order-fulfillment-unfulfilled", children: [
1718
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "order-fulfillment-unfulfilled-header", children: [
1719
+ /* @__PURE__ */ jsx11(Heading7, { level: "h2", "data-testid": "order-fulfillment-unfulfilled-heading", children: t("orders.fulfillment.unfulfilledItems") }),
1720
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-x-4", "data-testid": "order-fulfillment-unfulfilled-badges", children: [
1721
+ requiresShipping && /* @__PURE__ */ jsx11(StatusBadge, { color: "red", className: "text-nowrap", "data-testid": "order-fulfillment-unfulfilled-requires-shipping-badge", children: t("orders.fulfillment.requiresShipping") }),
1722
+ /* @__PURE__ */ jsx11(StatusBadge, { color: "red", className: "text-nowrap", "data-testid": "order-fulfillment-unfulfilled-awaiting-badge", children: t("orders.fulfillment.awaitingFulfillmentBadge") })
1772
1723
  ] })
1773
1724
  ] }),
1774
- /* @__PURE__ */ jsx12("div", { "data-testid": "order-fulfillment-unfulfilled-items", children: unfulfilledItems.map((item) => /* @__PURE__ */ jsx12(
1725
+ /* @__PURE__ */ jsx11("div", { "data-testid": "order-fulfillment-unfulfilled-items", children: unfulfilledItems.map((item) => /* @__PURE__ */ jsx11(
1775
1726
  UnfulfilledItem,
1776
1727
  {
1777
1728
  item,
@@ -1785,7 +1736,7 @@ var Fulfillment = ({
1785
1736
  fulfillment,
1786
1737
  index
1787
1738
  }) => {
1788
- const { t } = useTranslation12();
1739
+ const { t } = useTranslation11();
1789
1740
  const showLocation = !!fulfillment.location_id;
1790
1741
  const isPickUpFulfillment = fulfillment.shipping_option?.service_zone.fulfillment_set.type === "pickup" /* Pickup */;
1791
1742
  const { stock_location, isError, error } = useStockLocation(
@@ -1815,77 +1766,77 @@ var Fulfillment = ({
1815
1766
  throw error;
1816
1767
  }
1817
1768
  const isValidUrl = (url) => url && url.length > 0 && url !== "#";
1818
- return /* @__PURE__ */ jsxs12(Container8, { className: "divide-y p-0", "data-testid": `order-fulfillment-${fulfillment.id}`, children: [
1819
- /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": `order-fulfillment-${fulfillment.id}-header`, children: [
1820
- /* @__PURE__ */ jsx12(Heading8, { level: "h2", "data-testid": `order-fulfillment-${fulfillment.id}-heading`, children: t("orders.fulfillment.number", {
1769
+ return /* @__PURE__ */ jsxs11(Container7, { className: "divide-y p-0", "data-testid": `order-fulfillment-${fulfillment.id}`, children: [
1770
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": `order-fulfillment-${fulfillment.id}-header`, children: [
1771
+ /* @__PURE__ */ jsx11(Heading7, { level: "h2", "data-testid": `order-fulfillment-${fulfillment.id}-heading`, children: t("orders.fulfillment.number", {
1821
1772
  number: index + 1
1822
1773
  }) }),
1823
- /* @__PURE__ */ jsx12("div", { className: "flex items-center gap-x-4", "data-testid": `order-fulfillment-${fulfillment.id}-status-container`, children: /* @__PURE__ */ jsx12(
1774
+ /* @__PURE__ */ jsx11("div", { className: "flex items-center gap-x-4", "data-testid": `order-fulfillment-${fulfillment.id}-status-container`, children: /* @__PURE__ */ jsx11(
1824
1775
  Tooltip2,
1825
1776
  {
1826
1777
  content: format(
1827
1778
  new Date(statusTimestamp),
1828
1779
  "dd MMM, yyyy, HH:mm:ss"
1829
1780
  ),
1830
- children: /* @__PURE__ */ jsx12(StatusBadge, { color: statusColor, className: "text-nowrap", "data-testid": `order-fulfillment-${fulfillment.id}-status-badge`, children: statusText })
1781
+ children: /* @__PURE__ */ jsx11(StatusBadge, { color: statusColor, className: "text-nowrap", "data-testid": `order-fulfillment-${fulfillment.id}-status-badge`, children: statusText })
1831
1782
  }
1832
1783
  ) })
1833
1784
  ] }),
1834
- /* @__PURE__ */ jsxs12("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1835
- /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.itemsLabel") }),
1836
- /* @__PURE__ */ jsx12("ul", { children: fulfillment.items.map((f_item) => /* @__PURE__ */ jsx12("li", { children: /* @__PURE__ */ jsxs12(Text9, { size: "small", leading: "compact", children: [
1785
+ /* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1786
+ /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.itemsLabel") }),
1787
+ /* @__PURE__ */ jsx11("ul", { children: fulfillment.items.map((f_item) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsxs11(Text8, { size: "small", leading: "compact", children: [
1837
1788
  f_item.quantity,
1838
1789
  "x ",
1839
1790
  f_item.title
1840
1791
  ] }) }, f_item.line_item_id)) })
1841
1792
  ] }),
1842
- showLocation && /* @__PURE__ */ jsxs12("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1843
- /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.shippingFromLabel") }),
1844
- stock_location ? /* @__PURE__ */ jsx12(
1793
+ showLocation && /* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1794
+ /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.shippingFromLabel") }),
1795
+ stock_location ? /* @__PURE__ */ jsx11(
1845
1796
  Link2,
1846
1797
  {
1847
1798
  to: `/settings/locations/${stock_location.id}`,
1848
1799
  className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
1849
- children: /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", children: stock_location.name })
1800
+ children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: stock_location.name })
1850
1801
  }
1851
- ) : /* @__PURE__ */ jsx12(Skeleton, { className: "w-16" })
1802
+ ) : /* @__PURE__ */ jsx11(Skeleton, { className: "w-16" })
1852
1803
  ] }),
1853
- /* @__PURE__ */ jsxs12("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1854
- /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", weight: "plus", children: t("fields.provider") }),
1855
- /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", children: formatProvider(fulfillment.provider_id) })
1804
+ /* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1805
+ /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("fields.provider") }),
1806
+ /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: formatProvider(fulfillment.provider_id) })
1856
1807
  ] }),
1857
- /* @__PURE__ */ jsxs12("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1858
- /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.trackingLabel") }),
1859
- /* @__PURE__ */ jsx12("div", { children: fulfillment.labels && fulfillment.labels.length > 0 ? /* @__PURE__ */ jsx12("ul", { children: fulfillment.labels.map((tlink) => {
1808
+ /* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1809
+ /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.trackingLabel") }),
1810
+ /* @__PURE__ */ jsx11("div", { children: fulfillment.labels && fulfillment.labels.length > 0 ? /* @__PURE__ */ jsx11("ul", { children: fulfillment.labels.map((tlink) => {
1860
1811
  const hasTrackingUrl = isValidUrl(tlink.tracking_url);
1861
1812
  const hasLabelUrl = isValidUrl(tlink.label_url);
1862
1813
  if (hasTrackingUrl || hasLabelUrl) {
1863
- return /* @__PURE__ */ jsxs12("li", { children: [
1864
- hasTrackingUrl && /* @__PURE__ */ jsx12(
1814
+ return /* @__PURE__ */ jsxs11("li", { children: [
1815
+ hasTrackingUrl && /* @__PURE__ */ jsx11(
1865
1816
  "a",
1866
1817
  {
1867
1818
  href: tlink.tracking_url,
1868
1819
  target: "_blank",
1869
1820
  rel: "noopener noreferrer",
1870
1821
  className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
1871
- children: /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", as: "span", children: tlink.tracking_number })
1822
+ children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", as: "span", children: tlink.tracking_number })
1872
1823
  }
1873
1824
  ),
1874
1825
  hasTrackingUrl && hasLabelUrl && " - ",
1875
- hasLabelUrl && /* @__PURE__ */ jsx12(
1826
+ hasLabelUrl && /* @__PURE__ */ jsx11(
1876
1827
  "a",
1877
1828
  {
1878
1829
  href: tlink.label_url,
1879
1830
  target: "_blank",
1880
1831
  rel: "noopener noreferrer",
1881
1832
  className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
1882
- children: /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", as: "span", children: t("orders.fulfillment.labelLink") })
1833
+ children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", as: "span", children: t("orders.fulfillment.labelLink") })
1883
1834
  }
1884
1835
  )
1885
1836
  ] }, tlink.tracking_number);
1886
1837
  }
1887
- return /* @__PURE__ */ jsx12("li", { children: /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", children: tlink.tracking_number }) }, tlink.tracking_number);
1888
- }) }) : /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", children: "-" }) })
1838
+ return /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: tlink.tracking_number }) }, tlink.tracking_number);
1839
+ }) }) : /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: "-" }) })
1889
1840
  ] })
1890
1841
  ] });
1891
1842
  };
@@ -1893,17 +1844,17 @@ var Fulfillment = ({
1893
1844
  // src/pages/orders/order-detail/components/order-general-section/order-general-section.tsx
1894
1845
  import { XCircle } from "@medusajs/icons";
1895
1846
  import {
1896
- Container as Container9,
1847
+ Container as Container8,
1897
1848
  Copy as Copy4,
1898
- Heading as Heading9,
1849
+ Heading as Heading8,
1899
1850
  StatusBadge as StatusBadge2,
1900
- Text as Text10,
1851
+ Text as Text9,
1901
1852
  toast as toast6,
1902
1853
  usePrompt as usePrompt2
1903
1854
  } from "@medusajs/ui";
1904
- import { useTranslation as useTranslation13 } from "react-i18next";
1905
- import { DisplayExtensionZone as DisplayExtensionZone4, DisplayField } from "@mercurjs/dashboard-shared";
1906
- import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
1855
+ import { useTranslation as useTranslation12 } from "react-i18next";
1856
+ import { DisplayExtensionZone as DisplayExtensionZone3, DisplayField } from "@mercurjs/dashboard-shared";
1857
+ import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
1907
1858
  var GENERAL_FIELD_IDS = [
1908
1859
  "display_id",
1909
1860
  "created_at",
@@ -1912,7 +1863,7 @@ var GENERAL_FIELD_IDS = [
1912
1863
  "fulfillment_status"
1913
1864
  ];
1914
1865
  var OrderGeneralSection = ({ order }) => {
1915
- const { t } = useTranslation13();
1866
+ const { t } = useTranslation12();
1916
1867
  const prompt = usePrompt2();
1917
1868
  const { getFullDate } = useDate();
1918
1869
  const { mutateAsync: cancelOrder } = useCancelOrder(order.id);
@@ -1943,27 +1894,27 @@ var OrderGeneralSection = ({ order }) => {
1943
1894
  }
1944
1895
  });
1945
1896
  };
1946
- return /* @__PURE__ */ jsxs13(Container9, { className: "flex items-center justify-between px-6 py-4", "data-testid": "order-general-section", children: [
1947
- /* @__PURE__ */ jsxs13("div", { children: [
1948
- /* @__PURE__ */ jsx13(DisplayField, { model: "order", zone: "general", id: "display_id", data: order, children: /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-x-1", "data-testid": "order-general-section-id-container", children: [
1949
- /* @__PURE__ */ jsxs13(Heading9, { "data-testid": "order-general-section-id-heading", children: [
1897
+ return /* @__PURE__ */ jsxs12(Container8, { className: "flex items-center justify-between px-6 py-4", "data-testid": "order-general-section", children: [
1898
+ /* @__PURE__ */ jsxs12("div", { children: [
1899
+ /* @__PURE__ */ jsx12(DisplayField, { model: "order", zone: "general", id: "display_id", data: order, children: /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-1", "data-testid": "order-general-section-id-container", children: [
1900
+ /* @__PURE__ */ jsxs12(Heading8, { "data-testid": "order-general-section-id-heading", children: [
1950
1901
  "#",
1951
1902
  order.display_id
1952
1903
  ] }),
1953
- /* @__PURE__ */ jsx13(Copy4, { content: `#${order.display_id}`, className: "text-ui-fg-muted", "data-testid": "order-general-section-id-copy" })
1904
+ /* @__PURE__ */ jsx12(Copy4, { content: `#${order.display_id}`, className: "text-ui-fg-muted", "data-testid": "order-general-section-id-copy" })
1954
1905
  ] }) }),
1955
- /* @__PURE__ */ jsx13(DisplayField, { model: "order", zone: "general", id: "created_at", data: order, children: /* @__PURE__ */ jsx13(Text10, { size: "small", className: "text-ui-fg-subtle", "data-testid": "order-general-section-date", children: t("orders.onDateFromSalesChannel", {
1906
+ /* @__PURE__ */ jsx12(DisplayField, { model: "order", zone: "general", id: "created_at", data: order, children: /* @__PURE__ */ jsx12(Text9, { size: "small", className: "text-ui-fg-subtle", "data-testid": "order-general-section-date", children: t("orders.onDateFromSalesChannel", {
1956
1907
  date: getFullDate({ date: order.created_at, includeTime: true }),
1957
1908
  salesChannel: order.sales_channel?.name
1958
1909
  }) }) })
1959
1910
  ] }),
1960
- /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-x-4", "data-testid": "order-general-section-badges-container", children: [
1961
- /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-x-1.5", "data-testid": "order-general-section-badges", children: [
1962
- /* @__PURE__ */ jsx13(DisplayField, { model: "order", zone: "general", id: "status", data: order, children: /* @__PURE__ */ jsx13(OrderBadge, { order }) }),
1963
- /* @__PURE__ */ jsx13(DisplayField, { model: "order", zone: "general", id: "payment_status", data: order, children: /* @__PURE__ */ jsx13(PaymentBadge, { order }) }),
1964
- /* @__PURE__ */ jsx13(DisplayField, { model: "order", zone: "general", id: "fulfillment_status", data: order, children: /* @__PURE__ */ jsx13(FulfillmentBadge, { order }) })
1911
+ /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-4", "data-testid": "order-general-section-badges-container", children: [
1912
+ /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-1.5", "data-testid": "order-general-section-badges", children: [
1913
+ /* @__PURE__ */ jsx12(DisplayField, { model: "order", zone: "general", id: "status", data: order, children: /* @__PURE__ */ jsx12(OrderBadge, { order }) }),
1914
+ /* @__PURE__ */ jsx12(DisplayField, { model: "order", zone: "general", id: "payment_status", data: order, children: /* @__PURE__ */ jsx12(PaymentBadge, { order }) }),
1915
+ /* @__PURE__ */ jsx12(DisplayField, { model: "order", zone: "general", id: "fulfillment_status", data: order, children: /* @__PURE__ */ jsx12(FulfillmentBadge, { order }) })
1965
1916
  ] }),
1966
- /* @__PURE__ */ jsx13(
1917
+ /* @__PURE__ */ jsx12(
1967
1918
  ActionMenu,
1968
1919
  {
1969
1920
  groups: [
@@ -1974,7 +1925,7 @@ var OrderGeneralSection = ({ order }) => {
1974
1925
  onClick: handleCancel,
1975
1926
  disabled: cancelDisabled,
1976
1927
  disabledTooltip: cancelDisabledTooltip,
1977
- icon: /* @__PURE__ */ jsx13(XCircle, {})
1928
+ icon: /* @__PURE__ */ jsx12(XCircle, {})
1978
1929
  }
1979
1930
  ]
1980
1931
  }
@@ -1983,8 +1934,8 @@ var OrderGeneralSection = ({ order }) => {
1983
1934
  }
1984
1935
  )
1985
1936
  ] }),
1986
- /* @__PURE__ */ jsx13(
1987
- DisplayExtensionZone4,
1937
+ /* @__PURE__ */ jsx12(
1938
+ DisplayExtensionZone3,
1988
1939
  {
1989
1940
  model: "order",
1990
1941
  zone: "general",
@@ -1995,41 +1946,41 @@ var OrderGeneralSection = ({ order }) => {
1995
1946
  ] });
1996
1947
  };
1997
1948
  var FulfillmentBadge = ({ order }) => {
1998
- const { t } = useTranslation13();
1949
+ const { t } = useTranslation12();
1999
1950
  const { label, color } = getOrderFulfillmentStatus(
2000
1951
  t,
2001
1952
  order.fulfillment_status
2002
1953
  );
2003
- return /* @__PURE__ */ jsx13(StatusBadge2, { color, className: "text-nowrap", "data-testid": "order-general-section-fulfillment-badge", children: label });
1954
+ return /* @__PURE__ */ jsx12(StatusBadge2, { color, className: "text-nowrap", "data-testid": "order-general-section-fulfillment-badge", children: label });
2004
1955
  };
2005
1956
  var PaymentBadge = ({ order }) => {
2006
- const { t } = useTranslation13();
1957
+ const { t } = useTranslation12();
2007
1958
  const { label, color } = getOrderPaymentStatus(t, order.payment_status);
2008
- return /* @__PURE__ */ jsx13(StatusBadge2, { color, className: "text-nowrap", "data-testid": "order-general-section-payment-badge", children: label });
1959
+ return /* @__PURE__ */ jsx12(StatusBadge2, { color, className: "text-nowrap", "data-testid": "order-general-section-payment-badge", children: label });
2009
1960
  };
2010
1961
  var OrderBadge = ({ order }) => {
2011
- const { t } = useTranslation13();
1962
+ const { t } = useTranslation12();
2012
1963
  const orderStatus = getCanceledOrderStatus(t, order.status);
2013
1964
  if (!orderStatus) {
2014
1965
  return null;
2015
1966
  }
2016
- return /* @__PURE__ */ jsx13(StatusBadge2, { color: orderStatus.color, className: "text-nowrap", "data-testid": "order-general-section-order-badge", children: orderStatus.label });
1967
+ return /* @__PURE__ */ jsx12(StatusBadge2, { color: orderStatus.color, className: "text-nowrap", "data-testid": "order-general-section-order-badge", children: orderStatus.label });
2017
1968
  };
2018
1969
 
2019
1970
  // src/components/common/display-id/display-id.tsx
2020
- import { useTranslation as useTranslation14 } from "react-i18next";
1971
+ import { useTranslation as useTranslation13 } from "react-i18next";
2021
1972
  import { useState as useState4 } from "react";
2022
1973
  import copy from "copy-to-clipboard";
2023
1974
  import { clx as clx2, toast as toast7, Tooltip as Tooltip3 } from "@medusajs/ui";
2024
- import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
1975
+ import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
2025
1976
  function DisplayId({ id, className }) {
2026
- const { t } = useTranslation14();
1977
+ const { t } = useTranslation13();
2027
1978
  const [open, setOpen] = useState4(false);
2028
1979
  const onClick = () => {
2029
1980
  copy(id);
2030
1981
  toast7.success(t("actions.idCopiedToClipboard"));
2031
1982
  };
2032
- return /* @__PURE__ */ jsx14(Tooltip3, { maxWidth: 260, content: id, open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs14("span", { onClick, className: clx2("cursor-pointer", className), children: [
1983
+ return /* @__PURE__ */ jsx13(Tooltip3, { maxWidth: 260, content: id, open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs13("span", { onClick, className: clx2("cursor-pointer", className), children: [
2033
1984
  "#",
2034
1985
  id.slice(-7)
2035
1986
  ] }) });
@@ -2051,29 +2002,29 @@ import { ArrowDownRightMini, DocumentText, XCircle as XCircle2 } from "@medusajs
2051
2002
  import {
2052
2003
  Badge,
2053
2004
  Button as Button6,
2054
- Container as Container10,
2055
- Heading as Heading10,
2005
+ Container as Container9,
2006
+ Heading as Heading9,
2056
2007
  StatusBadge as StatusBadge3,
2057
- Text as Text11,
2008
+ Text as Text10,
2058
2009
  toast as toast8,
2059
2010
  Tooltip as Tooltip4,
2060
2011
  usePrompt as usePrompt3
2061
2012
  } from "@medusajs/ui";
2062
- import { DisplayExtensionZone as DisplayExtensionZone5 } from "@mercurjs/dashboard-shared";
2013
+ import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
2063
2014
  import { format as format2 } from "date-fns";
2064
- import { Trans, useTranslation as useTranslation15 } from "react-i18next";
2065
- import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
2015
+ import { Trans, useTranslation as useTranslation14 } from "react-i18next";
2016
+ import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
2066
2017
  var OrderPaymentSection = ({ order }) => {
2067
2018
  const payments = getPaymentsFromOrder(order);
2068
2019
  const refunds = payments.map((payment) => payment?.refunds).flat(1).filter(Boolean);
2069
- return /* @__PURE__ */ jsxs15(
2070
- Container10,
2020
+ return /* @__PURE__ */ jsxs14(
2021
+ Container9,
2071
2022
  {
2072
2023
  className: "divide-y p-0",
2073
2024
  "data-testid": "order-payment-section",
2074
2025
  children: [
2075
- /* @__PURE__ */ jsx15(Header2, { order }),
2076
- /* @__PURE__ */ jsx15(
2026
+ /* @__PURE__ */ jsx14(Header2, { order }),
2027
+ /* @__PURE__ */ jsx14(
2077
2028
  PaymentBreakdown,
2078
2029
  {
2079
2030
  order,
@@ -2082,23 +2033,23 @@ var OrderPaymentSection = ({ order }) => {
2082
2033
  currencyCode: order.currency_code
2083
2034
  }
2084
2035
  ),
2085
- /* @__PURE__ */ jsx15(Total, { order }),
2086
- /* @__PURE__ */ jsx15(DisplayExtensionZone5, { model: "order", zone: "payment", data: order })
2036
+ /* @__PURE__ */ jsx14(Total, { order }),
2037
+ /* @__PURE__ */ jsx14(DisplayExtensionZone4, { model: "order", zone: "payment", data: order })
2087
2038
  ]
2088
2039
  }
2089
2040
  );
2090
2041
  };
2091
2042
  var Header2 = ({ order }) => {
2092
- const { t } = useTranslation15();
2043
+ const { t } = useTranslation14();
2093
2044
  const { label, color } = getOrderPaymentStatus(t, order.payment_status);
2094
- return /* @__PURE__ */ jsxs15(
2045
+ return /* @__PURE__ */ jsxs14(
2095
2046
  "div",
2096
2047
  {
2097
2048
  className: "flex items-center justify-between px-6 py-4",
2098
2049
  "data-testid": "order-payment-header",
2099
2050
  children: [
2100
- /* @__PURE__ */ jsx15(Heading10, { level: "h2", "data-testid": "order-payment-heading", children: t("orders.payment.title") }),
2101
- /* @__PURE__ */ jsx15(
2051
+ /* @__PURE__ */ jsx14(Heading9, { level: "h2", "data-testid": "order-payment-heading", children: t("orders.payment.title") }),
2052
+ /* @__PURE__ */ jsx14(
2102
2053
  StatusBadge3,
2103
2054
  {
2104
2055
  color,
@@ -2115,8 +2066,8 @@ var Refund = ({
2115
2066
  refund,
2116
2067
  currencyCode
2117
2068
  }) => {
2118
- const { t } = useTranslation15();
2119
- const RefundReasonBadge = refund?.refund_reason && /* @__PURE__ */ jsx15(
2069
+ const { t } = useTranslation14();
2070
+ const RefundReasonBadge = refund?.refund_reason && /* @__PURE__ */ jsx14(
2120
2071
  Badge,
2121
2072
  {
2122
2073
  size: "2xsmall",
@@ -2126,27 +2077,27 @@ var Refund = ({
2126
2077
  children: refund.refund_reason.label
2127
2078
  }
2128
2079
  );
2129
- const RefundNoteIndicator = refund.note && /* @__PURE__ */ jsx15(Tooltip4, { content: refund.note, children: /* @__PURE__ */ jsx15(DocumentText, { className: "ml-1 inline text-ui-tag-neutral-icon" }) });
2130
- return /* @__PURE__ */ jsxs15("div", { className: "flex items-start gap-x-4 bg-ui-bg-subtle px-6 py-4 text-ui-fg-subtle sm:items-center", children: [
2131
- /* @__PURE__ */ jsxs15("div", { className: "flex flex-1 flex-col gap-3 sm:flex-row sm:items-center", children: [
2132
- /* @__PURE__ */ jsxs15("div", { className: "flex shrink-0 flex-row items-center gap-x-3", children: [
2133
- /* @__PURE__ */ jsx15(ArrowDownRightMini, { className: "text-ui-fg-muted" }),
2134
- /* @__PURE__ */ jsxs15("div", { children: [
2135
- /* @__PURE__ */ jsx15(Text11, { size: "small", leading: "compact", weight: "plus", children: t("orders.payment.refund") }),
2136
- /* @__PURE__ */ jsx15(Text11, { size: "small", leading: "compact", children: format2(new Date(refund.created_at), "dd MMM, yyyy, HH:mm:ss") })
2080
+ const RefundNoteIndicator = refund.note && /* @__PURE__ */ jsx14(Tooltip4, { content: refund.note, children: /* @__PURE__ */ jsx14(DocumentText, { className: "ml-1 inline text-ui-tag-neutral-icon" }) });
2081
+ return /* @__PURE__ */ jsxs14("div", { className: "flex items-start gap-x-4 bg-ui-bg-subtle px-6 py-4 text-ui-fg-subtle sm:items-center", children: [
2082
+ /* @__PURE__ */ jsxs14("div", { className: "flex flex-1 flex-col gap-3 sm:flex-row sm:items-center", children: [
2083
+ /* @__PURE__ */ jsxs14("div", { className: "flex shrink-0 flex-row items-center gap-x-3", children: [
2084
+ /* @__PURE__ */ jsx14(ArrowDownRightMini, { className: "text-ui-fg-muted" }),
2085
+ /* @__PURE__ */ jsxs14("div", { children: [
2086
+ /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", weight: "plus", children: t("orders.payment.refund") }),
2087
+ /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: format2(new Date(refund.created_at), "dd MMM, yyyy, HH:mm:ss") })
2137
2088
  ] })
2138
2089
  ] }),
2139
- /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-x-3", children: [
2140
- /* @__PURE__ */ jsx15("div", { className: "shrink-0", children: RefundNoteIndicator }),
2090
+ /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-x-3", children: [
2091
+ /* @__PURE__ */ jsx14("div", { className: "shrink-0", children: RefundNoteIndicator }),
2141
2092
  RefundReasonBadge
2142
2093
  ] })
2143
2094
  ] }),
2144
- /* @__PURE__ */ jsxs15("div", { className: "flex shrink-0 items-center justify-end gap-4", children: [
2145
- /* @__PURE__ */ jsxs15(Text11, { size: "small", leading: "compact", children: [
2095
+ /* @__PURE__ */ jsxs14("div", { className: "flex shrink-0 items-center justify-end gap-4", children: [
2096
+ /* @__PURE__ */ jsxs14(Text10, { size: "small", leading: "compact", children: [
2146
2097
  "- ",
2147
2098
  getLocaleAmount(refund.amount, currencyCode)
2148
2099
  ] }),
2149
- /* @__PURE__ */ jsx15("div", { className: "h-7 w-5" })
2100
+ /* @__PURE__ */ jsx14("div", { className: "h-7 w-5" })
2150
2101
  ] })
2151
2102
  ] });
2152
2103
  };
@@ -2156,7 +2107,7 @@ var Payment = ({
2156
2107
  refunds,
2157
2108
  currencyCode
2158
2109
  }) => {
2159
- const { t } = useTranslation15();
2110
+ const { t } = useTranslation14();
2160
2111
  const prompt = usePrompt3();
2161
2112
  const { mutateAsync } = useCapturePayment(order.id, payment.id);
2162
2113
  const handleCapture = async () => {
@@ -2200,32 +2151,32 @@ var Payment = ({
2200
2151
  const [status, color] = getPaymentStatusAttributes(payment);
2201
2152
  const showCapture = payment.captured_at === null && payment.canceled_at === null;
2202
2153
  const totalRefunded = payment.refunds?.reduce((acc, next) => next.amount + acc, 0) ?? 0;
2203
- return /* @__PURE__ */ jsxs15(
2154
+ return /* @__PURE__ */ jsxs14(
2204
2155
  "div",
2205
2156
  {
2206
2157
  className: "divide-y",
2207
2158
  "data-testid": `order-payment-${payment.id}`,
2208
2159
  children: [
2209
- /* @__PURE__ */ jsxs15(
2160
+ /* @__PURE__ */ jsxs14(
2210
2161
  "div",
2211
2162
  {
2212
2163
  className: "grid grid-cols-[1fr_1fr_1fr_20px] items-center gap-x-4 px-6 py-4 text-ui-fg-subtle sm:grid-cols-[1fr_1fr_1fr_1fr_20px]",
2213
2164
  "data-testid": `order-payment-${payment.id}-row`,
2214
2165
  children: [
2215
- /* @__PURE__ */ jsxs15("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
2216
- /* @__PURE__ */ jsx15(
2217
- Text11,
2166
+ /* @__PURE__ */ jsxs14("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
2167
+ /* @__PURE__ */ jsx14(
2168
+ Text10,
2218
2169
  {
2219
2170
  size: "small",
2220
2171
  leading: "compact",
2221
2172
  weight: "plus",
2222
2173
  className: "truncate",
2223
2174
  "data-testid": `order-payment-${payment.id}-id`,
2224
- children: /* @__PURE__ */ jsx15(display_id_default, { id: payment.id })
2175
+ children: /* @__PURE__ */ jsx14(display_id_default, { id: payment.id })
2225
2176
  }
2226
2177
  ),
2227
- /* @__PURE__ */ jsx15(
2228
- Text11,
2178
+ /* @__PURE__ */ jsx14(
2179
+ Text10,
2229
2180
  {
2230
2181
  size: "small",
2231
2182
  leading: "compact",
@@ -2234,8 +2185,8 @@ var Payment = ({
2234
2185
  }
2235
2186
  )
2236
2187
  ] }),
2237
- /* @__PURE__ */ jsx15("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsx15(
2238
- Text11,
2188
+ /* @__PURE__ */ jsx14("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsx14(
2189
+ Text10,
2239
2190
  {
2240
2191
  size: "small",
2241
2192
  leading: "compact",
@@ -2244,7 +2195,7 @@ var Payment = ({
2244
2195
  children: payment.provider_id
2245
2196
  }
2246
2197
  ) }),
2247
- /* @__PURE__ */ jsx15("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx15(
2198
+ /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx14(
2248
2199
  StatusBadge3,
2249
2200
  {
2250
2201
  color,
@@ -2253,8 +2204,8 @@ var Payment = ({
2253
2204
  children: status
2254
2205
  }
2255
2206
  ) }),
2256
- /* @__PURE__ */ jsx15("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx15(
2257
- Text11,
2207
+ /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx14(
2208
+ Text10,
2258
2209
  {
2259
2210
  size: "small",
2260
2211
  leading: "compact",
@@ -2262,7 +2213,7 @@ var Payment = ({
2262
2213
  children: getLocaleAmount(payment.amount, payment.currency_code)
2263
2214
  }
2264
2215
  ) }),
2265
- /* @__PURE__ */ jsx15(
2216
+ /* @__PURE__ */ jsx14(
2266
2217
  ActionMenu,
2267
2218
  {
2268
2219
  groups: [
@@ -2270,7 +2221,7 @@ var Payment = ({
2270
2221
  actions: [
2271
2222
  {
2272
2223
  label: t("orders.payment.createRefund"),
2273
- icon: /* @__PURE__ */ jsx15(XCircle2, {}),
2224
+ icon: /* @__PURE__ */ jsx14(XCircle2, {}),
2274
2225
  to: `/orders/${order.id}/refund?paymentId=${payment.id}`,
2275
2226
  disabled: !payment.captured_at || !!payment.canceled_at || totalRefunded >= payment.amount
2276
2227
  }
@@ -2283,23 +2234,23 @@ var Payment = ({
2283
2234
  ]
2284
2235
  }
2285
2236
  ),
2286
- showCapture && /* @__PURE__ */ jsxs15(
2237
+ showCapture && /* @__PURE__ */ jsxs14(
2287
2238
  "div",
2288
2239
  {
2289
2240
  className: "flex items-center justify-between bg-ui-bg-subtle px-6 py-4",
2290
2241
  "data-testid": `order-payment-${payment.id}-capture-section`,
2291
2242
  children: [
2292
- /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-x-2", children: [
2293
- /* @__PURE__ */ jsx15(ArrowDownRightMini, { className: "shrink-0 text-ui-fg-muted" }),
2294
- /* @__PURE__ */ jsx15(Text11, { size: "small", leading: "compact", children: /* @__PURE__ */ jsx15(
2243
+ /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-x-2", children: [
2244
+ /* @__PURE__ */ jsx14(ArrowDownRightMini, { className: "shrink-0 text-ui-fg-muted" }),
2245
+ /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: /* @__PURE__ */ jsx14(
2295
2246
  Trans,
2296
2247
  {
2297
2248
  i18nKey: "orders.payment.isReadyToBeCaptured",
2298
- components: [/* @__PURE__ */ jsx15(display_id_default, { id: payment.id }, payment.id)]
2249
+ components: [/* @__PURE__ */ jsx14(display_id_default, { id: payment.id }, payment.id)]
2299
2250
  }
2300
2251
  ) })
2301
2252
  ] }),
2302
- /* @__PURE__ */ jsxs15(
2253
+ /* @__PURE__ */ jsxs14(
2303
2254
  Button6,
2304
2255
  {
2305
2256
  className: "shrink-0",
@@ -2308,15 +2259,15 @@ var Payment = ({
2308
2259
  onClick: handleCapture,
2309
2260
  "data-testid": `order-payment-${payment.id}-capture-button`,
2310
2261
  children: [
2311
- /* @__PURE__ */ jsx15("span", { className: "hidden sm:block", children: t("orders.payment.capture") }),
2312
- /* @__PURE__ */ jsx15("span", { className: "sm:hidden", children: t("orders.payment.capture_short") })
2262
+ /* @__PURE__ */ jsx14("span", { className: "hidden sm:block", children: t("orders.payment.capture") }),
2263
+ /* @__PURE__ */ jsx14("span", { className: "sm:hidden", children: t("orders.payment.capture_short") })
2313
2264
  ]
2314
2265
  }
2315
2266
  )
2316
2267
  ]
2317
2268
  }
2318
2269
  ),
2319
- refunds.map((refund) => /* @__PURE__ */ jsx15(Refund, { refund, currencyCode }, refund.id))
2270
+ refunds.map((refund) => /* @__PURE__ */ jsx14(Refund, { refund, currencyCode }, refund.id))
2320
2271
  ]
2321
2272
  }
2322
2273
  );
@@ -2329,31 +2280,31 @@ var CreditLine = ({
2329
2280
  return null;
2330
2281
  }
2331
2282
  const prettyReference = creditLine.reference?.split("_").join(" ").split("-").join(" ");
2332
- const prettyReferenceId = creditLine.reference_id ? /* @__PURE__ */ jsx15(display_id_default, { id: creditLine.reference_id }) : null;
2333
- return /* @__PURE__ */ jsx15("div", { className: "divide-y", children: /* @__PURE__ */ jsxs15("div", { className: "grid grid-cols-[1fr_1fr_20px] items-center gap-x-4 px-6 py-4 text-ui-fg-subtle sm:grid-cols-[1fr_1fr_1fr_20px]", children: [
2334
- /* @__PURE__ */ jsxs15("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
2335
- /* @__PURE__ */ jsx15(
2336
- Text11,
2283
+ const prettyReferenceId = creditLine.reference_id ? /* @__PURE__ */ jsx14(display_id_default, { id: creditLine.reference_id }) : null;
2284
+ return /* @__PURE__ */ jsx14("div", { className: "divide-y", children: /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-[1fr_1fr_20px] items-center gap-x-4 px-6 py-4 text-ui-fg-subtle sm:grid-cols-[1fr_1fr_1fr_20px]", children: [
2285
+ /* @__PURE__ */ jsxs14("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
2286
+ /* @__PURE__ */ jsx14(
2287
+ Text10,
2337
2288
  {
2338
2289
  size: "small",
2339
2290
  leading: "compact",
2340
2291
  weight: "plus",
2341
2292
  className: "truncate",
2342
- children: /* @__PURE__ */ jsx15(display_id_default, { id: creditLine.id })
2293
+ children: /* @__PURE__ */ jsx14(display_id_default, { id: creditLine.id })
2343
2294
  }
2344
2295
  ),
2345
- /* @__PURE__ */ jsx15(Text11, { size: "small", leading: "compact", children: creditLine.created_at ? format2(
2296
+ /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: creditLine.created_at ? format2(
2346
2297
  new Date(creditLine.created_at),
2347
2298
  "dd MMM, yyyy, HH:mm:ss"
2348
2299
  ) : "-" })
2349
2300
  ] }),
2350
- /* @__PURE__ */ jsx15("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsxs15(Text11, { size: "small", leading: "compact", className: "capitalize", children: [
2301
+ /* @__PURE__ */ jsx14("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsxs14(Text10, { size: "small", leading: "compact", className: "capitalize", children: [
2351
2302
  prettyReference,
2352
2303
  " (",
2353
2304
  prettyReferenceId,
2354
2305
  ")"
2355
2306
  ] }) }),
2356
- /* @__PURE__ */ jsx15("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx15(Text11, { size: "small", leading: "compact", children: getLocaleAmount(creditLine.amount, currencyCode) }) })
2307
+ /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: getLocaleAmount(creditLine.amount, currencyCode) }) })
2357
2308
  ] }) });
2358
2309
  };
2359
2310
  var PaymentBreakdown = ({
@@ -2376,7 +2327,7 @@ var PaymentBreakdown = ({
2376
2327
  }
2377
2328
  return { event: entry, type };
2378
2329
  });
2379
- return /* @__PURE__ */ jsx15(
2330
+ return /* @__PURE__ */ jsx14(
2380
2331
  "div",
2381
2332
  {
2382
2333
  className: "flex flex-col divide-y",
@@ -2384,7 +2335,7 @@ var PaymentBreakdown = ({
2384
2335
  children: entries.map(({ type, event }) => {
2385
2336
  switch (type) {
2386
2337
  case "payment":
2387
- return /* @__PURE__ */ jsx15(
2338
+ return /* @__PURE__ */ jsx14(
2388
2339
  Payment,
2389
2340
  {
2390
2341
  order,
@@ -2397,7 +2348,7 @@ var PaymentBreakdown = ({
2397
2348
  event.id
2398
2349
  );
2399
2350
  case "refund":
2400
- return /* @__PURE__ */ jsx15(
2351
+ return /* @__PURE__ */ jsx14(
2401
2352
  Refund,
2402
2353
  {
2403
2354
  refund: event,
@@ -2406,7 +2357,7 @@ var PaymentBreakdown = ({
2406
2357
  event.id
2407
2358
  );
2408
2359
  case "credit_line_refund":
2409
- return /* @__PURE__ */ jsx15(
2360
+ return /* @__PURE__ */ jsx14(
2410
2361
  CreditLine,
2411
2362
  {
2412
2363
  creditLine: event,
@@ -2420,36 +2371,36 @@ var PaymentBreakdown = ({
2420
2371
  );
2421
2372
  };
2422
2373
  var Total = ({ order }) => {
2423
- const { t } = useTranslation15();
2374
+ const { t } = useTranslation14();
2424
2375
  const totalPending = getTotalPending(order.payment_collections);
2425
- return /* @__PURE__ */ jsxs15(
2376
+ return /* @__PURE__ */ jsxs14(
2426
2377
  "div",
2427
2378
  {
2428
2379
  className: "flex flex-col gap-y-4 px-6 py-4",
2429
2380
  "data-testid": "order-payment-total",
2430
2381
  children: [
2431
- /* @__PURE__ */ jsxs15(
2382
+ /* @__PURE__ */ jsxs14(
2432
2383
  "div",
2433
2384
  {
2434
2385
  className: "flex items-center justify-between",
2435
2386
  "data-testid": "order-payment-total-paid",
2436
2387
  children: [
2437
- /* @__PURE__ */ jsx15(Text11, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPaidByCustomer") }),
2438
- /* @__PURE__ */ jsx15(Text11, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(
2388
+ /* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPaidByCustomer") }),
2389
+ /* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(
2439
2390
  getTotalCaptured(order.payment_collections),
2440
2391
  order.currency_code
2441
2392
  ) })
2442
2393
  ]
2443
2394
  }
2444
2395
  ),
2445
- order.status !== "canceled" && totalPending > 0 && /* @__PURE__ */ jsxs15(
2396
+ order.status !== "canceled" && totalPending > 0 && /* @__PURE__ */ jsxs14(
2446
2397
  "div",
2447
2398
  {
2448
2399
  className: "flex items-center justify-between",
2449
2400
  "data-testid": "order-payment-total-pending",
2450
2401
  children: [
2451
- /* @__PURE__ */ jsx15(Text11, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPending") }),
2452
- /* @__PURE__ */ jsx15(Text11, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(totalPending, order.currency_code) })
2402
+ /* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPending") }),
2403
+ /* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(totalPending, order.currency_code) })
2453
2404
  ]
2454
2405
  }
2455
2406
  )
@@ -2459,8 +2410,8 @@ var Total = ({ order }) => {
2459
2410
  };
2460
2411
 
2461
2412
  // src/pages/orders/order-detail/components/order-summary-section/order-summary-section.tsx
2462
- import { useMemo as useMemo4, useState as useState6 } from "react";
2463
- import { useTranslation as useTranslation18 } from "react-i18next";
2413
+ import { useMemo as useMemo3, useState as useState6 } from "react";
2414
+ import { useTranslation as useTranslation17 } from "react-i18next";
2464
2415
  import { Link as Link3 } from "react-router-dom";
2465
2416
  import {
2466
2417
  ArrowDownRightMini as ArrowDownRightMini2,
@@ -2475,16 +2426,16 @@ import {
2475
2426
  Badge as Badge4,
2476
2427
  Button as Button7,
2477
2428
  clx as clx3,
2478
- Container as Container11,
2429
+ Container as Container10,
2479
2430
  Copy as Copy5,
2480
- Heading as Heading11,
2431
+ Heading as Heading10,
2481
2432
  StatusBadge as StatusBadge4,
2482
- Text as Text13,
2433
+ Text as Text12,
2483
2434
  toast as toast9,
2484
2435
  Tooltip as Tooltip6,
2485
2436
  usePrompt as usePrompt4
2486
2437
  } from "@medusajs/ui";
2487
- import { DisplayExtensionZone as DisplayExtensionZone6 } from "@mercurjs/dashboard-shared";
2438
+ import { DisplayExtensionZone as DisplayExtensionZone5 } from "@mercurjs/dashboard-shared";
2488
2439
  import { format as format3 } from "date-fns";
2489
2440
 
2490
2441
  // src/lib/credit-line.ts
@@ -2495,12 +2446,12 @@ var getTotalCreditLines = (creditLines) => creditLines.reduce((acc, creditLine)
2495
2446
 
2496
2447
  // src/pages/orders/order-detail/components/order-summary-section/return-info-popover.tsx
2497
2448
  import { InformationCircleSolid } from "@medusajs/icons";
2498
- import { Badge as Badge2, Popover as Popover3, Text as Text12 } from "@medusajs/ui";
2449
+ import { Badge as Badge2, Popover as Popover3, Text as Text11 } from "@medusajs/ui";
2499
2450
  import { useState as useState5 } from "react";
2500
- import { useTranslation as useTranslation16 } from "react-i18next";
2501
- import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
2451
+ import { useTranslation as useTranslation15 } from "react-i18next";
2452
+ import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
2502
2453
  function ReturnInfoPopover({ orderReturn }) {
2503
- const { t } = useTranslation16();
2454
+ const { t } = useTranslation15();
2504
2455
  const [open, setOpen] = useState5(false);
2505
2456
  const { getFullDate } = useDate();
2506
2457
  const handleMouseEnter = () => {
@@ -2522,36 +2473,36 @@ function ReturnInfoPopover({ orderReturn }) {
2522
2473
  if (typeof orderReturn !== "object") {
2523
2474
  return;
2524
2475
  }
2525
- return /* @__PURE__ */ jsxs16(Popover3, { open, children: [
2526
- /* @__PURE__ */ jsx16(
2476
+ return /* @__PURE__ */ jsxs15(Popover3, { open, children: [
2477
+ /* @__PURE__ */ jsx15(
2527
2478
  Popover3.Trigger,
2528
2479
  {
2529
2480
  onMouseEnter: handleMouseEnter,
2530
2481
  onMouseLeave: handleMouseLeave,
2531
2482
  autoFocus: false,
2532
2483
  className: "align-sub focus-visible:outline-none",
2533
- children: /* @__PURE__ */ jsx16(InformationCircleSolid, {})
2484
+ children: /* @__PURE__ */ jsx15(InformationCircleSolid, {})
2534
2485
  }
2535
2486
  ),
2536
- /* @__PURE__ */ jsx16(
2487
+ /* @__PURE__ */ jsx15(
2537
2488
  Popover3.Content,
2538
2489
  {
2539
2490
  align: "center",
2540
2491
  side: "top",
2541
2492
  className: "bg-ui-bg-component p-2 focus-visible:outline-none",
2542
- children: /* @__PURE__ */ jsxs16("div", { className: "", children: [
2543
- /* @__PURE__ */ jsxs16(Badge2, { size: "2xsmall", className: "mb-2", rounded: "full", children: [
2493
+ children: /* @__PURE__ */ jsxs15("div", { className: "", children: [
2494
+ /* @__PURE__ */ jsxs15(Badge2, { size: "2xsmall", className: "mb-2", rounded: "full", children: [
2544
2495
  returnType,
2545
2496
  ": #",
2546
2497
  returnTypeId.slice(-7)
2547
2498
  ] }),
2548
- /* @__PURE__ */ jsxs16(Text12, { size: "xsmall", children: [
2549
- /* @__PURE__ */ jsx16("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.returnRequested`) }),
2499
+ /* @__PURE__ */ jsxs15(Text11, { size: "xsmall", children: [
2500
+ /* @__PURE__ */ jsx15("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.returnRequested`) }),
2550
2501
  " \xB7 ",
2551
2502
  getFullDate({ date: orderReturn.requested_at, includeTime: true })
2552
2503
  ] }),
2553
- /* @__PURE__ */ jsxs16(Text12, { size: "xsmall", children: [
2554
- /* @__PURE__ */ jsx16("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.itemReceived`) }),
2504
+ /* @__PURE__ */ jsxs15(Text11, { size: "xsmall", children: [
2505
+ /* @__PURE__ */ jsx15("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.itemReceived`) }),
2555
2506
  " \xB7 ",
2556
2507
  orderReturn.received_at ? getFullDate({
2557
2508
  date: orderReturn.received_at,
@@ -2568,10 +2519,10 @@ var return_info_popover_default = ReturnInfoPopover;
2568
2519
  // src/pages/orders/order-detail/components/order-summary-section/shipping-info-popover.tsx
2569
2520
  import { InformationCircleSolid as InformationCircleSolid2 } from "@medusajs/icons";
2570
2521
  import { Badge as Badge3, Tooltip as Tooltip5 } from "@medusajs/ui";
2571
- import { useTranslation as useTranslation17 } from "react-i18next";
2572
- import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
2522
+ import { useTranslation as useTranslation16 } from "react-i18next";
2523
+ import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
2573
2524
  function ShippingInfoPopover({ shippingMethod }) {
2574
- const { t } = useTranslation17();
2525
+ const { t } = useTranslation16();
2575
2526
  const shippingDetail = shippingMethod?.detail;
2576
2527
  if (!shippingDetail) {
2577
2528
  return;
@@ -2589,24 +2540,24 @@ function ShippingInfoPopover({ shippingMethod }) {
2589
2540
  if (!rmaId) {
2590
2541
  return;
2591
2542
  }
2592
- return /* @__PURE__ */ jsx17(
2543
+ return /* @__PURE__ */ jsx16(
2593
2544
  Tooltip5,
2594
2545
  {
2595
- content: /* @__PURE__ */ jsxs17(Badge3, { size: "2xsmall", rounded: "full", children: [
2546
+ content: /* @__PURE__ */ jsxs16(Badge3, { size: "2xsmall", rounded: "full", children: [
2596
2547
  rmaType,
2597
2548
  ": #",
2598
2549
  rmaId.slice(-7)
2599
2550
  ] }),
2600
- children: /* @__PURE__ */ jsx17(InformationCircleSolid2, { className: "inline-block text-ui-fg-muted ml-1" })
2551
+ children: /* @__PURE__ */ jsx16(InformationCircleSolid2, { className: "inline-block text-ui-fg-muted ml-1" })
2601
2552
  }
2602
2553
  );
2603
2554
  }
2604
2555
  var shipping_info_popover_default = ShippingInfoPopover;
2605
2556
 
2606
2557
  // src/pages/orders/order-detail/components/order-summary-section/order-summary-section.tsx
2607
- import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
2558
+ import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
2608
2559
  var OrderSummarySection = ({ order }) => {
2609
- const { t } = useTranslation18();
2560
+ const { t } = useTranslation17();
2610
2561
  const prompt = usePrompt4();
2611
2562
  const { reservations } = useReservationItems(
2612
2563
  {
@@ -2665,24 +2616,24 @@ var OrderSummarySection = ({ order }) => {
2665
2616
  }
2666
2617
  );
2667
2618
  };
2668
- return /* @__PURE__ */ jsxs18(
2669
- Container11,
2619
+ return /* @__PURE__ */ jsxs17(
2620
+ Container10,
2670
2621
  {
2671
2622
  className: "divide-y p-0",
2672
2623
  "data-testid": "order-summary-section",
2673
2624
  children: [
2674
- /* @__PURE__ */ jsx18(Header3, { order, orderPreview }),
2675
- /* @__PURE__ */ jsx18(ItemBreakdown, { order, reservations }),
2676
- /* @__PURE__ */ jsx18(CostBreakdown, { order }),
2677
- /* @__PURE__ */ jsx18(DiscountAndTotalBreakdown, { order }),
2678
- /* @__PURE__ */ jsx18(Total2, { order }),
2679
- (showPayment || showRefund) && /* @__PURE__ */ jsxs18(
2625
+ /* @__PURE__ */ jsx17(Header3, { order, orderPreview }),
2626
+ /* @__PURE__ */ jsx17(ItemBreakdown, { order, reservations }),
2627
+ /* @__PURE__ */ jsx17(CostBreakdown, { order }),
2628
+ /* @__PURE__ */ jsx17(DiscountAndTotalBreakdown, { order }),
2629
+ /* @__PURE__ */ jsx17(Total2, { order }),
2630
+ (showPayment || showRefund) && /* @__PURE__ */ jsxs17(
2680
2631
  "div",
2681
2632
  {
2682
2633
  className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4",
2683
2634
  "data-testid": "order-summary-actions",
2684
2635
  children: [
2685
- showPayment && /* @__PURE__ */ jsx18(
2636
+ showPayment && /* @__PURE__ */ jsx17(
2686
2637
  Button7,
2687
2638
  {
2688
2639
  size: "small",
@@ -2692,14 +2643,14 @@ var OrderSummarySection = ({ order }) => {
2692
2643
  children: t("orders.payment.markAsPaid")
2693
2644
  }
2694
2645
  ),
2695
- showRefund && /* @__PURE__ */ jsx18(
2646
+ showRefund && /* @__PURE__ */ jsx17(
2696
2647
  Button7,
2697
2648
  {
2698
2649
  size: "small",
2699
2650
  variant: "secondary",
2700
2651
  asChild: true,
2701
2652
  "data-testid": "order-summary-refund-button",
2702
- children: /* @__PURE__ */ jsx18(Link3, { to: `/orders/${order.id}/refund`, children: t("orders.payment.refundAmount", {
2653
+ children: /* @__PURE__ */ jsx17(Link3, { to: `/orders/${order.id}/refund`, children: t("orders.payment.refundAmount", {
2703
2654
  amount: getStylizedAmount(
2704
2655
  pendingDifference * -1,
2705
2656
  order?.currency_code
@@ -2710,7 +2661,7 @@ var OrderSummarySection = ({ order }) => {
2710
2661
  ]
2711
2662
  }
2712
2663
  ),
2713
- /* @__PURE__ */ jsx18(DisplayExtensionZone6, { model: "order", zone: "summary", data: order })
2664
+ /* @__PURE__ */ jsx17(DisplayExtensionZone5, { model: "order", zone: "summary", data: order })
2714
2665
  ]
2715
2666
  }
2716
2667
  );
@@ -2719,20 +2670,20 @@ var Header3 = ({
2719
2670
  order,
2720
2671
  orderPreview
2721
2672
  }) => {
2722
- const { t } = useTranslation18();
2673
+ const { t } = useTranslation17();
2723
2674
  const shouldDisableReturn = order.items.every(
2724
2675
  (i) => !(getReturnableQuantity(i) > 0)
2725
2676
  );
2726
2677
  const isOrderEditActive = orderPreview?.order_change?.change_type === "edit";
2727
2678
  const isOrderEditPending = orderPreview?.order_change?.change_type === "edit" && orderPreview?.order_change?.status === "pending";
2728
- return /* @__PURE__ */ jsxs18(
2679
+ return /* @__PURE__ */ jsxs17(
2729
2680
  "div",
2730
2681
  {
2731
2682
  className: "flex items-center justify-between px-6 py-4",
2732
2683
  "data-testid": "order-summary-header",
2733
2684
  children: [
2734
- /* @__PURE__ */ jsx18(Heading11, { level: "h2", "data-testid": "order-summary-heading", children: t("fields.summary") }),
2735
- /* @__PURE__ */ jsx18(
2685
+ /* @__PURE__ */ jsx17(Heading10, { level: "h2", "data-testid": "order-summary-heading", children: t("fields.summary") }),
2686
+ /* @__PURE__ */ jsx17(
2736
2687
  ActionMenu,
2737
2688
  {
2738
2689
  groups: [
@@ -2743,7 +2694,7 @@ var Header3 = ({
2743
2694
  isOrderEditPending ? "orders.summary.editOrderContinue" : "orders.summary.editOrder"
2744
2695
  ),
2745
2696
  to: `/orders/${order.id}/edits`,
2746
- icon: /* @__PURE__ */ jsx18(PencilSquare, {}),
2697
+ icon: /* @__PURE__ */ jsx17(PencilSquare, {}),
2747
2698
  disabled: order.status === "canceled" || orderPreview?.order_change && orderPreview?.order_change?.change_type !== "edit" || orderPreview?.order_change?.change_type === "edit" && orderPreview?.order_change?.status === "requested"
2748
2699
  }
2749
2700
  ]
@@ -2753,19 +2704,19 @@ var Header3 = ({
2753
2704
  {
2754
2705
  label: t("orders.returns.create"),
2755
2706
  to: `/orders/${order.id}/returns`,
2756
- icon: /* @__PURE__ */ jsx18(ArrowUturnLeft2, {}),
2707
+ icon: /* @__PURE__ */ jsx17(ArrowUturnLeft2, {}),
2757
2708
  disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.exchange_id || !!orderPreview?.order_change?.claim_id
2758
2709
  },
2759
2710
  {
2760
2711
  label: orderPreview?.order_change?.id && orderPreview?.order_change?.exchange_id ? t("orders.exchanges.manage") : t("orders.exchanges.create"),
2761
2712
  to: `/orders/${order.id}/exchanges`,
2762
- icon: /* @__PURE__ */ jsx18(ArrowPath3, {}),
2713
+ icon: /* @__PURE__ */ jsx17(ArrowPath3, {}),
2763
2714
  disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.return_id && !orderPreview?.order_change?.exchange_id || !!orderPreview?.order_change?.claim_id
2764
2715
  },
2765
2716
  {
2766
2717
  label: orderPreview?.order_change?.id && orderPreview?.order_change?.claim_id ? t("orders.claims.manage") : t("orders.claims.create"),
2767
2718
  to: `/orders/${order.id}/claims`,
2768
- icon: /* @__PURE__ */ jsx18(ExclamationCircle2, {}),
2719
+ icon: /* @__PURE__ */ jsx17(ExclamationCircle2, {}),
2769
2720
  disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.return_id && !orderPreview?.order_change?.claim_id || !!orderPreview?.order_change?.exchange_id
2770
2721
  }
2771
2722
  ]
@@ -2786,30 +2737,30 @@ var Item = ({
2786
2737
  claims,
2787
2738
  exchanges
2788
2739
  }) => {
2789
- const { t } = useTranslation18();
2740
+ const { t } = useTranslation17();
2790
2741
  const offerInventoryLinks = item.offer?.inventory_item_link ?? [];
2791
2742
  const isInventoryManaged = !!offerInventoryLinks.length;
2792
2743
  const hasInventoryKit = (item.variant?.inventory_items?.length || 0) > 1 || item.variant?.inventory_items?.some((i) => i.required_quantity > 1);
2793
2744
  const hasUnfulfilledItems = item.quantity - item.detail.fulfilled_quantity > 0;
2794
2745
  const offerSku = item.offer?.sku ?? null;
2795
2746
  const captionSku = offerSku ?? item.variant_sku ?? null;
2796
- return /* @__PURE__ */ jsxs18(Fragment3, { children: [
2797
- /* @__PURE__ */ jsxs18(
2747
+ return /* @__PURE__ */ jsxs17(Fragment3, { children: [
2748
+ /* @__PURE__ */ jsxs17(
2798
2749
  "div",
2799
2750
  {
2800
2751
  className: "text-ui-fg-subtle grid grid-cols-2 items-center gap-x-4 px-6 py-4",
2801
2752
  "data-testid": `order-summary-item-${item.id}`,
2802
2753
  children: [
2803
- /* @__PURE__ */ jsxs18(
2754
+ /* @__PURE__ */ jsxs17(
2804
2755
  "div",
2805
2756
  {
2806
2757
  className: "flex items-start gap-x-4",
2807
2758
  "data-testid": `order-summary-item-${item.id}-info`,
2808
2759
  children: [
2809
- /* @__PURE__ */ jsx18(Thumbnail, { src: item.thumbnail }),
2810
- /* @__PURE__ */ jsxs18("div", { children: [
2811
- /* @__PURE__ */ jsx18(
2812
- Text13,
2760
+ /* @__PURE__ */ jsx17(Thumbnail, { src: item.thumbnail }),
2761
+ /* @__PURE__ */ jsxs17("div", { children: [
2762
+ /* @__PURE__ */ jsx17(
2763
+ Text12,
2813
2764
  {
2814
2765
  size: "small",
2815
2766
  leading: "compact",
@@ -2818,19 +2769,19 @@ var Item = ({
2818
2769
  children: item.title
2819
2770
  }
2820
2771
  ),
2821
- captionSku && /* @__PURE__ */ jsxs18(
2772
+ captionSku && /* @__PURE__ */ jsxs17(
2822
2773
  "div",
2823
2774
  {
2824
2775
  className: "flex items-center gap-x-1",
2825
2776
  "data-testid": `order-summary-item-${item.id}-sku`,
2826
2777
  children: [
2827
- /* @__PURE__ */ jsx18(Text13, { size: "small", children: captionSku }),
2828
- /* @__PURE__ */ jsx18(Copy5, { content: captionSku, className: "text-ui-fg-muted" })
2778
+ /* @__PURE__ */ jsx17(Text12, { size: "small", children: captionSku }),
2779
+ /* @__PURE__ */ jsx17(Copy5, { content: captionSku, className: "text-ui-fg-muted" })
2829
2780
  ]
2830
2781
  }
2831
2782
  ),
2832
- /* @__PURE__ */ jsx18(
2833
- Text13,
2783
+ /* @__PURE__ */ jsx17(
2784
+ Text12,
2834
2785
  {
2835
2786
  size: "small",
2836
2787
  "data-testid": `order-summary-item-${item.id}-options`,
@@ -2841,31 +2792,31 @@ var Item = ({
2841
2792
  ]
2842
2793
  }
2843
2794
  ),
2844
- /* @__PURE__ */ jsxs18(
2795
+ /* @__PURE__ */ jsxs17(
2845
2796
  "div",
2846
2797
  {
2847
2798
  className: "grid grid-cols-3 items-center gap-x-4",
2848
2799
  "data-testid": `order-summary-item-${item.id}-pricing`,
2849
2800
  children: [
2850
- /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-end gap-x-4", children: /* @__PURE__ */ jsx18(
2851
- Text13,
2801
+ /* @__PURE__ */ jsx17("div", { className: "flex items-center justify-end gap-x-4", children: /* @__PURE__ */ jsx17(
2802
+ Text12,
2852
2803
  {
2853
2804
  size: "small",
2854
2805
  "data-testid": `order-summary-item-${item.id}-unit-price`,
2855
2806
  children: getLocaleAmount(item.unit_price, currencyCode)
2856
2807
  }
2857
2808
  ) }),
2858
- /* @__PURE__ */ jsxs18(
2809
+ /* @__PURE__ */ jsxs17(
2859
2810
  "div",
2860
2811
  {
2861
2812
  className: "flex items-center gap-x-2",
2862
2813
  "data-testid": `order-summary-item-${item.id}-quantity`,
2863
2814
  children: [
2864
- /* @__PURE__ */ jsx18("div", { className: "w-fit min-w-[27px]", children: /* @__PURE__ */ jsxs18(Text13, { size: "small", children: [
2865
- /* @__PURE__ */ jsx18("span", { className: "tabular-nums", children: item.quantity }),
2815
+ /* @__PURE__ */ jsx17("div", { className: "w-fit min-w-[27px]", children: /* @__PURE__ */ jsxs17(Text12, { size: "small", children: [
2816
+ /* @__PURE__ */ jsx17("span", { className: "tabular-nums", children: item.quantity }),
2866
2817
  "x"
2867
2818
  ] }) }),
2868
- /* @__PURE__ */ jsx18("div", { className: "overflow-visible", children: isInventoryManaged && hasUnfulfilledItems && /* @__PURE__ */ jsx18(
2819
+ /* @__PURE__ */ jsx17("div", { className: "overflow-visible", children: isInventoryManaged && hasUnfulfilledItems && /* @__PURE__ */ jsx17(
2869
2820
  StatusBadge4,
2870
2821
  {
2871
2822
  color: reservation ? "green" : "orange",
@@ -2877,8 +2828,8 @@ var Item = ({
2877
2828
  ]
2878
2829
  }
2879
2830
  ),
2880
- /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx18(
2881
- Text13,
2831
+ /* @__PURE__ */ jsx17("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx17(
2832
+ Text12,
2882
2833
  {
2883
2834
  size: "small",
2884
2835
  className: "pt-[1px]",
@@ -2893,10 +2844,10 @@ var Item = ({
2893
2844
  },
2894
2845
  item.id
2895
2846
  ),
2896
- hasInventoryKit && /* @__PURE__ */ jsx18(InventoryKitBreakdown, { item }),
2897
- returns.map((r) => /* @__PURE__ */ jsx18(ReturnBreakdown, { orderReturn: r, itemId: item.id }, r.id)),
2898
- claims.map((claim) => /* @__PURE__ */ jsx18(ClaimBreakdown, { claim, itemId: item.id }, claim.id)),
2899
- exchanges.map((exchange) => /* @__PURE__ */ jsx18(
2847
+ hasInventoryKit && /* @__PURE__ */ jsx17(InventoryKitBreakdown, { item }),
2848
+ returns.map((r) => /* @__PURE__ */ jsx17(ReturnBreakdown, { orderReturn: r, itemId: item.id }, r.id)),
2849
+ claims.map((claim) => /* @__PURE__ */ jsx17(ClaimBreakdown, { claim, itemId: item.id }, claim.id)),
2850
+ exchanges.map((exchange) => /* @__PURE__ */ jsx17(
2900
2851
  ExchangeBreakdown,
2901
2852
  {
2902
2853
  exchange,
@@ -2922,13 +2873,13 @@ var ItemBreakdown = ({
2922
2873
  order_id: order.id,
2923
2874
  fields: "*items,*items.reason"
2924
2875
  });
2925
- const reservationsMap = useMemo4(
2876
+ const reservationsMap = useMemo3(
2926
2877
  () => new Map((reservations || []).map((r) => [r.line_item_id, r])),
2927
2878
  [reservations]
2928
2879
  );
2929
- return /* @__PURE__ */ jsx18("div", { "data-testid": "order-summary-items-breakdown", children: order.items?.map((item) => {
2880
+ return /* @__PURE__ */ jsx17("div", { "data-testid": "order-summary-items-breakdown", children: order.items?.map((item) => {
2930
2881
  const reservation = reservationsMap.get(item.id);
2931
- return /* @__PURE__ */ jsx18(
2882
+ return /* @__PURE__ */ jsx17(
2932
2883
  Item,
2933
2884
  {
2934
2885
  item,
@@ -2947,22 +2898,36 @@ var Cost = ({
2947
2898
  value,
2948
2899
  secondaryValue,
2949
2900
  tooltip
2950
- }) => /* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-3 items-center", children: [
2951
- /* @__PURE__ */ jsxs18(Text13, { size: "small", leading: "compact", children: [
2901
+ }) => /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-3 items-center", children: [
2902
+ /* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", children: [
2952
2903
  label,
2953
2904
  " ",
2954
2905
  tooltip
2955
2906
  ] }),
2956
- /* @__PURE__ */ jsx18("div", { className: "text-right", children: /* @__PURE__ */ jsx18(Text13, { size: "small", leading: "compact", children: secondaryValue }) }),
2957
- /* @__PURE__ */ jsx18("div", { className: "text-right", children: /* @__PURE__ */ jsx18(Text13, { size: "small", leading: "compact", children: value }) })
2907
+ /* @__PURE__ */ jsx17("div", { className: "text-right", children: /* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", children: secondaryValue }) }),
2908
+ /* @__PURE__ */ jsx17("div", { className: "text-right", children: /* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", children: value }) })
2958
2909
  ] });
2959
2910
  var CostBreakdown = ({
2960
2911
  order
2961
2912
  }) => {
2962
- const { t } = useTranslation18();
2913
+ const { t } = useTranslation17();
2963
2914
  const [isTaxOpen, setIsTaxOpen] = useState6(false);
2964
2915
  const [isShippingOpen, setIsShippingOpen] = useState6(false);
2965
- const taxCodes = useMemo4(() => {
2916
+ const [isCommissionOpen, setIsCommissionOpen] = useState6(false);
2917
+ const { commission_lines } = useOrderCommissionLines(order.id);
2918
+ const hasCommission = commission_lines.length > 0;
2919
+ const commissionTotal = commission_lines.reduce(
2920
+ (acc, line) => acc + (line.amount ?? 0),
2921
+ 0
2922
+ );
2923
+ const commissionItemTitleById = useMemo3(() => {
2924
+ const map = /* @__PURE__ */ new Map();
2925
+ order.items?.forEach((item) => {
2926
+ map.set(item.id, item.product_title ?? item.title);
2927
+ });
2928
+ return map;
2929
+ }, [order.items]);
2930
+ const taxCodes = useMemo3(() => {
2966
2931
  const taxCodeMap = {};
2967
2932
  order.items.forEach((item) => {
2968
2933
  item.tax_lines?.forEach((line) => {
@@ -2987,32 +2952,32 @@ var CostBreakdown = ({
2987
2952
  return taxCodeMap;
2988
2953
  }, [order]);
2989
2954
  const hasTaxes = !!Object.keys(taxCodes).length;
2990
- return /* @__PURE__ */ jsxs18(
2955
+ return /* @__PURE__ */ jsxs17(
2991
2956
  "div",
2992
2957
  {
2993
2958
  className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4",
2994
2959
  "data-testid": "order-summary-cost-breakdown",
2995
2960
  children: [
2996
- /* @__PURE__ */ jsx18(
2961
+ /* @__PURE__ */ jsx17(
2997
2962
  Cost,
2998
2963
  {
2999
2964
  label: t("orders.summary.itemSubtotal"),
3000
2965
  value: getLocaleAmount(order.item_subtotal, order.currency_code)
3001
2966
  }
3002
2967
  ),
3003
- /* @__PURE__ */ jsx18(
2968
+ /* @__PURE__ */ jsx17(
3004
2969
  Cost,
3005
2970
  {
3006
2971
  label: (
3007
2972
  // oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
3008
- /* @__PURE__ */ jsxs18(
2973
+ /* @__PURE__ */ jsxs17(
3009
2974
  "span",
3010
2975
  {
3011
2976
  onClick: () => setIsShippingOpen((o) => !o),
3012
2977
  className: "flex cursor-pointer items-center gap-1",
3013
2978
  children: [
3014
- /* @__PURE__ */ jsx18("span", { children: t("orders.summary.shippingSubtotal") }),
3015
- /* @__PURE__ */ jsx18(
2979
+ /* @__PURE__ */ jsx17("span", { children: t("orders.summary.shippingSubtotal") }),
2980
+ /* @__PURE__ */ jsx17(
3016
2981
  TriangleDownMini,
3017
2982
  {
3018
2983
  style: {
@@ -3027,30 +2992,30 @@ var CostBreakdown = ({
3027
2992
  value: getLocaleAmount(order.shipping_subtotal, order.currency_code)
3028
2993
  }
3029
2994
  ),
3030
- isShippingOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: (order.shipping_methods || []).sort(
2995
+ isShippingOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: (order.shipping_methods || []).sort(
3031
2996
  (m1, m2) => m1.created_at.localeCompare(m2.created_at)
3032
2997
  ).map((sm, i) => {
3033
- return /* @__PURE__ */ jsxs18(
2998
+ return /* @__PURE__ */ jsxs17(
3034
2999
  "div",
3035
3000
  {
3036
3001
  className: "flex items-center justify-between gap-x-2",
3037
3002
  children: [
3038
- /* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsxs18("span", { className: "txt-small", children: [
3003
+ /* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsxs17("span", { className: "txt-small", children: [
3039
3004
  sm.name,
3040
3005
  sm.detail.return_id && ` (${t("fields.returnShipping")})`,
3041
3006
  " ",
3042
- /* @__PURE__ */ jsx18(shipping_info_popover_default, { shippingMethod: sm }, i)
3007
+ /* @__PURE__ */ jsx17(shipping_info_popover_default, { shippingMethod: sm }, i)
3043
3008
  ] }) }),
3044
- /* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3045
- /* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(sm.subtotal, order.currency_code) })
3009
+ /* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3010
+ /* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(sm.subtotal, order.currency_code) })
3046
3011
  ]
3047
3012
  },
3048
3013
  sm.id
3049
3014
  );
3050
3015
  }) }),
3051
- /* @__PURE__ */ jsxs18(Fragment3, { children: [
3052
- /* @__PURE__ */ jsxs18("div", { className: "flex justify-between", children: [
3053
- /* @__PURE__ */ jsxs18(
3016
+ /* @__PURE__ */ jsxs17(Fragment3, { children: [
3017
+ /* @__PURE__ */ jsxs17("div", { className: "flex justify-between", children: [
3018
+ /* @__PURE__ */ jsxs17(
3054
3019
  "div",
3055
3020
  {
3056
3021
  onClick: () => hasTaxes && setIsTaxOpen((o) => !o),
@@ -3058,8 +3023,8 @@ var CostBreakdown = ({
3058
3023
  "cursor-pointer": hasTaxes
3059
3024
  }),
3060
3025
  children: [
3061
- /* @__PURE__ */ jsx18("span", { className: "txt-small select-none", children: t("orders.summary.taxTotal") }),
3062
- hasTaxes && /* @__PURE__ */ jsx18(
3026
+ /* @__PURE__ */ jsx17("span", { className: "txt-small select-none", children: t("orders.summary.taxTotal") }),
3027
+ hasTaxes && /* @__PURE__ */ jsx17(
3063
3028
  TriangleDownMini,
3064
3029
  {
3065
3030
  style: {
@@ -3070,34 +3035,72 @@ var CostBreakdown = ({
3070
3035
  ]
3071
3036
  }
3072
3037
  ),
3073
- /* @__PURE__ */ jsx18("div", { className: "text-right", children: /* @__PURE__ */ jsx18(Text13, { size: "small", leading: "compact", children: getLocaleAmount(order.original_tax_total, order.currency_code) }) })
3038
+ /* @__PURE__ */ jsx17("div", { className: "text-right", children: /* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", children: getLocaleAmount(order.original_tax_total, order.currency_code) }) })
3074
3039
  ] }),
3075
- isTaxOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: Object.entries(taxCodes).map(([code, { total, rate }]) => {
3076
- return /* @__PURE__ */ jsxs18(
3040
+ isTaxOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: Object.entries(taxCodes).map(([code, { total, rate }]) => {
3041
+ return /* @__PURE__ */ jsxs17(
3077
3042
  "div",
3078
3043
  {
3079
3044
  className: "flex items-center justify-between gap-x-2",
3080
3045
  children: [
3081
- /* @__PURE__ */ jsxs18("div", { className: "flex gap-1", children: [
3082
- /* @__PURE__ */ jsx18("span", { className: "txt-small", children: code }),
3083
- /* @__PURE__ */ jsxs18("span", { className: "txt-small", children: [
3046
+ /* @__PURE__ */ jsxs17("div", { className: "flex gap-1", children: [
3047
+ /* @__PURE__ */ jsx17("span", { className: "txt-small", children: code }),
3048
+ /* @__PURE__ */ jsxs17("span", { className: "txt-small", children: [
3084
3049
  "(",
3085
3050
  formatPercentage(rate),
3086
3051
  ")"
3087
3052
  ] })
3088
3053
  ] }),
3089
- /* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3090
- /* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
3054
+ /* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3055
+ /* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
3091
3056
  ]
3092
3057
  },
3093
3058
  code
3094
3059
  );
3095
3060
  }) })
3096
3061
  ] }),
3097
- /* @__PURE__ */ jsxs18("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3098
- /* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.total") }),
3099
- /* @__PURE__ */ jsx18(
3100
- Text13,
3062
+ hasCommission && /* @__PURE__ */ jsxs17(Fragment3, { children: [
3063
+ /* @__PURE__ */ jsxs17("div", { className: "flex justify-between", children: [
3064
+ /* @__PURE__ */ jsxs17(
3065
+ "div",
3066
+ {
3067
+ onClick: () => setIsCommissionOpen((o) => !o),
3068
+ className: "flex cursor-pointer items-center gap-1",
3069
+ children: [
3070
+ /* @__PURE__ */ jsx17("span", { className: "txt-small select-none", children: t("fields.commission") }),
3071
+ /* @__PURE__ */ jsx17(
3072
+ TriangleDownMini,
3073
+ {
3074
+ style: {
3075
+ transform: `rotate(${isCommissionOpen ? 0 : -90}deg)`
3076
+ }
3077
+ }
3078
+ )
3079
+ ]
3080
+ }
3081
+ ),
3082
+ /* @__PURE__ */ jsx17("div", { className: "text-right", children: /* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", children: getLocaleAmount(commissionTotal, order.currency_code) }) })
3083
+ ] }),
3084
+ isCommissionOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: commission_lines.map((line) => {
3085
+ const label = line.shipping_method_id ? t("fields.shipping") : commissionItemTitleById.get(line.item_id ?? "") ?? line.code;
3086
+ return /* @__PURE__ */ jsxs17(
3087
+ "div",
3088
+ {
3089
+ className: "flex items-center justify-between gap-x-2",
3090
+ children: [
3091
+ /* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsx17("span", { className: "txt-small", children: label }) }),
3092
+ /* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3093
+ /* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(line.amount, order.currency_code) })
3094
+ ]
3095
+ },
3096
+ line.id
3097
+ );
3098
+ }) })
3099
+ ] }),
3100
+ /* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3101
+ /* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.total") }),
3102
+ /* @__PURE__ */ jsx17(
3103
+ Text12,
3101
3104
  {
3102
3105
  className: "text-ui-fg-subtle text-bold",
3103
3106
  size: "small",
@@ -3113,11 +3116,11 @@ var CostBreakdown = ({
3113
3116
  var DiscountAndTotalBreakdown = ({
3114
3117
  order
3115
3118
  }) => {
3116
- const { t } = useTranslation18();
3119
+ const { t } = useTranslation17();
3117
3120
  const [isDiscountOpen, setIsDiscountOpen] = useState6(false);
3118
3121
  const [isCreditLinesOpen, setIsCreditLinesOpen] = useState6(false);
3119
3122
  const creditLines = order.credit_lines ?? [];
3120
- const discounts = useMemo4(() => {
3123
+ const discounts = useMemo3(() => {
3121
3124
  const discounts2 = [];
3122
3125
  if (order.item_discount_total) {
3123
3126
  discounts2.push({
@@ -3145,18 +3148,18 @@ var DiscountAndTotalBreakdown = ({
3145
3148
  }, [order]);
3146
3149
  const hasDiscount = discounts.length > 0;
3147
3150
  const hasCreditLines = creditLines.length > 0;
3148
- return /* @__PURE__ */ jsxs18(
3151
+ return /* @__PURE__ */ jsxs17(
3149
3152
  "div",
3150
3153
  {
3151
3154
  className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4",
3152
3155
  "data-testid": "order-summary-discount-breakdown",
3153
3156
  children: [
3154
- /* @__PURE__ */ jsx18(
3157
+ /* @__PURE__ */ jsx17(
3155
3158
  Cost,
3156
3159
  {
3157
3160
  label: (
3158
3161
  // oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
3159
- /* @__PURE__ */ jsxs18(
3162
+ /* @__PURE__ */ jsxs17(
3160
3163
  "span",
3161
3164
  {
3162
3165
  onClick: () => hasDiscount && setIsDiscountOpen((o) => !o),
@@ -3165,8 +3168,8 @@ var DiscountAndTotalBreakdown = ({
3165
3168
  }),
3166
3169
  "data-testid": "order-summary-discount-toggle",
3167
3170
  children: [
3168
- /* @__PURE__ */ jsx18("span", { children: t("orders.summary.discountTotal") }),
3169
- hasDiscount && /* @__PURE__ */ jsx18(
3171
+ /* @__PURE__ */ jsx17("span", { children: t("orders.summary.discountTotal") }),
3172
+ hasDiscount && /* @__PURE__ */ jsx17(
3170
3173
  TriangleDownMini,
3171
3174
  {
3172
3175
  style: {
@@ -3181,41 +3184,41 @@ var DiscountAndTotalBreakdown = ({
3181
3184
  value: getLocaleAmount(order.discount_total, order.currency_code)
3182
3185
  }
3183
3186
  ),
3184
- isDiscountOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: discounts.map(({ type, total, codes }) => {
3185
- return /* @__PURE__ */ jsxs18(
3187
+ isDiscountOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: discounts.map(({ type, total, codes }) => {
3188
+ return /* @__PURE__ */ jsxs17(
3186
3189
  "div",
3187
3190
  {
3188
3191
  className: "flex items-center justify-between gap-x-2",
3189
3192
  children: [
3190
- /* @__PURE__ */ jsxs18("div", { className: "flex gap-1", children: [
3191
- /* @__PURE__ */ jsx18("span", { className: "txt-small", children: t(`fields.${type}`) }),
3192
- /* @__PURE__ */ jsxs18("span", { className: "txt-small", children: [
3193
+ /* @__PURE__ */ jsxs17("div", { className: "flex gap-1", children: [
3194
+ /* @__PURE__ */ jsx17("span", { className: "txt-small", children: t(`fields.${type}`) }),
3195
+ /* @__PURE__ */ jsxs17("span", { className: "txt-small", children: [
3193
3196
  "(",
3194
3197
  codes.join(", "),
3195
3198
  ")"
3196
3199
  ] })
3197
3200
  ] }),
3198
- /* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3199
- /* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
3201
+ /* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3202
+ /* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
3200
3203
  ]
3201
3204
  },
3202
3205
  type
3203
3206
  );
3204
3207
  }) }),
3205
- hasCreditLines && /* @__PURE__ */ jsxs18(Fragment3, { children: [
3206
- /* @__PURE__ */ jsx18(
3208
+ hasCreditLines && /* @__PURE__ */ jsxs17(Fragment3, { children: [
3209
+ /* @__PURE__ */ jsx17(
3207
3210
  Cost,
3208
3211
  {
3209
3212
  label: (
3210
3213
  // oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
3211
- /* @__PURE__ */ jsxs18(
3214
+ /* @__PURE__ */ jsxs17(
3212
3215
  "span",
3213
3216
  {
3214
3217
  onClick: () => setIsCreditLinesOpen((o) => !o),
3215
3218
  className: "flex cursor-pointer items-center gap-1",
3216
3219
  children: [
3217
- /* @__PURE__ */ jsx18("span", { children: t("orders.creditLines.title") }),
3218
- /* @__PURE__ */ jsx18(
3220
+ /* @__PURE__ */ jsx17("span", { children: t("orders.creditLines.title") }),
3221
+ /* @__PURE__ */ jsx17(
3219
3222
  TriangleDownMini,
3220
3223
  {
3221
3224
  style: {
@@ -3233,34 +3236,34 @@ var DiscountAndTotalBreakdown = ({
3233
3236
  )
3234
3237
  }
3235
3238
  ),
3236
- isCreditLinesOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: creditLines.map((creditLine) => {
3239
+ isCreditLinesOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: creditLines.map((creditLine) => {
3237
3240
  const prettyReference = creditLine.reference?.split("_").join(" ").split("-").join(" ");
3238
- return /* @__PURE__ */ jsxs18(
3241
+ return /* @__PURE__ */ jsxs17(
3239
3242
  "div",
3240
3243
  {
3241
3244
  className: "flex items-center justify-between gap-x-2",
3242
3245
  children: [
3243
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center", children: [
3244
- /* @__PURE__ */ jsx18(
3245
- Text13,
3246
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center", children: [
3247
+ /* @__PURE__ */ jsx17(
3248
+ Text12,
3246
3249
  {
3247
3250
  size: "small",
3248
3251
  leading: "compact",
3249
3252
  weight: "plus",
3250
3253
  className: "txt-small text-ui-fg-subtle font-medium",
3251
- children: /* @__PURE__ */ jsx18(display_id_default, { id: creditLine.id })
3254
+ children: /* @__PURE__ */ jsx17(display_id_default, { id: creditLine.id })
3252
3255
  }
3253
3256
  ),
3254
- /* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-subtle mx-1", children: "-" }),
3255
- /* @__PURE__ */ jsx18(
3257
+ /* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-subtle mx-1", children: "-" }),
3258
+ /* @__PURE__ */ jsx17(
3256
3259
  Tooltip6,
3257
3260
  {
3258
3261
  content: format3(
3259
3262
  new Date(creditLine.created_at),
3260
3263
  "dd MMM, yyyy, HH:mm:ss"
3261
3264
  ),
3262
- children: /* @__PURE__ */ jsx18(
3263
- Text13,
3265
+ children: /* @__PURE__ */ jsx17(
3266
+ Text12,
3264
3267
  {
3265
3268
  size: "small",
3266
3269
  leading: "compact",
@@ -3273,9 +3276,9 @@ var DiscountAndTotalBreakdown = ({
3273
3276
  )
3274
3277
  }
3275
3278
  ),
3276
- /* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-subtle mx-1", children: "-" }),
3277
- /* @__PURE__ */ jsxs18(
3278
- Text13,
3279
+ /* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-subtle mx-1", children: "-" }),
3280
+ /* @__PURE__ */ jsxs17(
3281
+ Text12,
3279
3282
  {
3280
3283
  size: "small",
3281
3284
  leading: "compact",
@@ -3288,8 +3291,8 @@ var DiscountAndTotalBreakdown = ({
3288
3291
  }
3289
3292
  )
3290
3293
  ] }),
3291
- /* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3292
- /* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(
3294
+ /* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3295
+ /* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(
3293
3296
  creditLine.amount,
3294
3297
  order.currency_code
3295
3298
  ) })
@@ -3299,10 +3302,10 @@ var DiscountAndTotalBreakdown = ({
3299
3302
  );
3300
3303
  }) })
3301
3304
  ] }),
3302
- /* @__PURE__ */ jsxs18("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3303
- /* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("orders.summary.totalAfterDiscount") }),
3304
- /* @__PURE__ */ jsx18(
3305
- Text13,
3305
+ /* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3306
+ /* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("orders.summary.totalAfterDiscount") }),
3307
+ /* @__PURE__ */ jsx17(
3308
+ Text12,
3306
3309
  {
3307
3310
  className: "text-ui-fg-subtle text-bold",
3308
3311
  size: "small",
@@ -3316,17 +3319,17 @@ var DiscountAndTotalBreakdown = ({
3316
3319
  );
3317
3320
  };
3318
3321
  var InventoryKitBreakdown = ({ item }) => {
3319
- const { t } = useTranslation18();
3322
+ const { t } = useTranslation17();
3320
3323
  const [isOpen, setIsOpen] = useState6(false);
3321
3324
  const inventory = item.variant?.inventory_items || [];
3322
- return /* @__PURE__ */ jsxs18(Fragment3, { children: [
3323
- /* @__PURE__ */ jsxs18(
3325
+ return /* @__PURE__ */ jsxs17(Fragment3, { children: [
3326
+ /* @__PURE__ */ jsxs17(
3324
3327
  "div",
3325
3328
  {
3326
3329
  onClick: () => setIsOpen((o) => !o),
3327
3330
  className: "flex cursor-pointer items-center gap-2 border-t border-dashed px-6 py-4",
3328
3331
  children: [
3329
- /* @__PURE__ */ jsx18(
3332
+ /* @__PURE__ */ jsx17(
3330
3333
  TriangleDownMini,
3331
3334
  {
3332
3335
  style: {
@@ -3334,26 +3337,26 @@ var InventoryKitBreakdown = ({ item }) => {
3334
3337
  }
3335
3338
  }
3336
3339
  ),
3337
- /* @__PURE__ */ jsx18("span", { className: "text-ui-fg-muted txt-small select-none", children: t("orders.summary.inventoryKit", { count: inventory.length }) })
3340
+ /* @__PURE__ */ jsx17("span", { className: "text-ui-fg-muted txt-small select-none", children: t("orders.summary.inventoryKit", { count: inventory.length }) })
3338
3341
  ]
3339
3342
  }
3340
3343
  ),
3341
- isOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 px-6 pb-4", children: inventory.map((i) => {
3342
- return /* @__PURE__ */ jsxs18(
3344
+ isOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 px-6 pb-4", children: inventory.map((i) => {
3345
+ return /* @__PURE__ */ jsxs17(
3343
3346
  "div",
3344
3347
  {
3345
3348
  className: "flex items-center justify-between gap-x-2",
3346
3349
  children: [
3347
- /* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsxs18("span", { className: "txt-small text-ui-fg-subtle font-medium", children: [
3350
+ /* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsxs17("span", { className: "txt-small text-ui-fg-subtle font-medium", children: [
3348
3351
  i.inventory.title,
3349
- i.inventory.sku && /* @__PURE__ */ jsxs18("span", { className: "text-ui-fg-subtle font-normal", children: [
3352
+ i.inventory.sku && /* @__PURE__ */ jsxs17("span", { className: "text-ui-fg-subtle font-normal", children: [
3350
3353
  " ",
3351
3354
  "\u22C5 ",
3352
3355
  i.inventory.sku
3353
3356
  ] })
3354
3357
  ] }) }),
3355
- /* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3356
- /* @__PURE__ */ jsxs18("span", { className: "txt-small text-ui-fg-muted", children: [
3358
+ /* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3359
+ /* @__PURE__ */ jsxs17("span", { className: "txt-small text-ui-fg-muted", children: [
3357
3360
  i.required_quantity,
3358
3361
  "x"
3359
3362
  ] })
@@ -3368,21 +3371,21 @@ var ReturnBreakdownWithDamages = ({
3368
3371
  orderReturn,
3369
3372
  itemId
3370
3373
  }) => {
3371
- const { t } = useTranslation18();
3374
+ const { t } = useTranslation17();
3372
3375
  const item = orderReturn?.items?.find((ri) => ri.item_id === itemId);
3373
3376
  const damagedQuantity = item?.damaged_quantity || 0;
3374
- return item && /* @__PURE__ */ jsxs18(
3377
+ return item && /* @__PURE__ */ jsxs17(
3375
3378
  "div",
3376
3379
  {
3377
3380
  className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-t-2 border-dotted px-6 py-4",
3378
3381
  children: [
3379
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
3380
- /* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3381
- /* @__PURE__ */ jsx18(Text13, { size: "small", children: t(`orders.returns.damagedItemsReturned`, {
3382
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
3383
+ /* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3384
+ /* @__PURE__ */ jsx17(Text12, { size: "small", children: t(`orders.returns.damagedItemsReturned`, {
3382
3385
  quantity: damagedQuantity
3383
3386
  }) }),
3384
- item?.note && /* @__PURE__ */ jsx18(Tooltip6, { content: item.note, children: /* @__PURE__ */ jsx18(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
3385
- item?.reason && /* @__PURE__ */ jsx18(
3387
+ item?.note && /* @__PURE__ */ jsx17(Tooltip6, { content: item.note, children: /* @__PURE__ */ jsx17(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
3388
+ item?.reason && /* @__PURE__ */ jsx17(
3386
3389
  Badge4,
3387
3390
  {
3388
3391
  size: "2xsmall",
@@ -3392,9 +3395,9 @@ var ReturnBreakdownWithDamages = ({
3392
3395
  }
3393
3396
  )
3394
3397
  ] }),
3395
- /* @__PURE__ */ jsxs18(Text13, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
3398
+ /* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
3396
3399
  t(`orders.returns.damagedItemReceived`),
3397
- /* @__PURE__ */ jsx18("span", { className: "ml-2", children: /* @__PURE__ */ jsx18(return_info_popover_default, { orderReturn }) })
3400
+ /* @__PURE__ */ jsx17("span", { className: "ml-2", children: /* @__PURE__ */ jsx17(return_info_popover_default, { orderReturn }) })
3398
3401
  ] })
3399
3402
  ]
3400
3403
  },
@@ -3405,7 +3408,7 @@ var ReturnBreakdown = ({
3405
3408
  orderReturn,
3406
3409
  itemId
3407
3410
  }) => {
3408
- const { t } = useTranslation18();
3411
+ const { t } = useTranslation17();
3409
3412
  const { getRelativeDate } = useDate();
3410
3413
  if (!["requested", "received", "partially_received"].includes(
3411
3414
  orderReturn.status || ""
@@ -3415,29 +3418,29 @@ var ReturnBreakdown = ({
3415
3418
  const isRequested = orderReturn.status === "requested";
3416
3419
  const item = orderReturn?.items?.find((ri) => ri.item_id === itemId);
3417
3420
  const damagedQuantity = item?.damaged_quantity || 0;
3418
- return item && /* @__PURE__ */ jsxs18(Fragment3, { children: [
3419
- damagedQuantity > 0 && /* @__PURE__ */ jsx18(
3421
+ return item && /* @__PURE__ */ jsxs17(Fragment3, { children: [
3422
+ damagedQuantity > 0 && /* @__PURE__ */ jsx17(
3420
3423
  ReturnBreakdownWithDamages,
3421
3424
  {
3422
3425
  orderReturn,
3423
3426
  itemId
3424
3427
  }
3425
3428
  ),
3426
- /* @__PURE__ */ jsxs18(
3429
+ /* @__PURE__ */ jsxs17(
3427
3430
  "div",
3428
3431
  {
3429
3432
  className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-t-2 border-dotted px-6 py-4",
3430
3433
  children: [
3431
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
3432
- /* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3433
- /* @__PURE__ */ jsx18(Text13, { size: "small", children: t(
3434
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
3435
+ /* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3436
+ /* @__PURE__ */ jsx17(Text12, { size: "small", children: t(
3434
3437
  `orders.returns.${isRequested ? "returnRequestedInfo" : "returnReceivedInfo"}`,
3435
3438
  {
3436
3439
  requestedItemsCount: item?.[isRequested ? "quantity" : "received_quantity"]
3437
3440
  }
3438
3441
  ) }),
3439
- item?.note && /* @__PURE__ */ jsx18(Tooltip6, { content: item.note, children: /* @__PURE__ */ jsx18(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
3440
- item?.reason && /* @__PURE__ */ jsx18(
3442
+ item?.note && /* @__PURE__ */ jsx17(Tooltip6, { content: item.note, children: /* @__PURE__ */ jsx17(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
3443
+ item?.reason && /* @__PURE__ */ jsx17(
3441
3444
  Badge4,
3442
3445
  {
3443
3446
  size: "2xsmall",
@@ -3447,13 +3450,13 @@ var ReturnBreakdown = ({
3447
3450
  }
3448
3451
  )
3449
3452
  ] }),
3450
- orderReturn && isRequested && /* @__PURE__ */ jsxs18(Text13, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
3453
+ orderReturn && isRequested && /* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
3451
3454
  getRelativeDate(orderReturn.created_at),
3452
- /* @__PURE__ */ jsx18("span", { className: "ml-2", children: /* @__PURE__ */ jsx18(return_info_popover_default, { orderReturn }) })
3455
+ /* @__PURE__ */ jsx17("span", { className: "ml-2", children: /* @__PURE__ */ jsx17(return_info_popover_default, { orderReturn }) })
3453
3456
  ] }),
3454
- orderReturn && !isRequested && /* @__PURE__ */ jsxs18(Text13, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
3457
+ orderReturn && !isRequested && /* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
3455
3458
  t(`orders.returns.itemReceived`),
3456
- /* @__PURE__ */ jsx18("span", { className: "ml-2", children: /* @__PURE__ */ jsx18(return_info_popover_default, { orderReturn }) })
3459
+ /* @__PURE__ */ jsx17("span", { className: "ml-2", children: /* @__PURE__ */ jsx17(return_info_popover_default, { orderReturn }) })
3457
3460
  ] })
3458
3461
  ]
3459
3462
  },
@@ -3465,26 +3468,26 @@ var ClaimBreakdown = ({
3465
3468
  claim,
3466
3469
  itemId
3467
3470
  }) => {
3468
- const { t } = useTranslation18();
3471
+ const { t } = useTranslation17();
3469
3472
  const { getRelativeDate } = useDate();
3470
3473
  const items = claim.additional_items.filter(
3471
3474
  (item) => item.item?.id === itemId
3472
3475
  );
3473
- return !!items.length && /* @__PURE__ */ jsxs18(
3476
+ return !!items.length && /* @__PURE__ */ jsxs17(
3474
3477
  "div",
3475
3478
  {
3476
3479
  className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-b-2 border-t-2 border-dotted px-6 py-4",
3477
3480
  children: [
3478
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
3479
- /* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3480
- /* @__PURE__ */ jsx18(Text13, { size: "small", children: t(`orders.claims.outboundItemAdded`, {
3481
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
3482
+ /* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3483
+ /* @__PURE__ */ jsx17(Text12, { size: "small", children: t(`orders.claims.outboundItemAdded`, {
3481
3484
  itemsCount: items.reduce(
3482
3485
  (acc, item) => acc = acc + item.quantity,
3483
3486
  0
3484
3487
  )
3485
3488
  }) })
3486
3489
  ] }),
3487
- /* @__PURE__ */ jsx18(Text13, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(claim.created_at) })
3490
+ /* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(claim.created_at) })
3488
3491
  ]
3489
3492
  },
3490
3493
  claim.id
@@ -3494,68 +3497,68 @@ var ExchangeBreakdown = ({
3494
3497
  exchange,
3495
3498
  itemId
3496
3499
  }) => {
3497
- const { t } = useTranslation18();
3500
+ const { t } = useTranslation17();
3498
3501
  const { getRelativeDate } = useDate();
3499
3502
  const items = exchange.additional_items.filter(
3500
3503
  (item) => item?.item?.id === itemId
3501
3504
  );
3502
- return !!items.length && /* @__PURE__ */ jsxs18(
3505
+ return !!items.length && /* @__PURE__ */ jsxs17(
3503
3506
  "div",
3504
3507
  {
3505
3508
  className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-b-2 border-t-2 border-dotted px-6 py-4",
3506
3509
  children: [
3507
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
3508
- /* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3509
- /* @__PURE__ */ jsx18(Text13, { size: "small", children: t(`orders.exchanges.outboundItemAdded`, {
3510
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
3511
+ /* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3512
+ /* @__PURE__ */ jsx17(Text12, { size: "small", children: t(`orders.exchanges.outboundItemAdded`, {
3510
3513
  itemsCount: items.reduce(
3511
3514
  (acc, item) => acc = acc + item.quantity,
3512
3515
  0
3513
3516
  )
3514
3517
  }) })
3515
3518
  ] }),
3516
- /* @__PURE__ */ jsx18(Text13, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(exchange.created_at) })
3519
+ /* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(exchange.created_at) })
3517
3520
  ]
3518
3521
  },
3519
3522
  exchange.id
3520
3523
  );
3521
3524
  };
3522
3525
  var Total2 = ({ order }) => {
3523
- const { t } = useTranslation18();
3524
- return /* @__PURE__ */ jsxs18(
3526
+ const { t } = useTranslation17();
3527
+ return /* @__PURE__ */ jsxs17(
3525
3528
  "div",
3526
3529
  {
3527
3530
  className: " flex flex-col gap-y-2 px-6 py-4",
3528
3531
  "data-testid": "order-summary-total",
3529
3532
  children: [
3530
- /* @__PURE__ */ jsxs18(
3533
+ /* @__PURE__ */ jsxs17(
3531
3534
  "div",
3532
3535
  {
3533
3536
  className: "text-ui-fg-base flex items-center justify-between",
3534
3537
  "data-testid": "order-summary-paid-total",
3535
3538
  children: [
3536
- /* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.paidTotal") }),
3537
- /* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: getStylizedAmount(
3539
+ /* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.paidTotal") }),
3540
+ /* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: getStylizedAmount(
3538
3541
  getTotalCaptured(order.payment_collections || []),
3539
3542
  order.currency_code
3540
3543
  ) })
3541
3544
  ]
3542
3545
  }
3543
3546
  ),
3544
- getTotalCreditLines(order.credit_lines ?? []) > 0 && /* @__PURE__ */ jsxs18("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3545
- /* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.creditTotal") }),
3546
- /* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: getStylizedAmount(
3547
+ getTotalCreditLines(order.credit_lines ?? []) > 0 && /* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3548
+ /* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.creditTotal") }),
3549
+ /* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: getStylizedAmount(
3547
3550
  getTotalCreditLines(order.credit_lines ?? []),
3548
3551
  order.currency_code
3549
3552
  ) })
3550
3553
  ] }),
3551
- /* @__PURE__ */ jsxs18(
3554
+ /* @__PURE__ */ jsxs17(
3552
3555
  "div",
3553
3556
  {
3554
3557
  className: "text-ui-fg-base flex items-center justify-between",
3555
3558
  "data-testid": "order-summary-outstanding-amount",
3556
3559
  children: [
3557
- /* @__PURE__ */ jsx18(
3558
- Text13,
3560
+ /* @__PURE__ */ jsx17(
3561
+ Text12,
3559
3562
  {
3560
3563
  className: "text-ui-fg-subtle text-semibold",
3561
3564
  size: "small",
@@ -3563,8 +3566,8 @@ var Total2 = ({ order }) => {
3563
3566
  children: t("orders.returns.outstandingAmount")
3564
3567
  }
3565
3568
  ),
3566
- /* @__PURE__ */ jsx18(
3567
- Text13,
3569
+ /* @__PURE__ */ jsx17(
3570
+ Text12,
3568
3571
  {
3569
3572
  className: "text-ui-fg-subtle text-bold",
3570
3573
  size: "small",
@@ -3584,22 +3587,22 @@ var Total2 = ({ order }) => {
3584
3587
  };
3585
3588
 
3586
3589
  // src/pages/orders/order-detail/components/order-remaining-orders-group-section/order-remaining-orders-group-section.tsx
3587
- import { Container as Container12, Heading as Heading12 } from "@medusajs/ui";
3588
- import { DisplayExtensionZone as DisplayExtensionZone7 } from "@mercurjs/dashboard-shared";
3590
+ import { Container as Container11, Heading as Heading11 } from "@medusajs/ui";
3591
+ import { DisplayExtensionZone as DisplayExtensionZone6 } from "@mercurjs/dashboard-shared";
3589
3592
  import { createColumnHelper } from "@tanstack/react-table";
3590
- import { useMemo as useMemo5 } from "react";
3591
- import { useTranslation as useTranslation19 } from "react-i18next";
3593
+ import { useMemo as useMemo4 } from "react";
3594
+ import { useTranslation as useTranslation18 } from "react-i18next";
3592
3595
  import { useParams } from "react-router-dom";
3593
- import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
3596
+ import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
3594
3597
  var DEFAULT_FIELDS2 = "id,*orders,*orders.customer,*orders.seller,*orders.sales_channel";
3595
3598
  var OrderRemainingOrdersGroupSection = () => {
3596
3599
  const { id } = useParams();
3597
- const { t } = useTranslation19();
3600
+ const { t } = useTranslation18();
3598
3601
  const { order_group, isLoading, isError, error } = useOrderGroupByOrderId(
3599
3602
  id,
3600
3603
  { fields: DEFAULT_FIELDS2 }
3601
3604
  );
3602
- const orders = useMemo5(() => {
3605
+ const orders = useMemo4(() => {
3603
3606
  const group = order_group;
3604
3607
  if (!group?.orders) return [];
3605
3608
  return group.orders.filter((o) => o.id !== id);
@@ -3619,21 +3622,21 @@ var OrderRemainingOrdersGroupSection = () => {
3619
3622
  if (!isLoading && orders.length === 0) {
3620
3623
  return null;
3621
3624
  }
3622
- return /* @__PURE__ */ jsxs19(
3623
- Container12,
3625
+ return /* @__PURE__ */ jsxs18(
3626
+ Container11,
3624
3627
  {
3625
3628
  className: "divide-y p-0",
3626
3629
  "data-testid": "order-remaining-orders-group-section",
3627
3630
  children: [
3628
- /* @__PURE__ */ jsx19(
3631
+ /* @__PURE__ */ jsx18(
3629
3632
  "div",
3630
3633
  {
3631
3634
  className: "flex items-center justify-between px-6 py-4",
3632
3635
  "data-testid": "order-remaining-orders-group-header",
3633
- children: /* @__PURE__ */ jsx19(Heading12, { level: "h2", "data-testid": "order-remaining-orders-group-heading", children: t("orders.group.heading") })
3636
+ children: /* @__PURE__ */ jsx18(Heading11, { level: "h2", "data-testid": "order-remaining-orders-group-heading", children: t("orders.group.heading") })
3634
3637
  }
3635
3638
  ),
3636
- /* @__PURE__ */ jsx19(
3639
+ /* @__PURE__ */ jsx18(
3637
3640
  _DataTable,
3638
3641
  {
3639
3642
  columns,
@@ -3647,8 +3650,8 @@ var OrderRemainingOrdersGroupSection = () => {
3647
3650
  }
3648
3651
  }
3649
3652
  ),
3650
- /* @__PURE__ */ jsx19(
3651
- DisplayExtensionZone7,
3653
+ /* @__PURE__ */ jsx18(
3654
+ DisplayExtensionZone6,
3652
3655
  {
3653
3656
  model: "order",
3654
3657
  zone: "order-group",
@@ -3661,35 +3664,35 @@ var OrderRemainingOrdersGroupSection = () => {
3661
3664
  };
3662
3665
  var columnHelper = createColumnHelper();
3663
3666
  var useColumns = () => {
3664
- return useMemo5(
3667
+ return useMemo4(
3665
3668
  () => [
3666
3669
  columnHelper.accessor("display_id", {
3667
- header: () => /* @__PURE__ */ jsx19(DisplayIdHeader, {}),
3668
- cell: ({ getValue }) => /* @__PURE__ */ jsx19(DisplayIdCell, { displayId: getValue() })
3670
+ header: () => /* @__PURE__ */ jsx18(DisplayIdHeader, {}),
3671
+ cell: ({ getValue }) => /* @__PURE__ */ jsx18(DisplayIdCell, { displayId: getValue() })
3669
3672
  }),
3670
3673
  columnHelper.display({
3671
3674
  id: "seller",
3672
- header: () => /* @__PURE__ */ jsx19(TextHeader, { text: "Store" }),
3675
+ header: () => /* @__PURE__ */ jsx18(TextHeader, { text: "Store" }),
3673
3676
  cell: ({ row }) => {
3674
3677
  const seller = row.original.seller;
3675
- return /* @__PURE__ */ jsx19(TextCell, { text: seller?.name ?? "-" });
3678
+ return /* @__PURE__ */ jsx18(TextCell, { text: seller?.name ?? "-" });
3676
3679
  }
3677
3680
  }),
3678
3681
  columnHelper.accessor("created_at", {
3679
- header: () => /* @__PURE__ */ jsx19(DateHeader, {}),
3680
- cell: ({ getValue }) => /* @__PURE__ */ jsx19(DateCell, { date: new Date(getValue()) })
3682
+ header: () => /* @__PURE__ */ jsx18(DateHeader, {}),
3683
+ cell: ({ getValue }) => /* @__PURE__ */ jsx18(DateCell, { date: new Date(getValue()) })
3681
3684
  }),
3682
3685
  columnHelper.accessor("payment_status", {
3683
- header: () => /* @__PURE__ */ jsx19(PaymentStatusHeader, {}),
3684
- cell: ({ getValue }) => /* @__PURE__ */ jsx19(PaymentStatusCell, { status: getValue() })
3686
+ header: () => /* @__PURE__ */ jsx18(PaymentStatusHeader, {}),
3687
+ cell: ({ getValue }) => /* @__PURE__ */ jsx18(PaymentStatusCell, { status: getValue() })
3685
3688
  }),
3686
3689
  columnHelper.accessor("fulfillment_status", {
3687
- header: () => /* @__PURE__ */ jsx19(FulfillmentStatusHeader, {}),
3688
- cell: ({ getValue }) => /* @__PURE__ */ jsx19(FulfillmentStatusCell, { status: getValue() })
3690
+ header: () => /* @__PURE__ */ jsx18(FulfillmentStatusHeader, {}),
3691
+ cell: ({ getValue }) => /* @__PURE__ */ jsx18(FulfillmentStatusCell, { status: getValue() })
3689
3692
  }),
3690
3693
  columnHelper.accessor("total", {
3691
- header: () => /* @__PURE__ */ jsx19(TotalHeader, {}),
3692
- cell: ({ getValue, row }) => /* @__PURE__ */ jsx19(
3694
+ header: () => /* @__PURE__ */ jsx18(TotalHeader, {}),
3695
+ cell: ({ getValue, row }) => /* @__PURE__ */ jsx18(
3693
3696
  TotalCell,
3694
3697
  {
3695
3698
  currencyCode: row.original.currency_code,
@@ -3703,7 +3706,7 @@ var useColumns = () => {
3703
3706
  };
3704
3707
 
3705
3708
  // src/pages/orders/order-detail/order-detail.tsx
3706
- import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
3709
+ import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
3707
3710
  var Root = ({ children }) => {
3708
3711
  const initialData = useLoaderData();
3709
3712
  const { id } = useParams2();
@@ -3731,12 +3734,12 @@ var Root = ({ children }) => {
3731
3734
  id
3732
3735
  );
3733
3736
  if (isLoading || !order || isPreviewLoading) {
3734
- return /* @__PURE__ */ jsx20(TwoColumnPageSkeleton, { mainSections: 4, sidebarSections: 2, showJSON: true });
3737
+ return /* @__PURE__ */ jsx19(TwoColumnPageSkeleton, { mainSections: 4, sidebarSections: 2, showJSON: true });
3735
3738
  }
3736
3739
  if (isError) {
3737
3740
  throw error;
3738
3741
  }
3739
- return Children.count(children) > 0 ? /* @__PURE__ */ jsx20(
3742
+ return Children.count(children) > 0 ? /* @__PURE__ */ jsx19(
3740
3743
  TwoColumnPage,
3741
3744
  {
3742
3745
  data: order,
@@ -3746,7 +3749,7 @@ var Root = ({ children }) => {
3746
3749
  "data-testid": "order-detail-page",
3747
3750
  children
3748
3751
  }
3749
- ) : /* @__PURE__ */ jsxs20(
3752
+ ) : /* @__PURE__ */ jsxs19(
3750
3753
  TwoColumnPage,
3751
3754
  {
3752
3755
  data: order,
@@ -3755,21 +3758,20 @@ var Root = ({ children }) => {
3755
3758
  hasOutlet: true,
3756
3759
  "data-testid": "order-detail-page",
3757
3760
  children: [
3758
- /* @__PURE__ */ jsx20(TwoColumnPage.Main, { "data-testid": "order-detail-main", children: /* @__PURE__ */ jsxs20(WidgetZone, { id: "orders.detail.main", data: order, children: [
3759
- /* @__PURE__ */ jsx20(OrderActiveEditSection, { order }),
3760
- /* @__PURE__ */ jsx20(ActiveOrderClaimSection, { orderPreview }),
3761
- /* @__PURE__ */ jsx20(ActiveOrderExchangeSection, { orderPreview }),
3762
- /* @__PURE__ */ jsx20(ActiveOrderReturnSection, { orderPreview }),
3763
- /* @__PURE__ */ jsx20(OrderGeneralSection, { order }),
3764
- /* @__PURE__ */ jsx20(OrderSummarySection, { order }),
3765
- /* @__PURE__ */ jsx20(OrderCommissionSection, { order }),
3766
- /* @__PURE__ */ jsx20(OrderPaymentSection, { order }),
3767
- /* @__PURE__ */ jsx20(OrderFulfillmentSection, { order })
3761
+ /* @__PURE__ */ jsx19(TwoColumnPage.Main, { "data-testid": "order-detail-main", children: /* @__PURE__ */ jsxs19(WidgetZone, { id: "orders.detail.main", data: order, children: [
3762
+ /* @__PURE__ */ jsx19(OrderActiveEditSection, { order }),
3763
+ /* @__PURE__ */ jsx19(ActiveOrderClaimSection, { orderPreview }),
3764
+ /* @__PURE__ */ jsx19(ActiveOrderExchangeSection, { orderPreview }),
3765
+ /* @__PURE__ */ jsx19(ActiveOrderReturnSection, { orderPreview }),
3766
+ /* @__PURE__ */ jsx19(OrderGeneralSection, { order }),
3767
+ /* @__PURE__ */ jsx19(OrderSummarySection, { order }),
3768
+ /* @__PURE__ */ jsx19(OrderPaymentSection, { order }),
3769
+ /* @__PURE__ */ jsx19(OrderFulfillmentSection, { order })
3768
3770
  ] }) }),
3769
- /* @__PURE__ */ jsx20(TwoColumnPage.Sidebar, { "data-testid": "order-detail-sidebar", children: /* @__PURE__ */ jsxs20(WidgetZone, { id: "orders.detail.side", data: order, children: [
3770
- /* @__PURE__ */ jsx20(OrderCustomerSection, { order }),
3771
- /* @__PURE__ */ jsx20(OrderActivitySection, { order }),
3772
- /* @__PURE__ */ jsx20(OrderRemainingOrdersGroupSection, {})
3771
+ /* @__PURE__ */ jsx19(TwoColumnPage.Sidebar, { "data-testid": "order-detail-sidebar", children: /* @__PURE__ */ jsxs19(WidgetZone, { id: "orders.detail.side", data: order, children: [
3772
+ /* @__PURE__ */ jsx19(OrderCustomerSection, { order }),
3773
+ /* @__PURE__ */ jsx19(OrderActivitySection, { order }),
3774
+ /* @__PURE__ */ jsx19(OrderRemainingOrdersGroupSection, {})
3773
3775
  ] }) })
3774
3776
  ]
3775
3777
  }