@btndprojects/loam-ui-native 0.1.1 → 0.2.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 (262) hide show
  1. package/dist/accordion/index.js +5 -3
  2. package/dist/adaptive/index.js +6 -2
  3. package/dist/alert/index.js +5 -2
  4. package/dist/analyzer/index.js +9 -6
  5. package/dist/announcement/index.js +8 -5
  6. package/dist/audio-player/index.js +5 -3
  7. package/dist/avatar/index.js +5 -2
  8. package/dist/avatar-group/index.js +7 -3
  9. package/dist/badge/index.js +7 -4
  10. package/dist/banner/index.js +5 -2
  11. package/dist/board/index.js +11 -6
  12. package/dist/button/index.js +6 -3
  13. package/dist/camera-permission/index.js +15 -12
  14. package/dist/capture-result/index.js +19 -16
  15. package/dist/card/index.js +6 -3
  16. package/dist/card-form/index.js +12 -8
  17. package/dist/carousel/index.js +4 -2
  18. package/dist/chart/index.js +8 -5
  19. package/dist/charts/index.js +8 -6
  20. package/dist/chat/index.js +16 -0
  21. package/dist/checkbox/index.js +6 -4
  22. package/dist/checklist/index.js +11 -8
  23. package/dist/checkout/index.js +16 -11
  24. package/dist/chip/index.js +7 -4
  25. package/dist/{chunk-XNUVB5OL.js → chunk-2OLKPG4E.js} +92 -28
  26. package/dist/{chunk-RUZHTGKB.js → chunk-2PKYGLQ6.js} +71 -40
  27. package/dist/{chunk-UC2WGUP3.js → chunk-2SWKL3AJ.js} +91 -252
  28. package/dist/{chunk-AI4DWZCD.js → chunk-2SY63FCH.js} +63 -16
  29. package/dist/{chunk-F5XNPWS7.js → chunk-2TXERVVA.js} +92 -35
  30. package/dist/chunk-36EC2T6P.js +581 -0
  31. package/dist/chunk-3DUWIYV5.js +437 -0
  32. package/dist/{chunk-JNY4ZHAR.js → chunk-3QMEOFW5.js} +275 -71
  33. package/dist/chunk-3WEZCGHX.js +265 -0
  34. package/dist/chunk-46MMSDGL.js +194 -0
  35. package/dist/{chunk-7O2FMUPT.js → chunk-4IZXHVFJ.js} +297 -92
  36. package/dist/{chunk-LAECSR4H.js → chunk-5LAAAXFP.js} +14 -8
  37. package/dist/{chunk-2A5NIQAK.js → chunk-5RENVKBQ.js} +134 -46
  38. package/dist/{chunk-2ZZ7TDJ4.js → chunk-5UTRIXQ6.js} +37 -31
  39. package/dist/{chunk-LOE5YNN3.js → chunk-5VFZRGVD.js} +37 -10
  40. package/dist/{chunk-52X2VYTD.js → chunk-67IZZ2MJ.js} +115 -60
  41. package/dist/{chunk-UYG5L34B.js → chunk-6YAQBXB3.js} +10 -4
  42. package/dist/{chunk-BTTFCMKG.js → chunk-74FLKD24.js} +94 -23
  43. package/dist/{chunk-ITTYJZWX.js → chunk-7BUIKDD6.js} +73 -18
  44. package/dist/{chunk-423B7SPN.js → chunk-7OVVSVEZ.js} +273 -109
  45. package/dist/chunk-AEB7KCHQ.js +287 -0
  46. package/dist/chunk-APCWFOZW.js +28 -0
  47. package/dist/chunk-AWKQIE5I.js +139 -0
  48. package/dist/{chunk-VCDBXW5H.js → chunk-B7N4ASYE.js} +86 -42
  49. package/dist/{chunk-IVNRBPGC.js → chunk-C4GTDLRC.js} +104 -20
  50. package/dist/{chunk-4ZAHCY44.js → chunk-C6APNDVA.js} +12 -5
  51. package/dist/{chunk-4SZYY6AN.js → chunk-CMTVNF3D.js} +18 -13
  52. package/dist/{chunk-HZ6CNMAF.js → chunk-CPTOADB2.js} +151 -96
  53. package/dist/chunk-D5N5QWI7.js +1325 -0
  54. package/dist/{chunk-IIQTAY3J.js → chunk-DN7MNQIP.js} +113 -29
  55. package/dist/{chunk-47FWHGUN.js → chunk-DVGBZ3TX.js} +84 -23
  56. package/dist/chunk-DW3L54DQ.js +305 -0
  57. package/dist/{chunk-3ARE4TES.js → chunk-E2E3I5W2.js} +69 -18
  58. package/dist/{chunk-DHWADYZX.js → chunk-EDCBJV7J.js} +41 -28
  59. package/dist/{chunk-WSW6ZFAQ.js → chunk-ENP3BMZU.js} +4 -4
  60. package/dist/{chunk-OOPPQH27.js → chunk-EVOIGUBI.js} +43 -19
  61. package/dist/{chunk-VEAYTRPX.js → chunk-EY4DD67D.js} +165 -97
  62. package/dist/{chunk-223Q2T2Q.js → chunk-F3H33DQX.js} +132 -61
  63. package/dist/{chunk-CYRBHQQZ.js → chunk-F5B3UINI.js} +68 -35
  64. package/dist/{chunk-6X6PQ443.js → chunk-FAJI7BSC.js} +20 -9
  65. package/dist/{chunk-MOUJOP55.js → chunk-FUMHAAF3.js} +96 -29
  66. package/dist/{chunk-6HT2LP62.js → chunk-FV6HMP7W.js} +192 -73
  67. package/dist/{chunk-S7F6XLTK.js → chunk-FYWNRX4F.js} +76 -47
  68. package/dist/{chunk-YG3ZJHGU.js → chunk-FZGAAOKS.js} +30 -8
  69. package/dist/{chunk-YDGVJETP.js → chunk-G3AFC24V.js} +1 -1
  70. package/dist/{chunk-EJBDRVIH.js → chunk-G6UESEVN.js} +15 -8
  71. package/dist/chunk-GDKVKNR2.js +339 -0
  72. package/dist/chunk-GEIGMWNF.js +10 -0
  73. package/dist/{chunk-JUAMLEHX.js → chunk-H7DWSL4O.js} +24 -12
  74. package/dist/chunk-HJFFOOJ4.js +1 -0
  75. package/dist/{chunk-RW6ZL2FQ.js → chunk-HJLPZA4X.js} +106 -21
  76. package/dist/chunk-HYEOQWT7.js +647 -0
  77. package/dist/chunk-I2KLQ2HA.js +19 -0
  78. package/dist/{chunk-CJ5EOYZE.js → chunk-I4FHVKEC.js} +11 -5
  79. package/dist/{chunk-JNH2TYIN.js → chunk-IDM7JJMO.js} +19 -5
  80. package/dist/{chunk-O4AEHWII.js → chunk-IPUNJMAQ.js} +141 -49
  81. package/dist/{chunk-J7Q7VCVC.js → chunk-IT6FUXXG.js} +13 -6
  82. package/dist/{chunk-QJJ6MADV.js → chunk-IVKMZ7BB.js} +80 -28
  83. package/dist/{chunk-Z7H7VSFZ.js → chunk-IXKWIFWZ.js} +17 -6
  84. package/dist/chunk-J64KGCGX.js +55 -0
  85. package/dist/chunk-JBMLWFSJ.js +270 -0
  86. package/dist/{chunk-4BXMXBJO.js → chunk-JJLPBRVZ.js} +22 -11
  87. package/dist/chunk-JLC6PM5S.js +406 -0
  88. package/dist/chunk-JUYWSSKW.js +335 -0
  89. package/dist/{chunk-7CFF4HXS.js → chunk-JV5YOTOB.js} +49 -11
  90. package/dist/{chunk-LZLHELAG.js → chunk-KFJGFLMW.js} +29 -8
  91. package/dist/{chunk-O7AE6DAF.js → chunk-KQZ3GLHR.js} +18 -8
  92. package/dist/{chunk-N32RGOA5.js → chunk-LKFC4CS7.js} +80 -24
  93. package/dist/{chunk-YC6WORFL.js → chunk-LMPHCVJJ.js} +82 -50
  94. package/dist/{chunk-3WPW4KUN.js → chunk-LQP4KEXZ.js} +45 -13
  95. package/dist/{chunk-TKQYWZ5V.js → chunk-LUMVGO2K.js} +47 -31
  96. package/dist/{chunk-AWJOCGFZ.js → chunk-M656FYNH.js} +25 -13
  97. package/dist/{chunk-35OFI3JG.js → chunk-MKSNFG7H.js} +73 -20
  98. package/dist/{chunk-4GBOGOTV.js → chunk-NBEF4EPJ.js} +16 -6
  99. package/dist/chunk-NNCOFLNE.js +24 -0
  100. package/dist/{chunk-4YQOR7JM.js → chunk-NTQ2F3AU.js} +73 -20
  101. package/dist/{chunk-QCDXZBC5.js → chunk-O5V4TG3V.js} +126 -44
  102. package/dist/{chunk-U7TFM2JA.js → chunk-OJQUBQWA.js} +3 -3
  103. package/dist/{chunk-VQHPQEUH.js → chunk-OWAMM2DK.js} +13 -6
  104. package/dist/chunk-PID3NJB7.js +405 -0
  105. package/dist/{chunk-HET4LLMX.js → chunk-PMMTGBBS.js} +27 -17
  106. package/dist/{chunk-RIBDXGUG.js → chunk-PNF3NKB5.js} +49 -16
  107. package/dist/{chunk-JXJB2X6M.js → chunk-Q6NKEPRE.js} +81 -32
  108. package/dist/chunk-QDZGFXQD.js +176 -0
  109. package/dist/{chunk-SYNOJOQO.js → chunk-QEYFDRHR.js} +60 -26
  110. package/dist/{chunk-VBOXAEPI.js → chunk-QHAITQIF.js} +97 -22
  111. package/dist/{chunk-VXDZFJGP.js → chunk-QHTVYA65.js} +230 -76
  112. package/dist/{chunk-TUTI5HOZ.js → chunk-QIKT7LIB.js} +14 -8
  113. package/dist/{chunk-3ENTMPQY.js → chunk-QP3KMOVF.js} +82 -42
  114. package/dist/{chunk-GNNJ4GCC.js → chunk-QPWDDJJ4.js} +62 -148
  115. package/dist/{chunk-QWCMU5B2.js → chunk-QRUMA22E.js} +205 -80
  116. package/dist/{chunk-ZVFE5QGU.js → chunk-QYPE5JX3.js} +50 -10
  117. package/dist/{chunk-PUPM2YGF.js → chunk-ROCUG24E.js} +76 -36
  118. package/dist/{chunk-NQYBUO3K.js → chunk-RU3ZPNL6.js} +333 -142
  119. package/dist/{chunk-TOXAGRDQ.js → chunk-RXSCIO6W.js} +14 -5
  120. package/dist/{chunk-FMYDDECK.js → chunk-SATMR6SG.js} +631 -203
  121. package/dist/{chunk-4YIP3CWS.js → chunk-SHHY5OMK.js} +7 -5
  122. package/dist/chunk-SKWO3SZF.js +2284 -0
  123. package/dist/{chunk-YF4NSSMT.js → chunk-SWS5JQIF.js} +41 -13
  124. package/dist/{chunk-CUMUNPXY.js → chunk-T5LTPKX6.js} +15 -7
  125. package/dist/{chunk-H6NIOQHK.js → chunk-TDMG26JI.js} +26 -6
  126. package/dist/{chunk-UWFLYMAR.js → chunk-TLCIR6RG.js} +267 -126
  127. package/dist/{chunk-SBMNWWBV.js → chunk-TN2ZNJUI.js} +47 -9
  128. package/dist/{chunk-5YNTNN5A.js → chunk-TQVAIKFD.js} +106 -41
  129. package/dist/chunk-TRGFFU6A.js +1456 -0
  130. package/dist/{chunk-2GK6PHGE.js → chunk-TY4MTKQJ.js} +100 -22
  131. package/dist/{chunk-AZRX6SAC.js → chunk-U23FYWME.js} +15 -7
  132. package/dist/{chunk-PZXZJBMP.js → chunk-U5NLHYV6.js} +26 -12
  133. package/dist/chunk-UQEN55EY.js +1 -0
  134. package/dist/chunk-UQGBTPXH.js +218 -0
  135. package/dist/chunk-UXGIW7OK.js +116 -0
  136. package/dist/{chunk-PJXUJYS6.js → chunk-UYGDJWMN.js} +55 -30
  137. package/dist/{chunk-QDYDBCFP.js → chunk-V2OEB75Z.js} +50 -51
  138. package/dist/{chunk-LSS54GLJ.js → chunk-VAOAKWUK.js} +34 -13
  139. package/dist/{chunk-DM5QUKKO.js → chunk-VDPK5CY4.js} +18 -6
  140. package/dist/chunk-W23G6JLF.js +37 -0
  141. package/dist/{chunk-CDRZHT42.js → chunk-W63AJTM7.js} +276 -12
  142. package/dist/{chunk-XXXEFXY5.js → chunk-W74TXYFB.js} +13 -5
  143. package/dist/{chunk-LRJNDEIA.js → chunk-WRDSPUE7.js} +144 -29
  144. package/dist/{chunk-C2NTXVWM.js → chunk-XBZGDDMR.js} +11 -4
  145. package/dist/{chunk-BV3B2HYZ.js → chunk-XIDTBCBA.js} +189 -131
  146. package/dist/{chunk-YTFKPRUK.js → chunk-XN4KG3P4.js} +348 -153
  147. package/dist/chunk-XQXMLMH3.js +211 -0
  148. package/dist/{chunk-HPPW424V.js → chunk-XTORZWRF.js} +19 -8
  149. package/dist/{chunk-P23EQNRQ.js → chunk-YAAHPATV.js} +181 -30
  150. package/dist/{chunk-KMI5ML5I.js → chunk-YXOAPXMU.js} +57 -18
  151. package/dist/{chunk-RJQOOHT2.js → chunk-ZECZOOSB.js} +59 -28
  152. package/dist/{chunk-QKXCPTFS.js → chunk-ZLTO5VQI.js} +121 -31
  153. package/dist/{chunk-BEDBFJND.js → chunk-ZVATDZOM.js} +16 -18
  154. package/dist/coachmark/index.js +6 -3
  155. package/dist/code-block/index.js +5 -3
  156. package/dist/color-field/index.js +6 -4
  157. package/dist/commerce/index.js +19 -16
  158. package/dist/connectivity/index.js +5 -2
  159. package/dist/context-menu/index.js +5 -3
  160. package/dist/copy-button/index.js +4 -2
  161. package/dist/data-grid/index.js +21 -16
  162. package/dist/date-range-picker/index.js +11 -8
  163. package/dist/description-list/index.js +3 -1
  164. package/dist/dialog/index.js +4 -2
  165. package/dist/empty-state/index.js +4 -2
  166. package/dist/error-summary/index.js +4 -2
  167. package/dist/fab/index.js +5 -2
  168. package/dist/file-manager/index.js +28 -0
  169. package/dist/file-upload/index.js +10 -7
  170. package/dist/filter-bar/index.js +9 -6
  171. package/dist/flow-run/index.js +15 -12
  172. package/dist/form/index.js +5 -3
  173. package/dist/gallery/index.js +5 -2
  174. package/dist/hold-to-confirm/index.js +4 -2
  175. package/dist/index.d.ts +9557 -2985
  176. package/dist/index.js +355 -122
  177. package/dist/infinite-list/index.js +4 -2
  178. package/dist/inline-edit/index.js +6 -4
  179. package/dist/input/index.js +5 -3
  180. package/dist/interactions/index.js +2 -1
  181. package/dist/invoice/index.js +13 -9
  182. package/dist/kbd/index.js +5 -1
  183. package/dist/keyboard/index.js +4 -2
  184. package/dist/list-row/index.js +6 -4
  185. package/dist/log-viewer/index.js +4 -2
  186. package/dist/map-view/index.js +5 -3
  187. package/dist/markdown/index.js +9 -6
  188. package/dist/metric/index.js +7 -4
  189. package/dist/money/index.js +9 -3
  190. package/dist/nav-drawer/index.js +4 -2
  191. package/dist/nav-header/index.js +9 -0
  192. package/dist/navigation/index.js +5 -2
  193. package/dist/notification-center/index.js +12 -10
  194. package/dist/number-roll/index.js +5 -2
  195. package/dist/one-handed/index.js +5 -3
  196. package/dist/os-surfaces/index.js +6 -3
  197. package/dist/otp/index.js +7 -4
  198. package/dist/page-header/index.js +1 -0
  199. package/dist/pagination/index.js +6 -0
  200. package/dist/payment-method/index.js +14 -10
  201. package/dist/payment-status/index.js +17 -14
  202. package/dist/permission/index.js +5 -2
  203. package/dist/picker/index.js +11 -6
  204. package/dist/progress/index.js +6 -3
  205. package/dist/pull-to-refresh/index.js +4 -2
  206. package/dist/radio-group/index.js +6 -4
  207. package/dist/rating/index.js +5 -2
  208. package/dist/receivables/index.js +21 -16
  209. package/dist/refund/index.js +18 -14
  210. package/dist/save-status/index.js +5 -3
  211. package/dist/scroll-area/index.js +3 -1
  212. package/dist/search-field/index.js +8 -0
  213. package/dist/segmented-control/index.js +4 -3
  214. package/dist/sheet/index.js +5 -3
  215. package/dist/skeleton/index.js +3 -1
  216. package/dist/slider/index.js +4 -2
  217. package/dist/sortable/index.js +7 -0
  218. package/dist/spinner/index.js +3 -1
  219. package/dist/split-button/index.js +9 -6
  220. package/dist/spotlight/index.js +3 -1
  221. package/dist/stage-timeline/index.js +5 -3
  222. package/dist/status-dot/index.js +4 -2
  223. package/dist/stepper/index.js +7 -4
  224. package/dist/streaming-text/index.js +3 -2
  225. package/dist/survey/index.js +18 -15
  226. package/dist/switch/index.js +5 -3
  227. package/dist/system-state/index.js +7 -4
  228. package/dist/tab-bar/index.js +5 -2
  229. package/dist/tabs/index.js +4 -2
  230. package/dist/tags-input/index.js +10 -0
  231. package/dist/textarea/index.js +6 -4
  232. package/dist/thinking/index.js +3 -1
  233. package/dist/time-field/index.js +12 -0
  234. package/dist/time-range-control/index.js +22 -0
  235. package/dist/timeline/index.js +4 -2
  236. package/dist/toast/index.js +4 -2
  237. package/dist/toolbar/index.js +4 -2
  238. package/dist/tour/index.js +12 -9
  239. package/dist/truncation-notice/index.js +5 -2
  240. package/dist/update-notice/index.js +12 -9
  241. package/dist/video-player/index.js +5 -2
  242. package/dist/viewfinder/index.js +6 -4
  243. package/dist/widget/index.js +7 -4
  244. package/dist/wizard/index.js +7 -4
  245. package/package.json +13 -12
  246. package/dist/chunk-6N33LFQA.js +0 -35
  247. package/dist/chunk-GDKZTW34.js +0 -395
  248. package/dist/chunk-GL7B2DOW.js +0 -134
  249. package/dist/chunk-NKB7BZYK.js +0 -167
  250. package/dist/chunk-OETCUXQP.js +0 -134
  251. package/dist/chunk-OPXFZ4Y5.js +0 -204
  252. package/dist/chunk-Q72LJOVE.js +0 -169
  253. package/dist/chunk-RNGLIHFA.js +0 -191
  254. package/dist/chunk-RQ3HASCC.js +0 -6
  255. package/dist/chunk-RSOJT5YW.js +0 -124
  256. package/dist/chunk-TKVFVF5D.js +0 -95
  257. package/dist/chunk-XOSCY2CW.js +0 -242
  258. package/dist/header/index.js +0 -5
  259. package/dist/search-bar/index.js +0 -5
  260. /package/dist/{chunk-3ECPOSKO.js → chunk-3UG6JUCV.js} +0 -0
  261. /package/dist/{chunk-JRLTGLN4.js → chunk-5WWRTEPS.js} +0 -0
  262. /package/dist/{chunk-RTIKSY6A.js → chunk-5Z5ZYMOJ.js} +0 -0
