@mercurjs/vendor 2.1.2 → 2.2.0-canary.1

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 (230) hide show
  1. package/dist/{[id]-PDGHF5J2.js → [id]-2DQX3YWJ.js} +35 -31
  2. package/dist/{[id]-TO6KT3ZE.js → [id]-4OBGG7OH.js} +23 -21
  3. package/dist/{[id]-X4DDKOMQ.js → [id]-4PKMKNJH.js} +26 -22
  4. package/dist/[id]-4STHLE4N.js +1442 -0
  5. package/dist/{[id]-4VCL3MMM.js → [id]-5UFO4RKF.js} +26 -22
  6. package/dist/{[id]-H3C3ZSC6.js → [id]-6MXCVV5J.js} +25 -21
  7. package/dist/{[id]-6PXEWRG7.js → [id]-7BAKUHUO.js} +13 -13
  8. package/dist/{[id]-7RUAH3TI.js → [id]-K2CT7BXQ.js} +4 -4
  9. package/dist/{[id]-3G5G7ZFV.js → [id]-KJIQTFGE.js} +22 -20
  10. package/dist/{[id]-INOFZHL7.js → [id]-LTNOHLGE.js} +16 -16
  11. package/dist/{[id]-B3LHVQM5.js → [id]-PGIT5WJC.js} +25 -21
  12. package/dist/{[id]-T2ROPEGY.js → [id]-Y2ISCLUD.js} +7 -7
  13. package/dist/{[id]-Y7GAMNC5.js → [id]-ZCMSBEVM.js} +4 -4
  14. package/dist/{[id]-UTKO3VG4.js → [id]-ZWWMJAKI.js} +9 -9
  15. package/dist/{[location_id]-D55RQOXT.js → [location_id]-NUBXDDJC.js} +9 -9
  16. package/dist/{[province_id]-OFH2ZOFQ.js → [province_id]-H2QAPKVH.js} +20 -18
  17. package/dist/{add-C6OX5C54.js → add-GZJ7OMV3.js} +34 -30
  18. package/dist/add-KQAABWCR.js +392 -0
  19. package/dist/{add-customer-groups-PJRJUWS2.js → add-customer-groups-RAHCP67U.js} +16 -14
  20. package/dist/{add-products-INOLNPO6.js → add-products-TSVQHC67.js} +23 -19
  21. package/dist/{add-promotions-AHDOP52Q.js → add-promotions-CSCAJZHV.js} +7 -7
  22. package/dist/{add-to-campaign-HL6NGRR4.js → add-to-campaign-DLP7PSQB.js} +4 -4
  23. package/dist/{address-KRENKSLP.js → address-7F5SN7PV.js} +17 -15
  24. package/dist/{adjust-inventory-H4EUP7J3.js → adjust-inventory-SZF4W7LR.js} +2 -2
  25. package/dist/{allocate-items-SUCUZU4D.js → allocate-items-SDFS5GYN.js} +6 -6
  26. package/dist/{areas-UUMZDXLX.js → areas-7Y6BVS5A.js} +8 -8
  27. package/dist/{attributes-CALEHJJG.js → attributes-MBZ76HVZ.js} +3 -3
  28. package/dist/{breadcrumb-BS7Y5OKF.js → breadcrumb-65SAGUUL.js} +2 -2
  29. package/dist/{breadcrumb-6W2VP3OZ.js → breadcrumb-7PURSRTT.js} +13 -11
  30. package/dist/{breadcrumb-M5Z5WA6I.js → breadcrumb-EDPMEN2P.js} +2 -2
  31. package/dist/breadcrumb-FLDHJRVY.js +26 -0
  32. package/dist/{breadcrumb-VNNZ3TTW.js → breadcrumb-HND5FFWC.js} +2 -2
  33. package/dist/{breadcrumb-OIGGCB3L.js → breadcrumb-QV2IAX7N.js} +8 -2
  34. package/dist/{breadcrumb-KQSFIXQ4.js → breadcrumb-VWELWDB2.js} +1 -1
  35. package/dist/{breadcrumb-IG7VZGW2.js → breadcrumb-WRG4SITG.js} +13 -11
  36. package/dist/{breadcrumb-TW5JEOYS.js → breadcrumb-ZCG2RHIU.js} +12 -10
  37. package/dist/{campaigns-HS6MIO7X.js → campaigns-L6ULR6KR.js} +5 -5
  38. package/dist/{categories-PKWR3FM3.js → categories-FUZQKBXV.js} +6 -6
  39. package/dist/{chunk-PDQSPKG5.js → chunk-2DXNJURE.js} +1 -1
  40. package/dist/{chunk-ZZO3INVE.js → chunk-2MDGYHWN.js} +128 -25
  41. package/dist/{chunk-5UD4P6YL.js → chunk-2USXZSTK.js} +4 -4
  42. package/dist/{chunk-6SBMVLJ2.js → chunk-36L54SQQ.js} +1 -1
  43. package/dist/chunk-37G4Y5I7.js +101 -0
  44. package/dist/{chunk-5M3SL4UZ.js → chunk-3CVJA5UE.js} +9 -104
  45. package/dist/chunk-432S4FGR.js +0 -0
  46. package/dist/{chunk-KQGVSLUI.js → chunk-44RQ5PTN.js} +1803 -914
  47. package/dist/{chunk-Y2QI7KWS.js → chunk-4LVP635F.js} +408 -664
  48. package/dist/{chunk-UL4O5M4S.js → chunk-4S6XGIC6.js} +1 -18
  49. package/dist/chunk-5ZVWOCAC.js +426 -0
  50. package/dist/{chunk-WITQNQXN.js → chunk-6BS2AVGJ.js} +3 -3
  51. package/dist/{chunk-ZYOXKUKZ.js → chunk-7LBY5JLV.js} +1 -1
  52. package/dist/chunk-7SLWXX6L.js +811 -0
  53. package/dist/{chunk-LQYMBSRQ.js → chunk-AIZM66CG.js} +1 -1
  54. package/dist/{chunk-IZ5RG5XI.js → chunk-AJLGY3LQ.js} +1 -21
  55. package/dist/{chunk-WFE6CT6M.js → chunk-AVOIZO63.js} +21 -77
  56. package/dist/chunk-C2FG3SX2.js +68 -0
  57. package/dist/chunk-CFRWIQIZ.js +43 -0
  58. package/dist/{chunk-WNVEMFIK.js → chunk-CNMY5HVP.js} +2 -2
  59. package/dist/{chunk-BLVJAKBA.js → chunk-DDH7ULIQ.js} +1 -1
  60. package/dist/chunk-DIW4GRTI.js +503 -0
  61. package/dist/{chunk-JQP7MOFH.js → chunk-DVEKYLPV.js} +1 -1
  62. package/dist/{chunk-QX45GVAL.js → chunk-EIUYXS7E.js} +8 -8
  63. package/dist/{chunk-N7OVXN72.js → chunk-EROX26D4.js} +1 -1
  64. package/dist/{chunk-2RHAI7WK.js → chunk-EZ3JOAUS.js} +1 -1
  65. package/dist/{chunk-HFRHHT36.js → chunk-FDR22JMM.js} +63 -8
  66. package/dist/{chunk-PEKANQ3T.js → chunk-FJUUGFXL.js} +2 -2
  67. package/dist/{chunk-3CK6OINO.js → chunk-GDWBOQI5.js} +3 -5
  68. package/dist/{chunk-47SXTGLN.js → chunk-GXIAIITP.js} +63 -200
  69. package/dist/{chunk-4MFMCZEJ.js → chunk-H6LZ77GX.js} +2 -2
  70. package/dist/chunk-IWLDKGYQ.js +95 -0
  71. package/dist/chunk-K4X324QP.js +18 -0
  72. package/dist/{chunk-VQ5EKDA3.js → chunk-KD7RYE6R.js} +1 -1
  73. package/dist/chunk-LEWA4BPH.js +18 -0
  74. package/dist/{chunk-7Q5SDEK7.js → chunk-LNM2D2I4.js} +4 -4
  75. package/dist/{chunk-LPOAVK6Y.js → chunk-LQD232FW.js} +47 -12
  76. package/dist/{chunk-OXXL4WQU.js → chunk-M7KSRYRI.js} +5 -5
  77. package/dist/chunk-MBFHMJHN.js +2063 -0
  78. package/dist/{chunk-I2IKYOZX.js → chunk-N4MVIBFM.js} +19 -19
  79. package/dist/{chunk-PCMNEUMV.js → chunk-NHFEY3EI.js} +1 -1
  80. package/dist/{chunk-RTAWYMQP.js → chunk-NJMNYS7G.js} +1 -1
  81. package/dist/{chunk-HGQTL7NX.js → chunk-NSZQERLE.js} +2 -2
  82. package/dist/{chunk-RL7SFZOF.js → chunk-NXNJQZCP.js} +1 -1
  83. package/dist/{chunk-CNLP35S7.js → chunk-OD3U3TX4.js} +16 -31
  84. package/dist/{chunk-D2MA5TAP.js → chunk-PBD36EZJ.js} +2 -2
  85. package/dist/{chunk-4ZGFODSC.js → chunk-PZ44R4AS.js} +1 -1
  86. package/dist/{chunk-ZEVYT6IX.js → chunk-QNNJN4H6.js} +116 -286
  87. package/dist/{chunk-WBI7FEGI.js → chunk-QS6RWIBL.js} +1 -1
  88. package/dist/chunk-QT7YFHCA.js +198 -0
  89. package/dist/{chunk-GYV6SKY7.js → chunk-QXLRABYH.js} +4 -6
  90. package/dist/chunk-RXZFEFNV.js +73 -0
  91. package/dist/{chunk-RUE5BPC2.js → chunk-RZLN2Q6G.js} +1 -1
  92. package/dist/{chunk-NYDJTWRL.js → chunk-SGR4DMCW.js} +4 -4
  93. package/dist/chunk-T6LHVNWO.js +27 -0
  94. package/dist/{chunk-DKQ4XMSN.js → chunk-TNVYTMBL.js} +6 -6
  95. package/dist/{chunk-32RYSB2V.js → chunk-TODJFRLH.js} +2 -2
  96. package/dist/{chunk-P3ZTO6T2.js → chunk-UAF2S447.js} +1 -1
  97. package/dist/{chunk-J6BRLL3F.js → chunk-UCQKXXLD.js} +2 -2
  98. package/dist/chunk-UORPTGV2.js +114 -0
  99. package/dist/{chunk-CYTNBXWF.js → chunk-UX7J5NZG.js} +9 -9
  100. package/dist/{chunk-X4FLOQ45.js → chunk-WBHFU3MG.js} +2 -2
  101. package/dist/chunk-WLT7K7K7.js +63 -0
  102. package/dist/{chunk-4URLUCTD.js → chunk-WUPJADSO.js} +2 -2
  103. package/dist/{chunk-ITI54CII.js → chunk-X4INVIWL.js} +5 -5
  104. package/dist/{chunk-PTW7JNAP.js → chunk-XFQJU6FA.js} +4 -4
  105. package/dist/{collections-DJZI2RM2.js → collections-3OPR3DSD.js} +22 -19
  106. package/dist/{configuration-RHPIO2QT.js → configuration-C4IGBNXH.js} +1 -1
  107. package/dist/{configuration-GN3TO77H.js → configuration-UOSNP45I.js} +3 -3
  108. package/dist/{create-3EK5CNNX.js → create-2MQFQHTE.js} +33 -29
  109. package/dist/{create-YO55Z3YD.js → create-2PCLG7TV.js} +32 -38
  110. package/dist/{create-G4T2PAJH.js → create-35MYQPVM.js} +23 -21
  111. package/dist/{create-HKJVSFB7.js → create-BJ4OO6LS.js} +23 -21
  112. package/dist/create-DDPIXCXT.js +210 -0
  113. package/dist/{create-7S7CZWEN.js → create-GB3ZA4LH.js} +4 -4
  114. package/dist/create-JDGM5KXE.js +193 -0
  115. package/dist/{create-IDVCZHIX.js → create-ORXYT74H.js} +14 -12
  116. package/dist/{create-GHM7OTCR.js → create-R7K3ECN6.js} +1 -1
  117. package/dist/{create-D6EW3EWC.js → create-SFU3W3ZH.js} +1 -1
  118. package/dist/{create-3ZVXEPX5.js → create-SQ3FYMGI.js} +25 -21
  119. package/dist/{create-33TRLASX.js → create-UPYB65PD.js} +1 -1
  120. package/dist/{create-OCFPLNNY.js → create-UQNYMVBM.js} +6 -6
  121. package/dist/{create-OGLPDVOI.js → create-XAD5NMSJ.js} +37 -35
  122. package/dist/{create-KGYL7FBM.js → create-XVHOCZHJ.js} +1 -1
  123. package/dist/{create-4AE3VTWN.js → create-YBF4YGWG.js} +2 -2
  124. package/dist/{customers-6ZLE65UX.js → customers-ETXVNM3G.js} +5 -5
  125. package/dist/{edit-QBISX7D3.js → edit-2Q7TRUTL.js} +14 -12
  126. package/dist/{edit-B5B3XKDM.js → edit-522DG3BY.js} +1 -1
  127. package/dist/{edit-ATXE6CM5.js → edit-C4OCKQVU.js} +1 -1
  128. package/dist/{edit-IR6V2IDN.js → edit-FKXIQ6ZI.js} +19 -17
  129. package/dist/{edit-4HZHLYI3.js → edit-GQNIINRR.js} +1 -1
  130. package/dist/{edit-LRRJTHV2.js → edit-KAKVPHZZ.js} +1 -1
  131. package/dist/{edit-ZSOI56BQ.js → edit-L5ZZLMAY.js} +22 -22
  132. package/dist/{edit-FNDDSSMT.js → edit-NYD45J2Q.js} +37 -8
  133. package/dist/{edit-GIJXLMC3.js → edit-O4JLGKQR.js} +2 -2
  134. package/dist/{edit-5CJZRHAA.js → edit-ORXS3A2Y.js} +1 -1
  135. package/dist/{edit-FC64DWB2.js → edit-Q3UQIOLS.js} +1 -1
  136. package/dist/{edit-7HTH2UJF.js → edit-REDDBLTA.js} +3 -3
  137. package/dist/{edit-2KRJIPRK.js → edit-SGUY2CCK.js} +19 -17
  138. package/dist/{edit-B75KK5ZX.js → edit-SWRWWFW6.js} +35 -31
  139. package/dist/{edit-7GVP6SRA.js → edit-ZAHCMF5U.js} +1 -1
  140. package/dist/{edit-RNT555GP.js → edit-ZCXUG42Q.js} +13 -11
  141. package/dist/{edit-MYSWY6W4.js → edit-ZMERG3L7.js} +1 -1
  142. package/dist/{edit-budget-J27CSEZH.js → edit-budget-L3CCEWNF.js} +1 -1
  143. package/dist/{edit-inventory-item-US77M2FF.js → edit-inventory-item-6B7ITDGD.js} +2 -2
  144. package/dist/{edit-inventory-item-attributes-UGAE2NAZ.js → edit-inventory-item-attributes-Y7MQZLXI.js} +3 -3
  145. package/dist/{fulfillment-DCS67LTK.js → fulfillment-75Z4H23W.js} +16 -14
  146. package/dist/{fulfillment-providers-GM5PO6N3.js → fulfillment-providers-KCQWL62T.js} +20 -17
  147. package/dist/index.css +27 -62
  148. package/dist/index.d.ts +3 -10
  149. package/dist/index.js +522 -458
  150. package/dist/{inventory-OPZ2FSEE.js → inventory-KAUVPMPZ.js} +6 -6
  151. package/dist/{invite-764K3TJS.js → invite-6CPYVHDX.js} +24 -21
  152. package/dist/{invite-KEJLNXEZ.js → invite-CI2P4GF6.js} +15 -12
  153. package/dist/loader-FBB5OQRT.js +31 -0
  154. package/dist/{locations-ZVPTQCQY.js → locations-INS6FTMJ.js} +4 -4
  155. package/dist/{login-OUHRNNXA.js → login-KY342RMK.js} +12 -10
  156. package/dist/{manage-locations-YUKEFCBJ.js → manage-locations-WNHEBS3A.js} +2 -2
  157. package/dist/{media-4KYFHB5V.js → media-KOYAOXG6.js} +41 -9
  158. package/dist/{metadata-NYYL26MQ.js → metadata-2CMH4I6U.js} +16 -14
  159. package/dist/{metadata-AWUKZ25V.js → metadata-5BPOBBU2.js} +3 -3
  160. package/dist/{metadata-OCE6A3JE.js → metadata-GWI6R4ES.js} +15 -13
  161. package/dist/{metadata-G7KZXVNE.js → metadata-NUXUC2JA.js} +15 -13
  162. package/dist/{metadata-XP3ZYW2M.js → metadata-TLDUF5KV.js} +17 -15
  163. package/dist/{metadata-PYY4IB7K.js → metadata-WR4RFXO5.js} +16 -14
  164. package/dist/offer-create-page-YKMHHTU5.js +743 -0
  165. package/dist/offer-detail-page-6MAHNNIO.js +488 -0
  166. package/dist/offer-edit-page-DYQFU6JU.js +151 -0
  167. package/dist/offer-inventory-batch-page-WKCWNDNK.js +290 -0
  168. package/dist/offer-pricing-edit-page-4TYGGSOE.js +195 -0
  169. package/dist/offers-UGQJNGTD.js +32 -0
  170. package/dist/{onboarding-WXZHW62K.js → onboarding-43LQQQGQ.js} +22 -20
  171. package/dist/{orders-LWJ472VM.js → orders-R2LOJ6N5.js} +24 -21
  172. package/dist/organization-XGFU4YDG.js +375 -0
  173. package/dist/{organize-RFOMQCBG.js → organize-HNJUHEEG.js} +4 -4
  174. package/dist/{organize-OVKJ3HZO.js → organize-K6QMAMEN.js} +4 -4
  175. package/dist/pages/index.d.ts +415 -758
  176. package/dist/pages/index.js +81 -77
  177. package/dist/{payment-details-UVXYCTUK.js → payment-details-64US5XWD.js} +17 -15
  178. package/dist/{payouts-TR7K5I37.js → payouts-UXJDTXDL.js} +6 -6
  179. package/dist/{price-lists-S2WNELFZ.js → price-lists-KBPUVSZI.js} +8 -8
  180. package/dist/{pricing-UF27DAXA.js → pricing-DF6C5XK4.js} +35 -32
  181. package/dist/{product-tags-2CKH2M6D.js → product-tags-CL7HSEDI.js} +32 -28
  182. package/dist/{product-types-FX43JEO2.js → product-types-UUHBV4IZ.js} +5 -5
  183. package/dist/product-variant-detail-RVWEYVPC.js +220 -0
  184. package/dist/{product-variant-edit-P3DSIFE3.js → product-variant-edit-MNCS7ZYW.js} +126 -66
  185. package/dist/{products-H5EMRJYS.js → products-4KV5Y2JY.js} +23 -19
  186. package/dist/{products-2LHGS7X3.js → products-SXYTQFJ3.js} +40 -43
  187. package/dist/{professional-details-HYKTH44B.js → professional-details-5T2VS6MM.js} +16 -14
  188. package/dist/{profile-PB27WIRW.js → profile-6XGHAT7H.js} +20 -18
  189. package/dist/{promotions-5EYPGHJP.js → promotions-O7U4BTK6.js} +8 -8
  190. package/dist/{register-4O4F6YZK.js → register-GDKN3SKM.js} +16 -14
  191. package/dist/{reset-password-GTWLBOFK.js → reset-password-EICPAY2N.js} +1 -1
  192. package/dist/{return-reasons-LOKYRGMI.js → return-reasons-M6IR77XW.js} +16 -14
  193. package/dist/{sales-channels-7R2IY3KG.js → sales-channels-B6FULRWI.js} +8 -7
  194. package/dist/{sales-channels-Y4LRP7JC.js → sales-channels-JW3QUYR7.js} +8 -7
  195. package/dist/{settings-2XDLFYMS.js → settings-SAAHTUZZ.js} +39 -35
  196. package/dist/{shipment-4GW2JFWB.js → shipment-Q33QBMXX.js} +13 -11
  197. package/dist/{shipping-profile-R3NABPQF.js → shipping-profile-Y4SNEPZX.js} +2 -2
  198. package/dist/{shipping-profiles-QVKNFLCW.js → shipping-profiles-2NWKCEJK.js} +18 -16
  199. package/dist/{stock-5RXNUPUT.js → stock-7CSVEJJU.js} +19 -17
  200. package/dist/{store-DE2RGX7T.js → store-GHFWU7EV.js} +28 -25
  201. package/dist/{store-closure-DNMCHUXD.js → store-closure-P5PD2RSV.js} +16 -14
  202. package/dist/{store-select-GZEJHRZ7.js → store-select-KDT6USQA.js} +17 -15
  203. package/dist/{tax-regions-UD6P5FVC.js → tax-regions-YXZW7UVX.js} +5 -5
  204. package/dist/{team-JXKAVRPU.js → team-EDJ62747.js} +25 -23
  205. package/dist/types-CtCEtTE6.d.ts +16 -0
  206. package/package.json +3 -3
  207. package/dist/[id]-BYP37PU4.js +0 -1314
  208. package/dist/add-KRAGFFBJ.js +0 -158
  209. package/dist/bulk-edit-3SMBLIOA.js +0 -244
  210. package/dist/chunk-4KX6CBJ4.js +0 -178
  211. package/dist/chunk-DLNNTQRY.js +0 -217
  212. package/dist/chunk-FX4V5JCF.js +0 -37
  213. package/dist/chunk-GC33DBKG.js +0 -143
  214. package/dist/chunk-NK4NR6MN.js +0 -173
  215. package/dist/chunk-PFU6FSXY.js +0 -430
  216. package/dist/chunk-QJEOPT2P.js +0 -330
  217. package/dist/chunk-QSGR43JM.js +0 -30
  218. package/dist/chunk-STR3NGWE.js +0 -3736
  219. package/dist/create-3DOO3RNH.js +0 -716
  220. package/dist/create-I7HV3RM6.js +0 -150
  221. package/dist/edit-K2AD335I.js +0 -237
  222. package/dist/edit-VO5XLIEL.js +0 -362
  223. package/dist/edit-stocks-and-prices-MHHQFWFA.js +0 -408
  224. package/dist/organization-LPYQRTQC.js +0 -303
  225. package/dist/prices-3OXV5RGY.js +0 -270
  226. package/dist/product-variant-detail-WV4KXVXR.js +0 -590
  227. package/dist/stock-GPC3BCL6.js +0 -500
  228. package/dist/{chunk-SDSEW72R.js → chunk-E2HQPY32.js} +3 -3
  229. package/dist/{chunk-6WY5X4PE.js → chunk-L7QKFC5N.js} +7 -7
  230. /package/dist/{chunk-CAS74NLJ.js → chunk-YV6MK4PZ.js} +0 -0