@@ -1,39 +1,101 @@
1
- import { RadioGroup, RadioGroupItem } from './chunk-4YIP3CWS.js';
2
- import { SegmentedControl } from './chunk-5YNTNN5A.js';
3
- import { Checkbox } from './chunk-JXJB2X6M.js';
4
- import { Amount, PriceRow } from './chunk-VBOXAEPI.js';
5
- import { Chip } from './chunk-AI4DWZCD.js';
6
- import { TextField } from './chunk-ITTYJZWX.js';
7
- import { Badge } from './chunk-SBMNWWBV.js';
8
- import { Alert } from './chunk-OETCUXQP.js';
9
- import { Button } from './chunk-3ARE4TES.js';
10
- import { Icon } from './chunk-TKVFVF5D.js';
11
- import * as React from 'react';
12
- import { View, Text } from 'react-native';
1
+ import { RadioGroup, RadioGroupItem } from './chunk-SHHY5OMK.js';
2
+ import { SegmentedControl } from './chunk-TQVAIKFD.js';
3
+ import { Amount, PriceRow } from './chunk-QHAITQIF.js';
4
+ import { Chip } from './chunk-2SY63FCH.js';
5
+ import { usePayLabels } from './chunk-GEIGMWNF.js';
6
+ import { Checkbox } from './chunk-Q6NKEPRE.js';
7
+ import { TextField } from './chunk-7BUIKDD6.js';
8
+ import { Badge } from './chunk-TN2ZNJUI.js';
9
+ import { Alert } from './chunk-QDZGFXQD.js';
10
+ import { NAMED_ROLE, announce } from './chunk-W23G6JLF.js';
11
+ import { Button } from './chunk-E2E3I5W2.js';
12
+ import { useLabels, useLoamLocale } from './chunk-APCWFOZW.js';
13
+ import { Icon } from './chunk-UXGIW7OK.js';
14
+ import { useResolvedMotion, springConfig } from './chunk-J64KGCGX.js';
15
+ import * as React2 from 'react';
16
+ import { View, Text, Animated, AccessibilityInfo } from 'react-native';
13
17
  import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
14
- import { ARRIVAL, refundRemaining, refundLedger, REFUND_REASONS, money, parseAmount, clampRefund, REFUND_FRACTIONS, refundFraction, evidenceTone, evidenceLabel, disputeWorthDefending, DISPUTE_ACCEPT_THRESHOLD_MINOR } from '@btndprojects/loam-pay';
18
+ import { arrivalText, refundRemaining, money, refundLedger, refundReasons, parseAmount, clampRefund, REFUND_FRACTIONS, refundFraction, evidenceTone, evidenceLabel, disputeWorthDefending, DISPUTE_ACCEPT_THRESHOLD_MINOR } from '@btndprojects/loam-pay';
15
19
  import { jsx, jsxs } from 'react/jsx-runtime';
16
20
 
21
+ // src/refund/refund-labels.ts
22
+ var DEFAULT_LABELS = {
23
+ issuedTitle: "Refund issued",
24
+ refundAnother: "Refund another charge",
25
+ title: "Refund",
26
+ notify: "Email the customer",
27
+ irreversible: "A refund cannot be undone. Check the amount before you issue it.",
28
+ modeAria: "Refund amount mode",
29
+ modeFull: "Full",
30
+ modePartial: "Partial",
31
+ fullBalance: "Refunding the full remaining balance",
32
+ commit: (amount) => `Refund ${amount}`,
33
+ states: {
34
+ requested: "Requested",
35
+ processing: "Processing",
36
+ sent: "Sent",
37
+ arrived: "Arrived",
38
+ failed: "Failed"
39
+ },
40
+ of: "of",
41
+ stillRefundable: "still refundable",
42
+ ledgerCaption: (currency) => `Refund ledger \xB7 ${currency}`,
43
+ reason: "Reason",
44
+ amount: "Refund amount",
45
+ upTo: (max) => `Up to ${max}.`,
46
+ capped: (max) => `That is more than the ${max} left, so it was capped.`,
47
+ percent: (percent) => `${percent}%`,
48
+ fractionAria: (percent, amount) => `Refund ${percent}% \u2014 ${amount}`,
49
+ amountMode: "Amount mode",
50
+ fullRefund: "Full refund",
51
+ partialRefund: "Partial refund",
52
+ refunding: "Refunding",
53
+ notStated: "Not stated",
54
+ customerEmail: "Customer email",
55
+ notifyYes: (label) => `${label} \u2014 yes`,
56
+ notifyNo: (label) => `${label} \u2014 no`,
57
+ announceIssued: (title, amount) => `${title}. ${amount}`,
58
+ disputeTitle: "Chargeback",
59
+ disputeDescription: "The amount and the network fee have already left the account. Submitting evidence asks the network to reverse the first of those; the fee is not refundable either way, and the network decides \u2014 not us.",
60
+ submitEvidence: "Submit evidence",
61
+ acceptDispute: "Accept the dispute",
62
+ evidence: "Evidence",
63
+ attach: "Attach",
64
+ days: (n) => `${n} ${n === 1 ? "day" : "days"}`,
65
+ toRespond: (due) => `to respond \xB7 evidence due ${due}`,
66
+ disputed: "Disputed",
67
+ networkFee: "Network fee",
68
+ reasonNetwork: (reason, network) => `${reason} \xB7 ${network}`,
69
+ opened: "Opened",
70
+ guidance: (worth, threshold, complete) => `${worth ? `Above ${threshold} this is usually worth defending \u2014 the amount at stake exceeds the staff time a response costs.` : `Below ${threshold} the staff time spent defending this usually exceeds the amount at stake. Accepting is a legitimate answer, not a loss.`}${complete ? "" : " Some evidence is still missing; submitting now sends what is attached."}`
71
+ };
17
72
  var REFUND_STATE = {
18
- requested: { label: "Requested", variant: "neutral" },
19
- processing: { label: "Processing", variant: "info" },
20
- sent: { label: "Sent", variant: "info" },
21
- arrived: { label: "Arrived", variant: "good" },
22
- failed: { label: "Failed", variant: "danger" }
73
+ requested: { variant: "neutral" },
74
+ processing: { variant: "info" },
75
+ sent: { variant: "info" },
76
+ arrived: { variant: "good" },
77
+ failed: { variant: "danger" }
23
78
  };