@@ -0,0 +1,488 @@
1
+ import {
2
+ useDeleteOfferAction
3
+ } from "./chunk-CFRWIQIZ.js";
4
+ import {
5
+ OFFER_DETAIL_FIELDS
6
+ } from "./chunk-RXZFEFNV.js";
7
+ import {
8
+ getLocaleAmount
9
+ } from "./chunk-PXYDR7WQ.js";
10
+ import "./chunk-FQERBIVS.js";
11
+ import {
12
+ PlaceholderCell
13
+ } from "./chunk-PHOCVOZ5.js";
14
+ import {
15
+ _DataTable,
16
+ useDataTable
17
+ } from "./chunk-AIF2KTEE.js";
18
+ import "./chunk-YN3FGNJM.js";
19
+ import "./chunk-KAZ5BYTQ.js";
20
+ import {
21
+ NoRecords
22
+ } from "./chunk-3EF54XFY.js";
23
+ import "./chunk-IQPN4PZJ.js";
24
+ import {
25
+ SectionRow
26
+ } from "./chunk-4TLP3TAA.js";
27
+ import {
28
+ TwoColumnPage
29
+ } from "./chunk-YV6MK4PZ.js";
30
+ import "./chunk-LRD242C7.js";
31
+ import "./chunk-QHQWEERJ.js";
32
+ import {
33
+ Thumbnail
34
+ } from "./chunk-WIYFXWRI.js";
35
+ import {
36
+ TwoColumnPageSkeleton
37
+ } from "./chunk-INNFZYX2.js";
38
+ import {
39
+ useOffer
40
+ } from "./chunk-UORPTGV2.js";
41
+ import {
42
+ ActionMenu
43
+ } from "./chunk-BDGZ4EQO.js";
44
+ import "./chunk-LAVHRER2.js";
45
+ import "./chunk-Y7QKP6QU.js";
46
+ import "./chunk-RHKRREUU.js";
47
+ import "./chunk-ZA2KFUFR.js";
48
+ import "./chunk-RIN4CBRB.js";
49
+ import "./chunk-NBMM2TZK.js";
50
+
51
+ // src/pages/offers/[id]/offer-detail-page.tsx
52
+ import { Children } from "react";
53
+ import { useLoaderData, useParams } from "react-router-dom";
54
+
55
+ // src/pages/offers/[id]/_components/offer-general-section.tsx
56
+ import { Component, PencilSquare, Trash } from "@medusajs/icons";
57
+ import { Container, Heading } from "@medusajs/ui";
58
+ import { useTranslation } from "react-i18next";
59
+ import { jsx, jsxs } from "react/jsx-runtime";
60
+ var formatDate = (value) => {
61
+ if (!value) return "-";
62
+ try {
63
+ return new Intl.DateTimeFormat(void 0, {
64
+ dateStyle: "medium",
65
+ timeStyle: "short"
66
+ }).format(new Date(value));
67
+ } catch {
68
+ return "-";
69
+ }
70
+ };
71
+ var OfferGeneralSection = ({ offer }) => {
72
+ const { t } = useTranslation();
73
+ const handleDelete = useDeleteOfferAction({
74
+ id: offer.id,
75
+ sku: offer.sku ?? "",
76
+ redirectOnSuccess: true
77
+ });
78
+ const hasKit = (offer.inventory_item_link?.length ?? 0) > 1;
79
+ const variantTitle = offer.product_variant?.title ?? "";
80
+ return /* @__PURE__ */ jsxs(
81
+ Container,
82
+ {
83
+ className: "divide-y p-0",
84
+ "data-testid": "offer-detail-general-section",
85
+ children: [
86
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
87
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
88
+ /* @__PURE__ */ jsx(Heading, { title: variantTitle, children: variantTitle }),
89
+ hasKit && /* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted font-normal", children: /* @__PURE__ */ jsx(Component, {}) })
90
+ ] }),
91
+ /* @__PURE__ */ jsx(
92
+ ActionMenu,
93
+ {
94
+ groups: [
95
+ {
96
+ actions: [
97
+ {
98
+ icon: /* @__PURE__ */ jsx(PencilSquare, {}),
99
+ label: t("actions.edit"),
100
+ to: "edit"
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ actions: [
106
+ {
107
+ icon: /* @__PURE__ */ jsx(Trash, {}),
108
+ label: t("actions.delete"),
109
+ onClick: handleDelete
110
+ }
111
+ ]
112
+ }
113
+ ]
114
+ }
115
+ )
116
+ ] }),
117
+ /* @__PURE__ */ jsx(SectionRow, { title: t("offers.fields.sku"), value: offer.sku ?? "-" }),
118
+ /* @__PURE__ */ jsx(SectionRow, { title: t("offers.fields.ean"), value: offer.ean ?? "-" }),
119
+ /* @__PURE__ */ jsx(SectionRow, { title: t("offers.fields.upc"), value: offer.upc ?? "-" }),
120
+ /* @__PURE__ */ jsx(
121
+ SectionRow,
122
+ {
123
+ title: t("shippingProfile.domain"),
124
+ value: offer.shipping_profile?.name ?? "-"
125
+ }
126
+ ),
127
+ /* @__PURE__ */ jsx(
128
+ SectionRow,
129
+ {
130
+ title: t("fields.createdAt"),
131
+ value: formatDate(offer.created_at)
132
+ }
133
+ ),
134
+ /* @__PURE__ */ jsx(
135
+ SectionRow,
136
+ {
137
+ title: t("fields.updatedAt"),
138
+ value: formatDate(offer.updated_at)
139
+ }
140
+ )
141
+ ]
142
+ }
143
+ );
144
+ };
145
+
146
+ // src/pages/offers/[id]/_components/offer-inventory-section.tsx
147
+ import { Buildings, Component as Component2 } from "@medusajs/icons";
148
+ import { Container as Container2, Heading as Heading2, Text } from "@medusajs/ui";
149
+ import { createColumnHelper } from "@tanstack/react-table";
150
+ import { useMemo } from "react";
151
+ import { useTranslation as useTranslation2 } from "react-i18next";
152
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
153
+ var columnHelper = createColumnHelper();
154
+ var PAGE_SIZE = 20;
155
+ var computeAvailable = (row) => {
156
+ const levels = row.location_levels ?? [];
157
+ let quantity = 0;
158
+ let locations = 0;
159
+ for (const level of levels) {
160
+ if (level.available_quantity != null) {
161
+ quantity += level.available_quantity;
162
+ } else {
163
+ const stocked = level.stocked_quantity ?? 0;
164
+ const reserved = level.reserved_quantity ?? 0;
165
+ quantity += Math.max(0, stocked - reserved);
166
+ }
167
+ locations += 1;
168
+ }
169
+ return { quantity, locations };
170
+ };
171
+ var InventoryActions = ({ item }) => {
172
+ const { t } = useTranslation2();
173
+ return /* @__PURE__ */ jsx2(
174
+ ActionMenu,
175
+ {
176
+ groups: [
177
+ {
178
+ actions: [
179
+ {
180
+ icon: /* @__PURE__ */ jsx2(Buildings, {}),
181
+ label: t("offers.detail.goToInventoryItem"),
182
+ to: `/inventory/${item.id}`
183
+ }
184
+ ]
185
+ }
186
+ ]
187
+ }
188
+ );
189
+ };
190
+ var OfferInventorySection = ({ offer }) => {
191
+ const { t } = useTranslation2();
192
+ const inventoryItems = useMemo(() => {
193
+ const links = offer.inventory_item_link ?? [];
194
+ return links.map((link) => {
195
+ const item = link.inventory_item;
196
+ if (!item?.id) return null;
197
+ return {
198
+ id: item.id,
199
+ title: item.title,
200
+ sku: item.sku,
201
+ required_quantity: link.required_quantity,
202
+ location_levels: item.location_levels
203
+ };
204
+ }).filter((x) => x !== null);
205
+ }, [offer.inventory_item_link]);
206
+ const columns = useMemo(
207
+ () => [
208
+ columnHelper.accessor("title", {
209
+ header: t("fields.title"),
210
+ cell: ({ getValue }) => {
211
+ const title = getValue();
212
+ if (!title) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
213
+ return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2("span", { className: "truncate", children: title }) });
214
+ }
215
+ }),
216
+ columnHelper.accessor("sku", {
217
+ header: t("offers.fields.sku"),
218
+ cell: ({ getValue }) => {
219
+ const sku = getValue();
220
+ if (!sku) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
221
+ return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2("span", { className: "truncate", children: sku }) });
222
+ }
223
+ }),
224
+ columnHelper.accessor("required_quantity", {
225
+ header: t("offers.fields.requiredQuantity"),
226
+ cell: ({ getValue }) => {
227
+ const value = getValue();
228
+ if (value == null) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
229
+ return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2("span", { className: "truncate", children: value }) });
230
+ }
231
+ }),
232
+ columnHelper.display({
233
+ id: "inventory",
234
+ header: t("fields.inventory"),
235
+ cell: ({ row }) => {
236
+ const { quantity, locations } = computeAvailable(row.original);
237
+ if (locations === 0) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
238
+ const text = `${quantity} available at ${locations} ${locations === 1 ? "location" : "locations"}`;
239
+ return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2(
240
+ Text,
241
+ {
242
+ size: "small",
243
+ className: quantity === 0 ? "text-ui-fg-error truncate" : "truncate",
244
+ children: text
245
+ }
246
+ ) });
247
+ }
248
+ }),
249
+ columnHelper.display({
250
+ id: "actions",
251
+ cell: ({ row }) => /* @__PURE__ */ jsx2(InventoryActions, { item: row.original })
252
+ })
253
+ ],
254
+ [t]
255
+ );
256
+ const { table } = useDataTable({
257
+ data: inventoryItems,
258
+ columns,
259
+ count: inventoryItems.length,
260
+ enablePagination: true,
261
+ getRowId: (row) => row.id,
262
+ pageSize: PAGE_SIZE
263
+ });
264
+ const hasKit = inventoryItems.length > 1;
265
+ return /* @__PURE__ */ jsxs2(
266
+ Container2,
267
+ {
268
+ className: "divide-y p-0",
269
+ "data-testid": "offer-detail-inventory-section",
270
+ children: [
271
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
272
+ /* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("offers.detail.inventoryItems") }),
273
+ /* @__PURE__ */ jsx2(
274
+ ActionMenu,
275
+ {
276
+ groups: [
277
+ {
278
+ actions: [
279
+ {
280
+ icon: hasKit ? /* @__PURE__ */ jsx2(Component2, {}) : /* @__PURE__ */ jsx2(Buildings, {}),
281
+ label: hasKit ? t("offers.detail.manageKit") : t("offers.actions.manage_inventory"),
282
+ to: "inventory"
283
+ }
284
+ ]
285
+ }
286
+ ]
287
+ }
288
+ )
289
+ ] }),
290
+ inventoryItems.length === 0 ? /* @__PURE__ */ jsx2("div", { className: "px-6 py-8", children: /* @__PURE__ */ jsx2(Text, { size: "small", className: "text-ui-fg-subtle", children: t("offers.detail.noInventoryItems") }) }) : /* @__PURE__ */ jsx2(
291
+ _DataTable,
292
+ {
293
+ table,
294
+ columns,
295
+ pageSize: PAGE_SIZE,
296
+ count: inventoryItems.length,
297
+ navigateTo: (row) => `/inventory/${row.id}`
298
+ }
299
+ )
300
+ ]
301
+ }
302
+ );
303
+ };
304
+
305
+ // src/pages/offers/[id]/_components/offer-pricing-section.tsx
306
+ import { CurrencyDollar } from "@medusajs/icons";
307
+ import { Button, Container as Container3, Heading as Heading3 } from "@medusajs/ui";
308
+ import { useState } from "react";
309
+ import { useTranslation as useTranslation3 } from "react-i18next";
310
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
311
+ var PAGE_STEP = 3;
312
+ var hasRules = (price) => (price.rules_count ?? 0) > 0;
313
+ var OfferPricingSection = ({ offer }) => {
314
+ const { t } = useTranslation3();
315
+ const prices = (offer.price_set?.prices ?? []).filter((p) => !hasRules(p)).sort((a, b) => (a.currency_code ?? "").localeCompare(b.currency_code ?? ""));
316
+ const hasPrices = prices.length > 0;
317
+ const [pageSize, setPageSize] = useState(PAGE_STEP);
318
+ const displayPrices = prices.slice(0, pageSize);
319
+ return /* @__PURE__ */ jsxs3(
320
+ Container3,
321
+ {
322
+ className: "flex flex-col divide-y p-0",
323
+ "data-testid": "offer-detail-prices-section",
324
+ children: [
325
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
326
+ /* @__PURE__ */ jsx3(Heading3, { level: "h2", children: t("labels.prices") }),
327
+ /* @__PURE__ */ jsx3(
328
+ ActionMenu,
329
+ {
330
+ groups: [
331
+ {
332
+ actions: [
333
+ {
334
+ label: t("actions.edit"),
335
+ icon: /* @__PURE__ */ jsx3(CurrencyDollar, {}),
336
+ to: "pricing"
337
+ }
338
+ ]
339
+ }
340
+ ]
341
+ }
342
+ )
343
+ ] }),
344
+ !hasPrices && /* @__PURE__ */ jsx3(NoRecords, { className: "h-60" }),
345
+ displayPrices.map((price) => /* @__PURE__ */ jsxs3(
346
+ "div",
347
+ {
348
+ className: "txt-small text-ui-fg-subtle flex justify-between px-6 py-4",
349
+ children: [
350
+ /* @__PURE__ */ jsx3("span", { className: "font-medium", children: price.currency_code.toUpperCase() }),
351
+ /* @__PURE__ */ jsx3("span", { children: getLocaleAmount(price.amount, price.currency_code) })
352
+ ]
353
+ },
354
+ price.id ?? `${price.currency_code}-${price.amount}`
355
+ )),
356
+ hasPrices && prices.length > PAGE_STEP && /* @__PURE__ */ jsx3("div", { className: "txt-small text-ui-fg-subtle flex items-center justify-end px-6 py-4", children: /* @__PURE__ */ jsx3(
357
+ Button,
358
+ {
359
+ onClick: () => setPageSize((p) => p + PAGE_STEP),
360
+ disabled: pageSize >= prices.length,
361
+ className: "-mr-3 text-blue-500",
362
+ variant: "transparent",
363
+ children: t("actions.showMore")
364
+ }
365
+ ) })
366
+ ]
367
+ }
368
+ );
369
+ };
370
+
371
+ // src/pages/offers/[id]/_components/offer-variant-section.tsx
372
+ import { TriangleRightMini } from "@medusajs/icons";
373
+ import { Container as Container4, Heading as Heading4 } from "@medusajs/ui";
374
+ import { useTranslation as useTranslation4 } from "react-i18next";
375
+ import { Link } from "react-router-dom";
376
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
377
+ var OfferVariantSection = ({ offer }) => {
378
+ const { t } = useTranslation4();
379
+ const variant = offer.product_variant;
380
+ if (!variant?.id) {
381
+ return null;
382
+ }
383
+ const productId = variant.product_id ?? variant.product?.id;
384
+ const link = productId ? `/products/${productId}/variants/${variant.id}` : null;
385
+ const title = variant.product?.title ?? variant.title ?? variant.id;
386
+ const subtitle = variant.title ?? "";
387
+ const Inner = /* @__PURE__ */ jsx4(
388
+ "div",
389
+ {
390
+ className: "shadow-elevation-card-rest bg-ui-bg-component rounded-md px-4 py-2 transition-colors",
391
+ "data-testid": "offer-detail-variant",
392
+ children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3", children: [
393
+ /* @__PURE__ */ jsx4(
394
+ "div",
395
+ {
396
+ className: "shadow-elevation-card-rest rounded-md",
397
+ "data-testid": "offer-detail-variant-thumbnail",
398
+ children: /* @__PURE__ */ jsx4(Thumbnail, { src: variant.product?.thumbnail ?? null })
399
+ }
400
+ ),
401
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-1 flex-col", children: [
402
+ /* @__PURE__ */ jsx4(
403
+ "span",
404
+ {
405
+ className: "text-ui-fg-base font-medium",
406
+ "data-testid": "offer-detail-variant-title",
407
+ children: title
408
+ }
409
+ ),
410
+ /* @__PURE__ */ jsx4(
411
+ "span",
412
+ {
413
+ className: "text-ui-fg-subtle",
414
+ "data-testid": "offer-detail-variant-subtitle",
415
+ children: subtitle
416
+ }
417
+ )
418
+ ] }),
419
+ /* @__PURE__ */ jsx4("div", { className: "size-7 flex items-center justify-center", children: /* @__PURE__ */ jsx4(TriangleRightMini, { className: "text-ui-fg-muted rtl:rotate-180" }) })
420
+ ] })
421
+ }
422
+ );
423
+ return /* @__PURE__ */ jsxs4(Container4, { className: "p-0", "data-testid": "offer-detail-variant-section", children: [
424
+ /* @__PURE__ */ jsx4("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx4(Heading4, { level: "h2", children: t("offers.detail.productVariant") }) }),
425
+ /* @__PURE__ */ jsx4("div", { className: "txt-small flex flex-col gap-2 px-2 pb-2", children: link ? /* @__PURE__ */ jsx4(
426
+ Link,
427
+ {
428
+ to: link,
429
+ className: "outline-none focus-within:shadow-borders-interactive-with-focus rounded-md [&:hover>div]:bg-ui-bg-component-hover",
430
+ "data-testid": "offer-detail-variant-link",
431
+ children: Inner
432
+ }
433
+ ) : /* @__PURE__ */ jsx4("div", { children: Inner }) })
434
+ ] });
435
+ };
436
+
437
+ // src/pages/offers/[id]/offer-detail-page.tsx
438
+ import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
439
+ var Root = ({ children }) => {
440
+ const { id } = useParams();
441
+ const initialData = useLoaderData();
442
+ const {
443
+ offer,
444
+ isPending: isLoading,
445
+ isError,
446
+ error
447
+ } = useOffer(
448
+ id,
449
+ { fields: OFFER_DETAIL_FIELDS },
450
+ { initialData }
451
+ );
452
+ if (isError) {
453
+ throw error;
454
+ }
455
+ if (isLoading || !offer) {
456
+ return /* @__PURE__ */ jsx5(
457
+ TwoColumnPageSkeleton,
458
+ {
459
+ mainSections: 2,
460
+ sidebarSections: 2
461
+ }
462
+ );
463
+ }
464
+ const typedOffer = offer;
465
+ return /* @__PURE__ */ jsx5(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs5(TwoColumnPage, { data: typedOffer, hasOutlet: true, children: [
466
+ /* @__PURE__ */ jsxs5(TwoColumnPage.Main, { children: [
467
+ /* @__PURE__ */ jsx5(OfferGeneralSection, { offer: typedOffer }),
468
+ /* @__PURE__ */ jsx5(OfferInventorySection, { offer: typedOffer })
469
+ ] }),
470
+ /* @__PURE__ */ jsxs5(TwoColumnPage.Sidebar, { children: [
471
+ /* @__PURE__ */ jsx5(OfferVariantSection, { offer: typedOffer }),
472
+ /* @__PURE__ */ jsx5(OfferPricingSection, { offer: typedOffer })
473
+ ] })
474
+ ] }) });
475
+ };
476
+ var OfferDetailPage = Object.assign(Root, {
477
+ Main: TwoColumnPage.Main,
478
+ Sidebar: TwoColumnPage.Sidebar,
479
+ General: OfferGeneralSection,
480
+ Inventory: OfferInventorySection,
481
+ Variant: OfferVariantSection,
482
+ Pricing: OfferPricingSection
483
+ });
484
+ var Component3 = Root;
485
+ export {
486
+ Component3 as Component,
487
+ OfferDetailPage
488
+ };
@@ -0,0 +1,151 @@
1
+ import {
2
+ OFFER_DETAIL_FIELDS
3
+ } from "./chunk-RXZFEFNV.js";
4
+ import "./chunk-TKGWSUEI.js";
5
+ import {
6
+ KeyboundForm
7
+ } from "./chunk-U2ZFCAPX.js";
8
+ import {
9
+ RouteDrawer,
10
+ useRouteModal
11
+ } from "./chunk-GDWBOQI5.js";
12
+ import {
13
+ Form
14
+ } from "./chunk-3QSRE5LS.js";
15
+ import {
16
+ useShippingProfiles
17
+ } from "./chunk-IQWK723D.js";
18
+ import {
19
+ useOffer,
20
+ useUpdateOffer
21
+ } from "./chunk-UORPTGV2.js";
22
+ import {
23
+ useDocumentDirection
24
+ } from "./chunk-Y7QKP6QU.js";
25
+ import "./chunk-RHKRREUU.js";
26
+ import "./chunk-ZA2KFUFR.js";
27
+ import "./chunk-RIN4CBRB.js";
28
+ import "./chunk-NBMM2TZK.js";
29
+
30
+ // src/pages/offers/[id]/edit/offer-edit-page.tsx
31
+ import { Heading } from "@medusajs/ui";
32
+ import { useTranslation as useTranslation2 } from "react-i18next";
33
+ import { useParams } from "react-router-dom";
34
+
35
+ // src/pages/offers/[id]/edit/edit-offer-form/edit-offer-form.tsx
36
+ import { zodResolver } from "@hookform/resolvers/zod";
37
+ import { Button, Input, Select, toast } from "@medusajs/ui";
38
+ import { useForm } from "react-hook-form";
39
+ import { useTranslation } from "react-i18next";
40
+
41
+ // src/pages/offers/[id]/edit/edit-offer-form/schema.ts
42
+ import { z } from "zod";
43
+ var EditOfferSchema = z.object({
44
+ sku: z.string().min(1).max(64),
45
+ shipping_profile_id: z.string().min(1),
46
+ metadata: z.record(z.string(), z.unknown()).nullish()
47
+ });
48
+
49
+ // src/pages/offers/[id]/edit/edit-offer-form/edit-offer-form.tsx
50
+ import { jsx, jsxs } from "react/jsx-runtime";
51
+ var EditOfferForm = ({ offer }) => {
52
+ const { t } = useTranslation();
53
+ const dir = useDocumentDirection();
54
+ const { handleSuccess } = useRouteModal();
55
+ const { shipping_profiles } = useShippingProfiles({ limit: 1e3 });
56
+ const form = useForm({
57
+ defaultValues: {
58
+ sku: offer.sku ?? "",
59
+ shipping_profile_id: offer.shipping_profile_id ?? "",
60
+ metadata: offer.metadata ?? null
61
+ },
62
+ resolver: zodResolver(EditOfferSchema)
63
+ });
64
+ const { mutateAsync, isPending } = useUpdateOffer(offer.id);
65
+ const handleSubmit = form.handleSubmit(async (values) => {
66
+ await mutateAsync(
67
+ {
68
+ sku: values.sku,
69
+ shipping_profile_id: values.shipping_profile_id,
70
+ metadata: values.metadata ?? void 0
71
+ },
72
+ {
73
+ onSuccess: () => {
74
+ toast.success(t("offers.edit.successToast"));
75
+ handleSuccess();
76
+ },
77
+ onError: (error) => toast.error(error.message)
78
+ }
79
+ );
80
+ });
81
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
82
+ KeyboundForm,
83
+ {
84
+ onSubmit: handleSubmit,
85
+ className: "flex flex-1 flex-col overflow-hidden",
86
+ "data-testid": "offer-edit-form",
87
+ children: [
88
+ /* @__PURE__ */ jsxs(RouteDrawer.Body, { className: "flex flex-1 flex-col gap-y-4 overflow-auto", children: [
89
+ /* @__PURE__ */ jsx(
90
+ Form.Field,
91
+ {
92
+ control: form.control,
93
+ name: "sku",
94
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form.Item, { children: [
95
+ /* @__PURE__ */ jsx(Form.Label, { children: t("offers.fields.sku") }),
96
+ /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(Input, { maxLength: 64, autoComplete: "off", ...field }) }),
97
+ /* @__PURE__ */ jsx(Form.ErrorMessage, {})
98
+ ] })
99
+ }
100
+ ),
101
+ /* @__PURE__ */ jsx(
102
+ Form.Field,
103
+ {
104
+ control: form.control,
105
+ name: "shipping_profile_id",
106
+ render: ({ field: { ref: _r, onChange, ...f } }) => /* @__PURE__ */ jsxs(Form.Item, { children: [
107
+ /* @__PURE__ */ jsx(Form.Label, { children: t("offers.fields.shippingProfile") }),
108
+ /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsxs(Select, { ...f, onValueChange: onChange, dir, children: [
109
+ /* @__PURE__ */ jsx(Select.Trigger, { ref: _r, children: /* @__PURE__ */ jsx(Select.Value, {}) }),
110
+ /* @__PURE__ */ jsx(Select.Content, { children: (shipping_profiles ?? []).map((p) => /* @__PURE__ */ jsx(Select.Item, { value: p.id, children: p.name }, p.id)) })
111
+ ] }) }),
112
+ /* @__PURE__ */ jsx(Form.ErrorMessage, {})
113
+ ] })
114
+ }
115
+ )
116
+ ] }),
117
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
118
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", children: t("actions.cancel") }) }),
119
+ /* @__PURE__ */ jsx(Button, { type: "submit", size: "small", isLoading: isPending, children: t("actions.save") })
120
+ ] }) })
121
+ ]
122
+ }
123
+ ) });
124
+ };
125
+
126
+ // src/pages/offers/[id]/edit/offer-edit-page.tsx
127
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
128
+ var OfferEditPage = () => {
129
+ const { id } = useParams();
130
+ const { t } = useTranslation2();
131
+ const {
132
+ offer,
133
+ isPending,
134
+ isError,
135
+ error
136
+ } = useOffer(id, { fields: OFFER_DETAIL_FIELDS });
137
+ if (isError) throw error;
138
+ const ready = !isPending && !!offer;
139
+ return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
140
+ /* @__PURE__ */ jsxs2(RouteDrawer.Header, { children: [
141
+ /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("offers.edit.header") }) }),
142
+ /* @__PURE__ */ jsx2(RouteDrawer.Description, { className: "sr-only", children: t("offers.edit.description") })
143
+ ] }),
144
+ ready && /* @__PURE__ */ jsx2(EditOfferForm, { offer })
145
+ ] });
146
+ };
147
+ var Component = OfferEditPage;
148
+ export {
149
+ Component,
150
+ OfferEditPage
151
+ };