24
- function RefundStatus({ state, label }) {
79
+ function RefundStatus({
80
+ state,
81
+ label,
82
+ labels: labelsProp
83
+ }) {
84
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
25
85
  const meta = REFUND_STATE[state];
26
- return /* @__PURE__ */ jsx(Badge, { variant: meta.variant, size: "sm", dot: true, children: label ?? meta.label });
86
+ return /* @__PURE__ */ jsx(Badge, { variant: meta.variant, size: "sm", dot: true, children: label ?? labels.states[state] });
27
87
  }
28
88
  function RefundArrivalNote({
29
89
  method,
30
90
  window: text,
31
91
  inline = false,
92
+ labels: labelsProp,
32
93
  style
33
94
  }) {
34
- const theme = useLoamTheme();
95
+ const pay = usePayLabels(labelsProp);
96
+ const theme = useLoamTheme("refund");
35
97
  const { styles } = useStyles(sheet);
36
- const body = text ?? ARRIVAL[method];
98
+ const body = text ?? arrivalText(method, pay);
37
99
  return /* @__PURE__ */ jsxs(View, { style: [inline ? styles.arrivalInline : styles.arrivalBlock, style], children: [
38
100
  /* @__PURE__ */ jsx(
39
101
  Icon,
@@ -49,41 +111,60 @@ function RefundArrivalNote({
49
111
  function RefundRemainingNote({
50
112
  charge,
51
113
  currency,
52
- label = "still refundable",
53
- locale,
114
+ label: labelProp,
115
+ locale: localeProp,
116
+ labels: labelsProp,
54
117
  style
55
118
  }) {
119
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
120
+ const providerLocale = useLoamLocale();
121
+ const locale = localeProp ?? providerLocale;
122
+ const label = labelProp ?? labels.stillRefundable;
56
123
  const { styles } = useStyles(sheet);
57
124
  const code = currency ?? charge.currency ?? "USD";
58
- return /* @__PURE__ */ jsxs(View, { style: [styles.remaining, style], children: [
59
- /* @__PURE__ */ jsx(
60
- Amount,
61
- {
62
- minor: refundRemaining(charge),
63
- currency: code,
64
- size: "sm",
65
- weight: "bold",
66
- locale
67
- }
68
- ),
69
- /* @__PURE__ */ jsx(Text, { style: styles.remainingWord, children: "of" }),
70
- /* @__PURE__ */ jsx(Amount, { minor: charge.amountMinor, currency: code, size: "sm", locale }),
71
- /* @__PURE__ */ jsx(Text, { style: styles.remainingWord, children: label })
72
- ] });
125
+ return /* @__PURE__ */ jsxs(
126
+ View,
127
+ {
128
+ accessible: true,
129
+ accessibilityRole: NAMED_ROLE,
130
+ accessibilityLabel: `${money(refundRemaining(charge), code, { locale })} ${labels.of} ${money(charge.amountMinor, code, { locale })} ${label}`,
131
+ style: [styles.remaining, style],
132
+ children: [
133
+ /* @__PURE__ */ jsx(
134
+ Amount,
135
+ {
136
+ minor: refundRemaining(charge),
137
+ currency: code,
138
+ size: "sm",
139
+ weight: "bold",
140
+ locale
141
+ }
142
+ ),
143
+ /* @__PURE__ */ jsx(Text, { style: styles.remainingWord, children: labels.of }),
144
+ /* @__PURE__ */ jsx(Amount, { minor: charge.amountMinor, currency: code, size: "sm", locale }),
145
+ /* @__PURE__ */ jsx(Text, { style: styles.remainingWord, children: label })
146
+ ]
147
+ }
148
+ );
73
149
  }
74
150
  function RefundLedger({
75
151
  charge,
76
152
  next = 0,
77
153
  currency,
78
154
  caption,
79
- locale,
155
+ locale: localeProp,
156
+ labels: labelsProp,
80
157
  style
81
158
  }) {
159
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
160
+ const pay = usePayLabels(labelsProp);
161
+ const providerLocale = useLoamLocale();
162
+ const locale = localeProp ?? providerLocale;
82
163
  const { styles } = useStyles(sheet);
83
164
  const code = currency ?? charge.currency ?? "USD";
84
- const rows = refundLedger(charge, next);
165
+ const rows = refundLedger(charge, next, pay);
85
166
  return /* @__PURE__ */ jsxs(View, { style: [styles.ledger, style], children: [
86
- /* @__PURE__ */ jsx(Text, { style: styles.overline, children: caption ?? `Refund ledger \xB7 ${code}` }),
167
+ /* @__PURE__ */ jsx(Text, { style: styles.overline, children: caption ?? labels.ledgerCaption(code) }),
87
168
  rows.map((row) => /* @__PURE__ */ jsx(
88
169
  PriceRow,
89
170
  {
@@ -103,18 +184,22 @@ function RefundLedger({
103
184
  function RefundReasonList({
104
185
  value,
105
186
  onChange,
106
- reasons = REFUND_REASONS,
107
- label = "Reason",
108
- showNotes = true
187
+ reasons,
188
+ label,
189
+ showNotes = true,
190
+ labels: labelsProp
109
191
  }) {
192
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
193
+ const pay = usePayLabels(labelsProp);
194
+ const list = reasons ?? refundReasons(pay);
110
195
  const { styles } = useStyles(sheet);
111
196
  return /* @__PURE__ */ jsx(
112
197
  RadioGroup,
113
198
  {
114
- label,
199
+ label: label ?? labels.reason,
115
200
  value: value ?? void 0,
116
201
  onValueChange: (next) => onChange(next),
117
- children: reasons.map(([id, text, note]) => /* @__PURE__ */ jsxs(View, { style: styles.reasonRow, children: [
202
+ children: list.map(([id, text, note]) => /* @__PURE__ */ jsxs(View, { style: styles.reasonRow, children: [
118
203
  /* @__PURE__ */ jsx(RadioGroupItem, { value: id, label: text, accessibilityLabel: `${text}. ${note}` }),
119
204
  showNotes ? /* @__PURE__ */ jsx(Text, { style: styles.reasonNote, children: note }) : null
120
205
  ] }, id))
@@ -126,26 +211,35 @@ function RefundAmountField({
126
211
  onChangeMinor,
127
212
  remaining,
128
213
  currency,
129
- label = "Refund amount",
214
+ label,
130
215
  hint,
131
216
  error,
132
217
  fractions = REFUND_FRACTIONS,
133
218
  disabled = false,
134
- locale,
219
+ locale: localeProp,
220
+ labels: labelsProp,
135
221
  style
136
222
  }) {
223
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
224
+ const providerLocale = useLoamLocale();
225
+ const locale = localeProp ?? providerLocale;
137
226
  const { styles } = useStyles(sheet);
138
- const [draft, setDraft] = React.useState(null);
227
+ const [draft, setDraft] = React2.useState(null);
228
+ const [capped, setCapped] = React2.useState(false);
139
229
  const display = draft ?? money(valueMinor, currency, { noSymbol: true, locale });
140
230
  const maxText = money(remaining, currency, { locale });
141
231
  const chips = fractions === false ? [] : fractions;
232
+ const cappedMessage = labels.capped(maxText);
233
+ React2.useEffect(() => {
234
+ if (capped) announce(cappedMessage);
235
+ }, [capped]);
142
236
  return /* @__PURE__ */ jsxs(View, { style: [styles.amountBlock, style], children: [
143
237
  /* @__PURE__ */ jsx(
144
238
  TextField,
145
239
  {
146
- label,
147
- hint: hint ?? `Up to ${maxText}.`,
148
- error,
240
+ label: label ?? labels.amount,
241
+ hint: hint ?? labels.upTo(maxText),
242
+ error: error ?? (capped ? cappedMessage : void 0),
149
243
  value: display,
150
244
  editable: !disabled,
151
245
  inputMode: "decimal",
@@ -155,6 +249,7 @@ function RefundAmountField({
155
249
  onChangeText: (text) => {
156
250
  setDraft(text);
157
251
  const parsed = parseAmount(text, currency);
252
+ setCapped(parsed !== null && parsed > remaining);
158
253
  onChangeMinor(clampRefund(parsed ?? 0, remaining));
159
254
  },
160
255
  onBlur: () => setDraft(null)
@@ -169,12 +264,13 @@ function RefundAmountField({
169
264
  size: "sm",
170
265
  disabled,
171
266
  selected: !disabled && valueMinor === target && remaining > 0,
172
- accessibilityLabel: `Refund ${percent}% \u2014 ${money(target, currency, { locale })}`,
267
+ accessibilityLabel: labels.fractionAria(percent, money(target, currency, { locale })),
173
268
  onSelectedChange: () => {
174
269
  setDraft(null);
270
+ setCapped(false);
175
271
  onChangeMinor(target);
176
272
  },
177
- children: `${percent}%`
273
+ children: labels.percent(percent)
178
274
  },
179
275
  percent
180
276
  );
@@ -260,16 +356,43 @@ function RefundConfirmation({
260
356
  result,
261
357
  method,
262
358
  currency,
263
- title = "Refund issued",
264
- refundAnotherLabel = "Refund another charge",
359
+ title: titleProp,
360
+ refundAnotherLabel,
265
361
  onRefundAnother,
266
362
  actions,
267
- locale,
268
- style
363
+ locale: localeProp,
364
+ labels: labelsProp,
365
+ style,
366
+ motion = "full"
269
367
  }) {
270
- const theme = useLoamTheme();
368
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
369
+ const providerLocale = useLoamLocale();
370
+ const locale = localeProp ?? providerLocale;
371
+ const title = titleProp ?? labels.issuedTitle;
372
+ const theme = useLoamTheme("refund");
271
373
  const { styles } = useStyles(sheet2);
272
374
  const code = currency ?? charge.currency ?? "USD";
375
+ const level = useResolvedMotion(motion, "refund");
376
+ const rise = React2.useRef(new Animated.Value(level === "full" ? 0 : 1)).current;
377
+ const pop = React2.useRef(new Animated.Value(level === "full" ? 0 : 1)).current;
378
+ React2.useEffect(() => {
379
+ AccessibilityInfo.announceForAccessibility(
380
+ labels.announceIssued(title, money(result.amountMinor, code, { locale }))
381
+ );
382
+ }, []);
383
+ React2.useEffect(() => {
384
+ if (level !== "full") return;
385
+ const run = Animated.parallel([
386
+ Animated.spring(rise, { ...springConfig(theme, "ds"), toValue: 1, useNativeDriver: true }),
387
+ Animated.sequence([
388
+ // loam-audit-ignore raw-duration — one stagger step after the panel starts rising.
389
+ Animated.delay(60),
390
+ Animated.spring(pop, { ...springConfig(theme, "fs"), toValue: 1, useNativeDriver: true })
391
+ ])
392
+ ]);
393
+ run.start();
394
+ return () => run.stop();
395
+ }, []);
273
396
  return /* @__PURE__ */ jsxs(
274
397
  View,
275
398
  {
@@ -279,37 +402,73 @@ function RefundConfirmation({
279
402
  style: [styles.panel, style],
280
403
  ...{ "aria-live": "polite" },
281
404
  children: [
282
- /* @__PURE__ */ jsxs(View, { style: styles.confirmHead, children: [
283
- /* @__PURE__ */ jsx(
284
- View,
285
- {
286
- "aria-hidden": true,
287
- accessibilityElementsHidden: true,
288
- importantForAccessibility: "no-hide-descendants",
289
- style: styles.checkPlate,
290
- children: /* @__PURE__ */ jsx(
291
- Icon,
405
+ /* @__PURE__ */ jsxs(
406
+ Animated.View,
407
+ {
408
+ style: [
409
+ styles.confirmHead,
410
+ {
411
+ opacity: rise,
412
+ transform: [
413
+ {
414
+ translateY: rise.interpolate({
415
+ inputRange: [0, 1],
416
+ outputRange: [theme.space.s3, 0]
417
+ })
418
+ }
419
+ ]
420
+ }
421
+ ],
422
+ children: [
423
+ /* @__PURE__ */ jsx(
424
+ Animated.View,
292
425
  {
293
- name: "check",
294
- size: theme.icon.md,
295
- color: theme.color.goodOnSoft,
296
- strokeWidth: theme.icon.strokeBold
426
+ "aria-hidden": true,
427
+ accessibilityElementsHidden: true,
428
+ importantForAccessibility: "no-hide-descendants",
429
+ style: [
430
+ styles.checkPlate,
431
+ {
432
+ opacity: pop,
433
+ transform: [
434
+ { scale: pop.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] }) }
435
+ ]
436
+ }
437
+ ],
438
+ children: /* @__PURE__ */ jsx(
439
+ Icon,
440
+ {
441
+ name: "check",
442
+ size: theme.icon.md,
443
+ color: theme.color.goodOnSoft,
444
+ strokeWidth: theme.icon.strokeBold
445
+ }
446
+ )
297
447
  }
298
- )
299
- }
300
- ),
301
- /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.title, children: title }),
302
- /* @__PURE__ */ jsx(Amount, { minor: result.amountMinor, currency: code, size: "hero", locale }),
303
- /* @__PURE__ */ jsxs(View, { style: styles.confirmMeta, children: [
304
- /* @__PURE__ */ jsx(RefundStatus, { state: result.state }),
305
- result.issuedLabel ? /* @__PURE__ */ jsx(Text, { style: styles.meta, children: result.issuedLabel }) : null,
306
- result.refundId ? /* @__PURE__ */ jsx(Text, { style: styles.mono, children: result.refundId }) : null
307
- ] })
308
- ] }),
309
- /* @__PURE__ */ jsx(RefundArrivalNote, { method }),
310
- /* @__PURE__ */ jsx(RefundLedger, { charge, next: result.amountMinor, currency: code, locale }),
448
+ ),
449
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.title, children: title }),
450
+ /* @__PURE__ */ jsx(Amount, { minor: result.amountMinor, currency: code, size: "hero", locale }),
451
+ /* @__PURE__ */ jsxs(View, { style: styles.confirmMeta, children: [
452
+ /* @__PURE__ */ jsx(RefundStatus, { state: result.state, labels: labelsProp }),
453
+ result.issuedLabel ? /* @__PURE__ */ jsx(Text, { style: styles.meta, children: result.issuedLabel }) : null,
454
+ result.refundId ? /* @__PURE__ */ jsx(Text, { style: styles.mono, children: result.refundId }) : null
455
+ ] })
456
+ ]
457
+ }
458
+ ),
459
+ /* @__PURE__ */ jsx(RefundArrivalNote, { method, labels: labelsProp }),
460
+ /* @__PURE__ */ jsx(
461
+ RefundLedger,
462
+ {
463
+ charge,
464
+ next: result.amountMinor,
465
+ currency: code,
466
+ locale,
467
+ labels: labelsProp
468
+ }
469
+ ),
311
470
  /* @__PURE__ */ jsxs(View, { style: styles.actionRow, children: [
312
- onRefundAnother ? /* @__PURE__ */ jsx(Button, { variant: "outline", onPress: onRefundAnother, children: refundAnotherLabel }) : null,
471
+ onRefundAnother ? /* @__PURE__ */ jsx(Button, { variant: "outline", onPress: onRefundAnother, children: refundAnotherLabel ?? labels.refundAnother }) : null,
313
472
  actions
314
473
  ] })
315
474
  ]
@@ -324,28 +483,37 @@ function RefundPanel({
324
483
  reason,
325
484
  notify,
326
485
  currency,
327
- title = "Refund",
486
+ title: titleProp,
328
487
  chargeLabel,
329
488
  error,
330
489
  result,
331
490
  busy = false,
332
- notifyLabel = "Email the customer",
333
- irreversibleNote = "A refund cannot be undone. Check the amount before you issue it.",
491
+ notifyLabel: notifyLabelProp,
492
+ irreversibleNote: irreversibleNoteProp,
334
493
  onModeChange,
335
494
  onAmountChange,
336
495
  onReasonChange,
337
496
  onNotifyChange,
338
497
  onSubmit,
339
498
  onRefundAnother,
340
- locale,
341
- style
499
+ locale: localeProp,
500
+ labels: labelsProp,
501
+ style,
502
+ motion = "full"
342
503
  }) {
343
- const theme = useLoamTheme();
504
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
505
+ const pay = usePayLabels(labelsProp);
506
+ const providerLocale = useLoamLocale();
507
+ const locale = localeProp ?? providerLocale;
508
+ const title = titleProp ?? labels.title;
509
+ const notifyLabel = notifyLabelProp ?? labels.notify;
510
+ const irreversibleNote = irreversibleNoteProp ?? labels.irreversible;
511
+ const theme = useLoamTheme("refund");
344
512
  const { styles } = useStyles(sheet2);
345
513
  const code = currency ?? charge.currency ?? "USD";
346
514
  const remaining = refundRemaining(charge);
347
515
  const effective = mode === "full" ? remaining : amountMinor;
348
- const reasonRow = reason === null ? void 0 : REFUND_REASONS.find(([id]) => id === reason);
516
+ const reasonRow = reason === null ? void 0 : refundReasons(pay).find(([id]) => id === reason);
349
517
  if (result) {
350
518
  return /* @__PURE__ */ jsx(
351
519
  RefundConfirmation,
@@ -356,6 +524,7 @@ function RefundPanel({
356
524
  currency: code,
357
525
  onRefundAnother,
358
526
  locale,
527
+ labels: labelsProp,
359
528
  style
360
529
  }
361
530
  );
@@ -367,27 +536,28 @@ function RefundPanel({
367
536
  charge.receiptId ? /* @__PURE__ */ jsx(View, { style: styles.pushEnd, children: /* @__PURE__ */ jsx(Text, { style: styles.mono, children: charge.receiptId }) }) : null
368
537
  ] }),
369
538
  chargeLabel ? /* @__PURE__ */ jsx(Text, { style: styles.chargeLabel, children: chargeLabel }) : null,
370
- /* @__PURE__ */ jsx(RefundRemainingNote, { charge, currency: code, locale })
539
+ /* @__PURE__ */ jsx(RefundRemainingNote, { charge, currency: code, locale, labels: labelsProp })
371
540
  ] }),
372
541
  onModeChange ? /* @__PURE__ */ jsx(
373
542
  SegmentedControl,
374
543
  {
544
+ accessibilityLabel: labels.amountMode,
375
545
  value: mode,
376
546
  onValueChange: (next) => onModeChange(next),
377
547
  items: [
378
- { value: "full", label: "Full" },
379
- { value: "partial", label: "Partial" }
548
+ { value: "full", label: labels.modeFull },
549
+ { value: "partial", label: labels.modePartial }
380
550
  ]
381
551
  }
382
552
  ) : /* @__PURE__ */ jsx(
383
553
  Stated,
384
554
  {
385
- label: mode === "full" ? "Full refund" : "Partial refund",
386
- overline: "Amount mode"
555
+ label: mode === "full" ? labels.fullRefund : labels.partialRefund,
556
+ overline: labels.amountMode
387
557
  }
388
558
  ),
389
559
  mode === "full" ? /* @__PURE__ */ jsxs(View, { style: styles.fullBox, children: [
390
- /* @__PURE__ */ jsx(Text, { style: styles.fullLabel, children: "Refunding the full remaining balance" }),
560
+ /* @__PURE__ */ jsx(Text, { style: styles.fullLabel, children: labels.fullBalance }),
391
561
  /* @__PURE__ */ jsx(View, { style: styles.pushEnd, children: /* @__PURE__ */ jsx(Amount, { minor: remaining, currency: code, size: "lg", weight: "bold", locale }) })
392
562
  ] }) : onAmountChange ? /* @__PURE__ */ jsx(
393
563
  RefundAmountField,
@@ -396,46 +566,68 @@ function RefundPanel({
396
566
  onChangeMinor: onAmountChange,
397
567
  remaining,
398
568
  currency: code,
399
- locale
569
+ locale,
570
+ labels: labelsProp
400
571
  }
401
572
  ) : /* @__PURE__ */ jsxs(View, { style: styles.fullBox, children: [
402
- /* @__PURE__ */ jsx(Text, { style: styles.fullLabel, children: "Refunding" }),
403
- /* @__PURE__ */ jsx(View, { style: styles.pushEnd, children: /* @__PURE__ */ jsx(Amount, { minor: amountMinor, currency: code, size: "lg", weight: "bold", locale }) })
573
+ /* @__PURE__ */ jsx(Text, { style: styles.fullLabel, children: labels.refunding }),
574
+ /* @__PURE__ */ jsx(View, { style: styles.pushEnd, children: /* @__PURE__ */ jsx(
575
+ Amount,
576
+ {
577
+ minor: amountMinor,
578
+ currency: code,
579
+ size: "lg",
580
+ weight: "bold",
581
+ locale,
582
+ roll: true,
583
+ motion
584
+ }
585
+ ) })
404
586
  ] }),
405
- onReasonChange ? /* @__PURE__ */ jsx(RefundReasonList, { value: reason, onChange: onReasonChange }) : /* @__PURE__ */ jsx(
587
+ onReasonChange ? /* @__PURE__ */ jsx(RefundReasonList, { value: reason, onChange: onReasonChange, labels: labelsProp }) : /* @__PURE__ */ jsx(
406
588
  Stated,
407
589
  {
408
- overline: "Reason",
409
- label: reasonRow ? reasonRow[1] : "Not stated",
590
+ overline: labels.reason,
591
+ label: reasonRow ? reasonRow[1] : labels.notStated,
410
592
  note: reasonRow ? reasonRow[2] : void 0
411
593
  }
412
594
  ),
413
- onNotifyChange ? /* @__PURE__ */ jsxs(View, { style: styles.notifyRow, children: [
595
+ onNotifyChange ? (
596
+ // The box and its text are one control: one tap target, one focus
597
+ // stop, read once as "<label>, checkbox".
414
598
  /* @__PURE__ */ jsx(
415
599
  Checkbox,
416
600
  {
417
601
  checked: notify,
418
602
  onCheckedChange: (next) => onNotifyChange(next),
419
- accessibilityLabel: notifyLabel
603
+ label: notifyLabel
420
604
  }
421
- ),
422
- /* @__PURE__ */ jsx(Text, { style: styles.notifyLabel, children: notifyLabel })
423
- ] }) : /* @__PURE__ */ jsx(
605
+ )
606
+ ) : /* @__PURE__ */ jsx(
424
607
  Stated,
425
608
  {
426
- overline: "Customer email",
427
- label: notify ? `${notifyLabel} \u2014 yes` : `${notifyLabel} \u2014 no`
609
+ overline: labels.customerEmail,
610
+ label: notify ? labels.notifyYes(notifyLabel) : labels.notifyNo(notifyLabel)
428
611
  }
429
612
  ),
430
- /* @__PURE__ */ jsx(RefundLedger, { charge, next: effective, currency: code, locale }),
431
- /* @__PURE__ */ jsx(RefundArrivalNote, { method }),
613
+ /* @__PURE__ */ jsx(
614
+ RefundLedger,
615
+ {
616
+ charge,
617
+ next: effective,
618
+ currency: code,
619
+ locale,
620
+ labels: labelsProp
621
+ }
622
+ ),
623
+ /* @__PURE__ */ jsx(RefundArrivalNote, { method, labels: labelsProp }),
432
624
  error ? /* @__PURE__ */ jsx(Alert, { tone: "danger", title: error }) : null,
433
625
  /* @__PURE__ */ jsxs(View, { style: styles.commitBlock, children: [
434
626
  /* @__PURE__ */ jsxs(View, { style: styles.irreversibleRow, children: [
435
627
  /* @__PURE__ */ jsx(Icon, { name: "alert-circle", size: theme.icon.sm, color: theme.color.text3 }),
436
628
  /* @__PURE__ */ jsx(Text, { style: styles.irreversible, children: irreversibleNote })
437
629
  ] }),
438
- /* @__PURE__ */ jsx(Button, { loading: busy, onPress: onSubmit, children: `Refund ${money(effective, code, { locale })}` })
630
+ /* @__PURE__ */ jsx(Button, { loading: busy, onPress: onSubmit, children: labels.commit(money(effective, code, { locale })) })
439
631
  ] })
440
632
  ] });
441
633
  }
@@ -507,14 +699,6 @@ var sheet2 = createStyleSheet((theme) => ({
507
699
  lineHeight: theme.type.footnote.lineHeight,
508
700
  color: theme.color.text2
509
701
  },
510
- notifyRow: { flexDirection: "row", alignItems: "center", gap: theme.space.s2 },
511
- notifyLabel: {
512
- flexShrink: 1,
513
- fontFamily: theme.font.sans,
514
- fontSize: theme.type.footnote.fontSize,
515
- lineHeight: theme.type.footnote.lineHeight,
516
- color: theme.color.text
517
- },
518
702
  stated: { gap: theme.space[2] },
519
703
  overline: {
520
704
  fontFamily: theme.font.sans,
@@ -594,10 +778,14 @@ var EVIDENCE_ICON = {
594
778
  function DisputeDeadline({
595
779
  dispute,
596
780
  urgentAt = 3,
597
- locale,
781
+ locale: localeProp,
782
+ labels: labelsProp,
598
783
  style
599
784
  }) {
600
- const theme = useLoamTheme();
785
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
786
+ const providerLocale = useLoamLocale();
787
+ const locale = localeProp ?? providerLocale;
788
+ const theme = useLoamTheme("refund");
601
789
  const { styles } = useStyles(sheet3);
602
790
  const urgent = dispute.daysLeft <= urgentAt;
603
791
  const ink = urgent ? theme.color.dangerOnSoft : theme.color.warnOnSoft;
@@ -615,12 +803,12 @@ function DisputeDeadline({
615
803
  ],
616
804
  children: [
617
805
  /* @__PURE__ */ jsxs(View, { children: [
618
- /* @__PURE__ */ jsx(Text, { style: [styles.daysLeft, { color: ink }], children: `${dispute.daysLeft} ${dispute.daysLeft === 1 ? "day" : "days"}` }),
619
- /* @__PURE__ */ jsx(Text, { style: [styles.daysNote, { color: ink }], children: `to respond \xB7 evidence due ${dispute.due}` })
806
+ /* @__PURE__ */ jsx(Text, { style: [styles.daysLeft, { color: ink }], children: labels.days(dispute.daysLeft) }),
807
+ /* @__PURE__ */ jsx(Text, { style: [styles.daysNote, { color: ink }], children: labels.toRespond(dispute.due) })
620
808
  ] }),
621
809
  /* @__PURE__ */ jsxs(View, { style: styles.factGrid, children: [
622
810
  /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
623
- /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: "Disputed" }),
811
+ /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.disputed }),
624
812
  /* @__PURE__ */ jsx(
625
813
  Amount,
626
814
  {
@@ -633,15 +821,15 @@ function DisputeDeadline({
633
821
  )
634
822
  ] }),
635
823
  /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
636
- /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: "Network fee" }),
824
+ /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.networkFee }),
637
825
  /* @__PURE__ */ jsx(Text, { style: styles.factValueNum, children: money(dispute.feeMinor, dispute.currency, { locale }) })
638
826
  ] }),
639
827
  /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
640
- /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: "Reason" }),
641
- /* @__PURE__ */ jsx(Text, { style: styles.factValue, children: `${dispute.reason} \xB7 ${dispute.network}` })
828
+ /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.reason }),
829
+ /* @__PURE__ */ jsx(Text, { style: styles.factValue, children: labels.reasonNetwork(dispute.reason, dispute.network) })
642
830
  ] }),
643
831
  /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
644
- /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: "Opened" }),
832
+ /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.opened }),
645
833
  /* @__PURE__ */ jsx(Text, { style: styles.factValue, children: dispute.opened })
646
834
  ] })
647
835
  ] })
@@ -651,11 +839,14 @@ function DisputeDeadline({
651
839
  }
652
840
  function DisputeEvidenceRow({
653
841
  item,
654
- attachLabel = "Attach",
842
+ attachLabel,
655
843
  onAttach,
844
+ labels: labelsProp,
656
845
  style
657
846
  }) {
658
- const theme = useLoamTheme();
847
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
848
+ const pay = usePayLabels(labelsProp);
849
+ const theme = useLoamTheme("refund");
659
850
  const { styles } = useStyles(sheet3);
660
851
  const tone = evidenceTone(item.state);
661
852
  const glyphColor = tone === "good" ? theme.color.good : tone === "warn" ? theme.color.warn : theme.color.text3;
@@ -666,47 +857,51 @@ function DisputeEvidenceRow({
666
857
  /* @__PURE__ */ jsx(Text, { style: styles.evidenceNote, children: item.note })
667
858
  ] }),
668
859
  /* @__PURE__ */ jsxs(View, { style: styles.evidenceTrail, children: [
669
- /* @__PURE__ */ jsx(Badge, { style: styles.rowBadge, variant: BADGE_VARIANT[tone], size: "sm", children: evidenceLabel(item.state) }),
670
- item.state === "missing" && onAttach ? /* @__PURE__ */ jsx(Button, { size: "xs", variant: "outline", leadingIcon: "upload", onPress: () => onAttach(item), children: attachLabel }) : null
860
+ /* @__PURE__ */ jsx(Badge, { style: styles.rowBadge, variant: BADGE_VARIANT[tone], size: "sm", children: evidenceLabel(item.state, pay) }),
861
+ item.state === "missing" && onAttach ? /* @__PURE__ */ jsx(Button, { size: "xs", variant: "outline", leadingIcon: "upload", onPress: () => onAttach(item), children: attachLabel ?? labels.attach }) : null
671
862
  ] })
672
863
  ] });
673
864
  }
674
865
  function DisputePanel({
675
866
  dispute,
676
- title = "Chargeback",
677
- description = "The amount and the network fee have already left the account. Submitting evidence asks the network to reverse the first of those; the fee is not refundable either way, and the network decides \u2014 not us.",
678
- submitLabel = "Submit evidence",
679
- acceptLabel = "Accept the dispute",
867
+ title,
868
+ description,
869
+ submitLabel,
870
+ acceptLabel,
680
871
  canSubmit = true,
681
872
  busy = false,
682
873
  showGuidance = true,
683
874
  onSubmitEvidence,
684
875
  onAccept,
685
876
  onAttach,
686
- locale,
877
+ locale: localeProp,
878
+ labels: labelsProp,
687
879
  style
688
880
  }) {
689
- const theme = useLoamTheme();
881
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
882
+ const providerLocale = useLoamLocale();
883
+ const locale = localeProp ?? providerLocale;
884
+ const theme = useLoamTheme("refund");
690
885
  const { styles } = useStyles(sheet3);
691
886
  const worth = disputeWorthDefending(dispute.amountMinor);
692
887
  const threshold = money(DISPUTE_ACCEPT_THRESHOLD_MINOR, dispute.currency, { locale });
693
- return /* @__PURE__ */ jsxs(View, { role: "region", accessibilityLabel: title, style: [styles.panel, style], children: [
888
+ return /* @__PURE__ */ jsxs(View, { role: "region", accessibilityLabel: title ?? labels.disputeTitle, style: [styles.panel, style], children: [
694
889
  /* @__PURE__ */ jsxs(View, { style: styles.header, children: [
695
- /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.title, children: title }),
696
- /* @__PURE__ */ jsx(DisputeDeadline, { dispute, locale }),
697
- /* @__PURE__ */ jsx(Text, { style: styles.description, children: description })
890
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.title, children: title ?? labels.disputeTitle }),
891
+ /* @__PURE__ */ jsx(DisputeDeadline, { dispute, locale, labels: labelsProp }),
892
+ /* @__PURE__ */ jsx(Text, { style: styles.description, children: description ?? labels.disputeDescription })
698
893
  ] }),
699
894
  /* @__PURE__ */ jsxs(View, { style: styles.evidenceBlock, children: [
700
- /* @__PURE__ */ jsx(Text, { style: styles.overline, children: "Evidence" }),
701
- /* @__PURE__ */ jsx(View, { role: "list", accessibilityRole: "list", children: dispute.evidence.map((item) => /* @__PURE__ */ jsx(DisputeEvidenceRow, { item, onAttach }, item.label)) })
895
+ /* @__PURE__ */ jsx(Text, { style: styles.overline, children: labels.evidence }),
896
+ /* @__PURE__ */ jsx(View, { role: "list", accessibilityRole: "list", children: dispute.evidence.map((item) => /* @__PURE__ */ jsx(DisputeEvidenceRow, { item, onAttach, labels: labelsProp }, item.label)) })
702
897
  ] }),
703
898
  showGuidance ? /* @__PURE__ */ jsxs(View, { style: styles.guidanceRow, children: [
704
899
  /* @__PURE__ */ jsx(Icon, { name: "info", size: theme.icon.sm, color: theme.color.text3 }),
705
- /* @__PURE__ */ jsx(Text, { style: styles.guidance, children: (worth ? `Above ${threshold} this is usually worth defending \u2014 the amount at stake exceeds the staff time a response costs.` : `Below ${threshold} the staff time spent defending this usually exceeds the amount at stake. Accepting is a legitimate answer, not a loss.`) + (canSubmit ? "" : " Some evidence is still missing; submitting now sends what is attached.") })
900
+ /* @__PURE__ */ jsx(Text, { style: styles.guidance, children: labels.guidance(worth, threshold, canSubmit) })
706
901
  ] }) : null,
707
902
  /* @__PURE__ */ jsxs(View, { style: styles.actionRow, children: [
708
- /* @__PURE__ */ jsx(Button, { loading: busy, onPress: onSubmitEvidence, children: submitLabel }),
709
- /* @__PURE__ */ jsx(Button, { variant: "outline", onPress: onAccept, children: acceptLabel })
903
+ /* @__PURE__ */ jsx(Button, { loading: busy, onPress: onSubmitEvidence, children: submitLabel ?? labels.submitEvidence }),
904
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onPress: onAccept, children: acceptLabel ?? labels.acceptDispute })
710
905
  ] })
711
906
  ] });
712
907
  }