@opexa/portal-components 0.0.16 → 0.0.18

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 (246) hide show
  1. package/dist/client/hooks/index.d.ts +3 -0
  2. package/dist/client/hooks/useGlobalStore.d.ts +11 -1
  3. package/dist/client/hooks/useGlobalStore.js +1 -1
  4. package/dist/client/hooks/useGlobalStore.mjs +81 -35
  5. package/dist/client/hooks/useMarkMessageAsReadMutation.d.ts +6 -0
  6. package/dist/client/hooks/useMarkMessageAsReadMutation.js +1 -0
  7. package/dist/client/hooks/useMarkMessageAsReadMutation.mjs +39 -0
  8. package/dist/client/hooks/useMessagesQuery.d.ts +3 -0
  9. package/dist/client/hooks/useMessagesQuery.js +1 -0
  10. package/dist/client/hooks/useMessagesQuery.mjs +47 -0
  11. package/dist/client/hooks/useUnreadMessagesCountQuery.d.ts +3 -0
  12. package/dist/client/hooks/useUnreadMessagesCountQuery.js +1 -0
  13. package/dist/client/hooks/useUnreadMessagesCountQuery.mjs +38 -0
  14. package/dist/client-hooks.js +1 -1
  15. package/dist/client-hooks.mjs +38 -32
  16. package/dist/components/Account/Account.d.ts +3 -1
  17. package/dist/components/Account/Account.js +1 -1
  18. package/dist/components/Account/Account.mjs +163 -96
  19. package/dist/components/Banner/Banner.js +1 -1
  20. package/dist/components/Banner/Banner.mjs +6 -6
  21. package/dist/components/BetRecords/BetRecords.js +1 -1
  22. package/dist/components/BetRecords/BetRecords.mjs +357 -325
  23. package/dist/components/Bonus/Bonus.client.d.ts +2 -0
  24. package/dist/components/Bonus/Bonus.d.ts +10 -0
  25. package/dist/components/Bonus/index.d.ts +1 -0
  26. package/dist/components/Bonuses/Bonuses.d.ts +15 -0
  27. package/dist/components/Bonuses/Bonuses.js +1 -0
  28. package/dist/components/Bonuses/Bonuses.mjs +125 -0
  29. package/dist/components/Bonuses/index.d.ts +1 -0
  30. package/dist/components/DepositWithdrawal/AmountChoices.js +1 -1
  31. package/dist/components/DepositWithdrawal/AmountChoices.mjs +9 -6
  32. package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +1 -1
  33. package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.mjs +11 -8
  34. package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +1 -1
  35. package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.mjs +5 -2
  36. package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +1 -1
  37. package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.mjs +5 -2
  38. package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +1 -1
  39. package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.mjs +16 -13
  40. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +1 -1
  41. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.mjs +5 -2
  42. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.js +1 -1
  43. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.mjs +9 -6
  44. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +1 -1
  45. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.mjs +18 -15
  46. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.js +1 -1
  47. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.mjs +9 -6
  48. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.js +1 -1
  49. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.mjs +9 -6
  50. package/dist/components/DepositWithdrawal/DepositWithdrawal.js +1 -1
  51. package/dist/components/DepositWithdrawal/DepositWithdrawal.mjs +46 -46
  52. package/dist/components/DepositWithdrawal/PaymentMethods.js +1 -1
  53. package/dist/components/DepositWithdrawal/PaymentMethods.mjs +26 -23
  54. package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +1 -1
  55. package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.mjs +86 -76
  56. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +1 -1
  57. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.mjs +118 -108
  58. package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +1 -1
  59. package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.mjs +75 -65
  60. package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +1 -1
  61. package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.mjs +96 -86
  62. package/dist/components/Disclaimer/Disclaimer.js +1 -1
  63. package/dist/components/Disclaimer/Disclaimer.mjs +11 -8
  64. package/dist/components/Empty/Empty.js +1 -1
  65. package/dist/components/Empty/Empty.mjs +14 -10
  66. package/dist/components/GameLaunch/GameLaunch.js +1 -1
  67. package/dist/components/GameLaunch/GameLaunch.mjs +42 -39
  68. package/dist/components/Games/Games.client.js +1 -1
  69. package/dist/components/Games/Games.client.mjs +47 -44
  70. package/dist/components/Games/Games.d.ts +7 -2
  71. package/dist/components/JackpotCounter/JackpotCounter.d.ts +4 -2
  72. package/dist/components/JackpotCounter/JackpotCounter.js +1 -1
  73. package/dist/components/JackpotCounter/JackpotCounter.mjs +38 -34
  74. package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +3 -1
  75. package/dist/components/JackpotCounter/JackpotCounterItem.js +1 -1
  76. package/dist/components/JackpotCounter/JackpotCounterItem.mjs +282 -124
  77. package/dist/components/JackpotCounter/JackpotCounterItem.module.css.js +1 -1
  78. package/dist/components/JackpotCounter/JackpotCounterItem.module.css.mjs +11 -8
  79. package/dist/components/Jackpots/JackpotGameProviders.d.ts +1 -0
  80. package/dist/components/Jackpots/JackpotItem.d.ts +7 -0
  81. package/dist/components/Jackpots/JackpotItemMobile.d.ts +7 -0
  82. package/dist/components/Jackpots/Jackpots.d.ts +8 -0
  83. package/dist/components/Jackpots/index.d.ts +1 -0
  84. package/dist/components/Marquee/Marquee.js +1 -1
  85. package/dist/components/Marquee/Marquee.mjs +12 -14
  86. package/dist/components/Messages/MessageItem.d.ts +4 -0
  87. package/dist/components/Messages/MessageItem.js +1 -0
  88. package/dist/components/Messages/MessageItem.mjs +66 -0
  89. package/dist/components/Messages/MessagePopup.d.ts +1 -0
  90. package/dist/components/Messages/MessagePopup.js +1 -0
  91. package/dist/components/Messages/MessagePopup.mjs +89 -0
  92. package/dist/components/Messages/Messages.d.ts +1 -0
  93. package/dist/components/Messages/Messages.js +1 -0
  94. package/dist/components/Messages/Messages.mjs +147 -0
  95. package/dist/components/Messages/index.d.ts +1 -0
  96. package/dist/components/Messages/utils.d.ts +3 -0
  97. package/dist/components/Messages/utils.js +1 -0
  98. package/dist/components/Messages/utils.mjs +16 -0
  99. package/dist/components/Promos/PromoCarousel.js +1 -1
  100. package/dist/components/Promos/PromoCarousel.mjs +27 -24
  101. package/dist/components/Promos/PromoGrid.js +1 -1
  102. package/dist/components/Promos/PromoGrid.mjs +7 -7
  103. package/dist/components/Promos/PromoItem.js +1 -1
  104. package/dist/components/Promos/PromoItem.mjs +10 -7
  105. package/dist/components/Promos/Promos.d.ts +4 -2
  106. package/dist/components/SignIn/SignIn.d.ts +0 -1
  107. package/dist/components/SignIn/SignIn.js +1 -1
  108. package/dist/components/SignIn/SignIn.mjs +32 -41
  109. package/dist/components/SignIn/SignInForm.js +1 -1
  110. package/dist/components/SignIn/SignInForm.mjs +167 -160
  111. package/dist/components/SignUp/SignUp.d.ts +0 -1
  112. package/dist/components/SignUp/SignUp.js +1 -1
  113. package/dist/components/SignUp/SignUp.mjs +32 -41
  114. package/dist/components/SignUp/SignUpForm.js +1 -1
  115. package/dist/components/SignUp/SignUpForm.mjs +123 -116
  116. package/dist/components/TopWins/TopWins.client.js +1 -1
  117. package/dist/components/TopWins/TopWins.client.mjs +14 -14
  118. package/dist/components/TopWins/TopWins.d.ts +2 -1
  119. package/dist/components/TournamentCounter/TournamentCounter.d.ts +4 -2
  120. package/dist/components/TournamentCounter/TournamentCounter.js +1 -1
  121. package/dist/components/TournamentCounter/TournamentCounter.mjs +27 -24
  122. package/dist/components/TransactionRecords/DepositRecordsTable.js +1 -1
  123. package/dist/components/TransactionRecords/DepositRecordsTable.mjs +113 -99
  124. package/dist/components/TransactionRecords/TableFilters.d.ts +3 -1
  125. package/dist/components/TransactionRecords/TableFilters.js +1 -1
  126. package/dist/components/TransactionRecords/TableFilters.mjs +193 -132
  127. package/dist/components/TransactionRecords/TransactionRecords.js +1 -1
  128. package/dist/components/TransactionRecords/TransactionRecords.mjs +21 -17
  129. package/dist/components/TransactionRecords/TransactionRecordsTable.js +1 -1
  130. package/dist/components/TransactionRecords/TransactionRecordsTable.mjs +89 -77
  131. package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -1
  132. package/dist/components/TransactionRecords/WithdrawalRecordsTable.mjs +105 -96
  133. package/dist/components/index.d.ts +2 -0
  134. package/dist/components.js +1 -1
  135. package/dist/components.mjs +36 -32
  136. package/dist/icons/ArrowNarrowDownIcon.d.ts +2 -0
  137. package/dist/icons/ArrowNarrowUpIcon.d.ts +2 -0
  138. package/dist/icons/Bell01Icon.d.ts +2 -0
  139. package/dist/icons/Bell01Icon.js +1 -0
  140. package/dist/icons/Bell01Icon.mjs +27 -0
  141. package/dist/icons/BellRingIcon.d.ts +2 -0
  142. package/dist/icons/BellRingIcon.js +1 -0
  143. package/dist/icons/BellRingIcon.mjs +27 -0
  144. package/dist/icons/EyeIcon.d.ts +2 -0
  145. package/dist/icons/EyeIcon.js +1 -0
  146. package/dist/icons/EyeIcon.mjs +25 -0
  147. package/dist/icons/EyeOffIcon.d.ts +2 -0
  148. package/dist/icons/EyeOffIcon.js +1 -0
  149. package/dist/icons/EyeOffIcon.mjs +22 -0
  150. package/dist/icons/StarIcon.d.ts +2 -0
  151. package/dist/icons/StarIcon.js +1 -0
  152. package/dist/icons/StarIcon.mjs +19 -0
  153. package/dist/icons/StopWatchIcon.d.ts +2 -0
  154. package/dist/icons/StopWatchIcon.js +1 -0
  155. package/dist/icons/StopWatchIcon.mjs +22 -0
  156. package/dist/icons/Trophy01Icon.d.ts +2 -0
  157. package/dist/icons/Trophy01Icon.js +1 -0
  158. package/dist/icons/Trophy01Icon.mjs +22 -0
  159. package/dist/icons/index.d.ts +6 -0
  160. package/dist/icons.d.ts +2 -0
  161. package/dist/icons.js +1 -0
  162. package/dist/icons.mjs +62 -0
  163. package/dist/images/first-place.png.js +1 -0
  164. package/dist/images/first-place.png.mjs +4 -0
  165. package/dist/images/leaderboard.png.js +1 -0
  166. package/dist/images/leaderboard.png.mjs +4 -0
  167. package/dist/images/placeholder-avatar.png.js +1 -0
  168. package/dist/images/placeholder-avatar.png.mjs +4 -0
  169. package/dist/images/responsible-gaming.png.js +1 -1
  170. package/dist/images/responsible-gaming.png.mjs +2 -2
  171. package/dist/portal-components.css +1 -1
  172. package/dist/server/utils/prefetchUnreadMessagesCountQuery.d.ts +2 -0
  173. package/dist/theme.css +130 -4
  174. package/dist/ui/AlertDialog/alertDialog.recipe.js +1 -1
  175. package/dist/ui/AlertDialog/alertDialog.recipe.mjs +6 -6
  176. package/dist/ui/Badge/Badge.d.ts +274 -27
  177. package/dist/ui/Badge/Badge.js +1 -1
  178. package/dist/ui/Badge/Badge.mjs +14 -10
  179. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  180. package/dist/ui/Badge/badge.anatomy.js +1 -1
  181. package/dist/ui/Badge/badge.anatomy.mjs +1 -0
  182. package/dist/ui/Badge/badge.recipe.d.ts +57 -9
  183. package/dist/ui/Badge/badge.recipe.js +1 -1
  184. package/dist/ui/Badge/badge.recipe.mjs +57 -21
  185. package/dist/ui/Button/button.recipe.d.ts +2 -2
  186. package/dist/ui/Button/button.recipe.js +1 -1
  187. package/dist/ui/Button/button.recipe.mjs +17 -7
  188. package/dist/ui/Checkbox/checkbox.recipe.js +1 -1
  189. package/dist/ui/Checkbox/checkbox.recipe.mjs +6 -6
  190. package/dist/ui/Collapsible/Collapsible.d.ts +114 -0
  191. package/dist/ui/Collapsible/Collapsible.js +1 -0
  192. package/dist/ui/Collapsible/Collapsible.mjs +13 -0
  193. package/dist/ui/Collapsible/collapsible.recipe.d.ts +28 -0
  194. package/dist/ui/Collapsible/collapsible.recipe.js +1 -0
  195. package/dist/ui/Collapsible/collapsible.recipe.mjs +18 -0
  196. package/dist/ui/Collapsible/index.d.ts +1 -0
  197. package/dist/ui/DatePicker/datePicker.recipe.js +1 -1
  198. package/dist/ui/DatePicker/datePicker.recipe.mjs +37 -6
  199. package/dist/ui/Dialog/dialog.recipe.js +1 -1
  200. package/dist/ui/Dialog/dialog.recipe.mjs +3 -3
  201. package/dist/ui/Drawer/drawer.recipe.js +1 -1
  202. package/dist/ui/Drawer/drawer.recipe.mjs +6 -6
  203. package/dist/ui/Field/field.recipe.js +1 -1
  204. package/dist/ui/Field/field.recipe.mjs +10 -12
  205. package/dist/ui/IconButton/iconButton.recipe.d.ts +2 -2
  206. package/dist/ui/IconButton/iconButton.recipe.js +1 -1
  207. package/dist/ui/IconButton/iconButton.recipe.mjs +6 -6
  208. package/dist/ui/NumberInput/numberInput.recipe.js +1 -1
  209. package/dist/ui/NumberInput/numberInput.recipe.mjs +8 -8
  210. package/dist/ui/PasswordInput/PasswordInput.d.ts +242 -1
  211. package/dist/ui/PasswordInput/PasswordInput.js +1 -0
  212. package/dist/ui/PasswordInput/PasswordInput.mjs +18 -0
  213. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +6 -18
  214. package/dist/ui/PasswordInput/passwordInput.recipe.js +1 -0
  215. package/dist/ui/PasswordInput/passwordInput.recipe.mjs +48 -0
  216. package/dist/ui/PinInput/pinInput.recipe.js +1 -1
  217. package/dist/ui/PinInput/pinInput.recipe.mjs +3 -3
  218. package/dist/ui/Popover/popover.recipe.js +1 -1
  219. package/dist/ui/Popover/popover.recipe.mjs +1 -1
  220. package/dist/ui/Progress/Progress.d.ts +335 -1
  221. package/dist/ui/Progress/Progress.js +1 -1
  222. package/dist/ui/Progress/Progress.mjs +15 -2
  223. package/dist/ui/Progress/progress.recipe.d.ts +37 -1
  224. package/dist/ui/Progress/progress.recipe.js +1 -0
  225. package/dist/ui/Progress/progress.recipe.mjs +41 -0
  226. package/dist/ui/Prose.d.ts +2 -0
  227. package/dist/ui/Prose.js +1 -0
  228. package/dist/ui/Prose.mjs +47 -0
  229. package/dist/ui/SegmentGroup/segmentGroup.recipe.js +1 -1
  230. package/dist/ui/SegmentGroup/segmentGroup.recipe.mjs +3 -3
  231. package/dist/ui/Select/select.recipe.js +1 -1
  232. package/dist/ui/Select/select.recipe.mjs +6 -6
  233. package/dist/ui/Table/table.recipe.js +1 -1
  234. package/dist/ui/Table/table.recipe.mjs +4 -4
  235. package/dist/ui/Tabs/tabs.recipe.js +1 -1
  236. package/dist/ui/Tabs/tabs.recipe.mjs +3 -3
  237. package/dist/ui/index.d.ts +3 -0
  238. package/dist/ui.js +1 -1
  239. package/dist/ui.mjs +36 -30
  240. package/dist/utils/queryKeys.d.ts +4 -1
  241. package/dist/utils/queryKeys.js +1 -1
  242. package/dist/utils/queryKeys.mjs +34 -26
  243. package/dist/utils.js +1 -1
  244. package/dist/utils.mjs +35 -32
  245. package/package.json +11 -5
  246. package/dist/components/Promos/PromosContent.d.ts +0 -2
@@ -1,9 +1,9 @@
1
- import { jsxs as t, jsx as e, Fragment as I } from "react/jsx-runtime";
2
- import { zodResolver as P } from "@hookform/resolvers/zod";
3
- import { useEffect as W } from "react";
4
- import { useForm as M, Controller as D } from "react-hook-form";
1
+ import { jsxs as t, jsx as o, Fragment as S } from "react/jsx-runtime";
2
+ import { zodResolver as x } from "@hookform/resolvers/zod";
3
+ import { useEffect as C } from "react";
4
+ import { useForm as P, Controller as W } from "react-hook-form";
5
5
  import { z as s } from "zod";
6
- import { useShallow as L } from "zustand/shallow";
6
+ import { useShallow as $ } from "zustand/shallow";
7
7
  import "@opexa/portal-sdk-core";
8
8
  import "@tanstack/react-query";
9
9
  import "tiny-invariant";
@@ -15,16 +15,18 @@ import "../../../../utils/getQueryClient.mjs";
15
15
  import "../../../../utils/isMobile.mjs";
16
16
  import "lodash-es";
17
17
  import "@opexa/portal-sdk-core/object-id";
18
- import { useCreateGCashWithdrawalMutation as A } from "../../../../client/hooks/useCreateGCashWithdrawalMutation.mjs";
19
- import { useGlobalStore as R } from "../../../../client/hooks/useGlobalStore.mjs";
18
+ import { useCreateGCashWithdrawalMutation as L } from "../../../../client/hooks/useCreateGCashWithdrawalMutation.mjs";
19
+ import { useGlobalStore as M } from "../../../../client/hooks/useGlobalStore.mjs";
20
20
  import "../../../../client/hooks/useInfiniteQueryHelper.mjs";
21
- import { useLocaleInfo as T } from "../../../../client/hooks/useLocaleInfo.mjs";
22
- import { useMobileNumberParser as V } from "../../../../client/hooks/useMobileNumberParser.mjs";
21
+ import { useLocaleInfo as D } from "../../../../client/hooks/useLocaleInfo.mjs";
22
+ import { useMobileNumberParser as R } from "../../../../client/hooks/useMobileNumberParser.mjs";
23
23
  import "usehooks-ts";
24
- import { usePaymentSettingsQuery as $ } from "../../../../client/hooks/usePaymentSettingsQuery.mjs";
24
+ import { usePaymentSettingsQuery as E } from "../../../../client/hooks/usePaymentSettingsQuery.mjs";
25
25
  import { toaster as w } from "../../../../client/utils/toaster.mjs";
26
- import { ChevronDownIcon as E } from "../../../../icons/ChevronDownIcon.mjs";
27
- import { ChevronUpIcon as F } from "../../../../icons/ChevronUpIcon.mjs";
26
+ import { ChevronDownIcon as T } from "../../../../icons/ChevronDownIcon.mjs";
27
+ import { ChevronUpIcon as V } from "../../../../icons/ChevronUpIcon.mjs";
28
+ import { EyeIcon as A } from "../../../../icons/EyeIcon.mjs";
29
+ import { EyeOffIcon as F } from "../../../../icons/EyeOffIcon.mjs";
28
30
  import { SpinnerIcon as G } from "../../../../icons/SpinnerIcon.mjs";
29
31
  import "../../../../ui/AlertDialog/AlertDialog.mjs";
30
32
  import "../../../../ui/Avatar/Avatar.mjs";
@@ -32,47 +34,50 @@ import "../../../../ui/Badge/Badge.mjs";
32
34
  import { Button as j } from "../../../../ui/Button/Button.mjs";
33
35
  import "../../../../ui/Checkbox/Checkbox.mjs";
34
36
  import "../../../../ui/Clipboard/Clipboard.mjs";
37
+ import "../../../../ui/Collapsible/Collapsible.mjs";
35
38
  import "../../../../ui/DatePicker/DatePicker.mjs";
36
39
  import "../../../../ui/Dialog/Dialog.mjs";
37
40
  import "../../../../ui/Drawer/Drawer.mjs";
38
- import { Root as d, Label as N, Input as v, ErrorText as f } from "../../../../ui/Field/Field.mjs";
41
+ import { Root as d, Label as z, Input as O, ErrorText as f } from "../../../../ui/Field/Field.mjs";
39
42
  import "@ark-ui/react";
40
43
  import "../../../../ui/IconButton/iconButton.recipe.mjs";
41
- import { Root as z, Label as Q, Control as U, Input as O, IncrementTrigger as Z, DecrementTrigger as _ } from "../../../../ui/NumberInput/NumberInput.mjs";
44
+ import { Root as Q, Label as U, Control as k, Input as Z, IncrementTrigger as _, DecrementTrigger as q } from "../../../../ui/NumberInput/NumberInput.mjs";
45
+ import { Root as B, Label as H, Control as J, Input as K, VisibilityTrigger as X, Indicator as Y } from "../../../../ui/PasswordInput/PasswordInput.mjs";
42
46
  import "../../../../ui/PinInput/PinInput.mjs";
43
47
  import "../../../../ui/Popover/Popover.mjs";
44
48
  import "tailwind-merge";
49
+ import "../../../../ui/Progress/Progress.mjs";
45
50
  import "../../../../ui/SegmentGroup/SegmentGroup.mjs";
46
51
  import "../../../../ui/Select/Select.mjs";
47
52
  import "../../../../ui/Table/Table.mjs";
48
53
  import "../../../../ui/Tabs/Tabs.mjs";
49
- import { AmountChoices as k } from "../../AmountChoices.mjs";
50
- function Oe() {
54
+ import { AmountChoices as oo } from "../../AmountChoices.mjs";
55
+ function tr() {
51
56
  var b, g;
52
- const S = R(
53
- L((r) => ({
54
- depositWithdrawal: r.depositWithdrawal
57
+ const N = M(
58
+ $((e) => ({
59
+ depositWithdrawal: e.depositWithdrawal
55
60
  }))
56
- ), h = T(), x = V(), p = A({
61
+ ), h = D(), y = R(), c = L({
57
62
  onSuccess() {
58
- o.reset(), S.depositWithdrawal.setOpen(!1), w.success({
63
+ r.reset(), N.depositWithdrawal.setOpen(!1), w.success({
59
64
  description: "Withdrawal request submitted successfully."
60
65
  });
61
66
  },
62
- onError(r) {
67
+ onError(e) {
63
68
  w.error({
64
- description: r.message
69
+ description: e.message
65
70
  });
66
71
  }
67
- }), c = $().data, i = c == null ? void 0 : c.gcashWithdrawalGatewaySettings, m = u(i == null ? void 0 : i.minimumAmount, 0), a = u(i == null ? void 0 : i.maximumAmount, 0), y = s.object({
68
- amount: s.string().superRefine((r, n) => {
69
- const l = u(r, 0);
70
- l < m && n.addIssue({
72
+ }), p = E().data, m = p == null ? void 0 : p.gcashWithdrawalGatewaySettings, i = u(m == null ? void 0 : m.minimumAmount, 0), a = u(m == null ? void 0 : m.maximumAmount, 0), I = s.object({
73
+ amount: s.string().superRefine((e, n) => {
74
+ const l = u(e, 0);
75
+ l < i && n.addIssue({
71
76
  type: "number",
72
77
  code: s.ZodIssueCode.too_small,
73
78
  inclusive: !0,
74
- minimum: m,
75
- message: `Minimum amount is ${m.toLocaleString()}`
79
+ minimum: i,
80
+ message: `Minimum amount is ${i.toLocaleString()}`
76
81
  }), l > a && n.addIssue({
77
82
  type: "number",
78
83
  code: s.ZodIssueCode.too_big,
@@ -83,59 +88,59 @@ function Oe() {
83
88
  }),
84
89
  password: s.string().min(8, "Password must be 8 or more characters").max(64, "Password must be not be more than 64 characters"),
85
90
  mobileNumber: s.string().regex(h.mobileNumber.pattern, "Invalid mobile number")
86
- }), o = M({
91
+ }), r = P({
87
92
  mode: "all",
88
- resolver: P(y),
93
+ resolver: x(I),
89
94
  defaultValues: {
90
95
  amount: "0",
91
96
  password: "",
92
97
  mobileNumber: ""
93
98
  }
94
99
  });
95
- W(() => {
96
- m && o.reset({
97
- amount: m.toString(),
100
+ C(() => {
101
+ i && r.reset({
102
+ amount: i.toString(),
98
103
  password: "",
99
104
  mobileNumber: ""
100
105
  });
101
- }, [o, m]);
102
- const C = o.handleSubmit(async (r) => {
103
- p.mutate({
104
- amount: r.amount,
105
- recipientMobileNumber: x.format(r.mobileNumber),
106
- transactionPassword: r.password
106
+ }, [r, i]);
107
+ const v = r.handleSubmit(async (e) => {
108
+ c.mutate({
109
+ amount: e.amount,
110
+ recipientMobileNumber: y.format(e.mobileNumber),
111
+ transactionPassword: e.password
107
112
  });
108
113
  });
109
- return /* @__PURE__ */ t("form", { onSubmit: C, noValidate: !0, autoComplete: "off", children: [
110
- /* @__PURE__ */ t(d, { invalid: !!o.formState.errors.mobileNumber, children: [
111
- /* @__PURE__ */ e(N, { children: "Mobile Number" }),
114
+ return /* @__PURE__ */ t("form", { onSubmit: v, noValidate: !0, autoComplete: "off", children: [
115
+ /* @__PURE__ */ t(d, { invalid: !!r.formState.errors.mobileNumber, children: [
116
+ /* @__PURE__ */ o(z, { children: "Mobile Number" }),
112
117
  /* @__PURE__ */ t("div", { className: "relative", children: [
113
- /* @__PURE__ */ e(h.country.flag, { className: "pointer-events-none absolute left-3.5 top-1/2 size-5 -translate-y-1/2" }),
114
- /* @__PURE__ */ e(v, { className: "pl-10.5", ...o.register("mobileNumber") })
118
+ /* @__PURE__ */ o(h.country.flag, { className: "pointer-events-none absolute left-3.5 top-1/2 size-5 -translate-y-1/2" }),
119
+ /* @__PURE__ */ o(O, { className: "pl-10.5", ...r.register("mobileNumber") })
115
120
  ] }),
116
- /* @__PURE__ */ e(f, { children: (b = o.formState.errors.mobileNumber) == null ? void 0 : b.message })
121
+ /* @__PURE__ */ o(f, { children: (b = r.formState.errors.mobileNumber) == null ? void 0 : b.message })
117
122
  ] }),
118
- /* @__PURE__ */ e(
119
- D,
123
+ /* @__PURE__ */ o(
124
+ W,
120
125
  {
121
- control: o.control,
126
+ control: r.control,
122
127
  name: "amount",
123
- render: (r) => {
128
+ render: (e) => {
124
129
  var n;
125
130
  return /* @__PURE__ */ t(
126
131
  d,
127
132
  {
128
- invalid: !!o.formState.errors.amount,
133
+ invalid: !!r.formState.errors.amount,
129
134
  className: "mt-3xl",
130
135
  children: [
131
136
  /* @__PURE__ */ t(
132
- z,
137
+ Q,
133
138
  {
134
139
  min: 0,
135
140
  step: 1,
136
- value: r.field.value,
141
+ value: e.field.value,
137
142
  onValueChange: (l) => {
138
- r.field.onChange(l.value);
143
+ e.field.onChange(l.value);
139
144
  },
140
145
  formatOptions: {
141
146
  maximumFractionDigits: 2,
@@ -143,57 +148,62 @@ function Oe() {
143
148
  },
144
149
  allowMouseWheel: !0,
145
150
  children: [
146
- /* @__PURE__ */ e(Q, { children: "Enter amount you want to withdraw" }),
147
- /* @__PURE__ */ t(U, { children: [
148
- /* @__PURE__ */ e(O, {}),
149
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(F, {}) }),
150
- /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(E, {}) })
151
+ /* @__PURE__ */ o(U, { children: "Enter amount you want to withdraw" }),
152
+ /* @__PURE__ */ t(k, { children: [
153
+ /* @__PURE__ */ o(Z, {}),
154
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(V, {}) }),
155
+ /* @__PURE__ */ o(q, { children: /* @__PURE__ */ o(T, {}) })
151
156
  ] })
152
157
  ]
153
158
  }
154
159
  ),
155
- /* @__PURE__ */ e(f, { children: (n = o.formState.errors.amount) == null ? void 0 : n.message })
160
+ /* @__PURE__ */ o(f, { children: (n = r.formState.errors.amount) == null ? void 0 : n.message })
156
161
  ]
157
162
  }
158
163
  );
159
164
  }
160
165
  }
161
166
  ),
162
- /* @__PURE__ */ e(
163
- k,
167
+ /* @__PURE__ */ o(
168
+ oo,
164
169
  {
165
- value: u(o.watch("amount"), 0),
166
- onChange: (r) => {
167
- o.setValue("amount", r.toString(), {
170
+ value: u(r.watch("amount"), 0),
171
+ onChange: (e) => {
172
+ r.setValue("amount", e.toString(), {
168
173
  shouldTouch: !0,
169
174
  shouldDirty: !0,
170
175
  shouldValidate: !0
171
176
  });
172
177
  },
173
- min: m,
178
+ min: i,
174
179
  max: a,
175
180
  className: "mt-xl"
176
181
  }
177
182
  ),
178
- /* @__PURE__ */ t(d, { className: "mt-3xl", invalid: !!o.formState.errors.password, children: [
179
- /* @__PURE__ */ e(N, { children: "Password" }),
180
- /* @__PURE__ */ e(v, { type: "password", ...o.register("password") }),
181
- /* @__PURE__ */ e(f, { children: (g = o.formState.errors.password) == null ? void 0 : g.message })
183
+ /* @__PURE__ */ t(d, { className: "mt-3xl", invalid: !!r.formState.errors.password, children: [
184
+ /* @__PURE__ */ t(B, { children: [
185
+ /* @__PURE__ */ o(H, { children: "Password" }),
186
+ /* @__PURE__ */ t(J, { children: [
187
+ /* @__PURE__ */ o(K, { ...r.register("password") }),
188
+ /* @__PURE__ */ o(X, { children: /* @__PURE__ */ o(Y, { fallback: /* @__PURE__ */ o(F, {}), asChild: !0, children: /* @__PURE__ */ o(A, {}) }) })
189
+ ] })
190
+ ] }),
191
+ /* @__PURE__ */ o(f, { children: (g = r.formState.errors.password) == null ? void 0 : g.message })
182
192
  ] }),
183
193
  /* @__PURE__ */ t("p", { className: "mt-4xl text-xs", children: [
184
194
  "Upon clicking the deposit button, you agree to the",
185
195
  " ",
186
- /* @__PURE__ */ e("button", { type: "button", className: "underline underline-offset-2", children: "Terms of Use and Privacy Policy" }),
196
+ /* @__PURE__ */ o("button", { type: "button", className: "underline underline-offset-2", children: "Terms of Use and Privacy Policy" }),
187
197
  "."
188
198
  ] }),
189
- /* @__PURE__ */ e(
199
+ /* @__PURE__ */ o(
190
200
  j,
191
201
  {
192
202
  type: "submit",
193
203
  className: "mt-4.5",
194
- disabled: p.isPending,
195
- children: p.isPending ? /* @__PURE__ */ t(I, { children: [
196
- /* @__PURE__ */ e(G, {}),
204
+ disabled: c.isPending,
205
+ children: c.isPending ? /* @__PURE__ */ t(S, { children: [
206
+ /* @__PURE__ */ o(G, {}),
197
207
  "Processing..."
198
208
  ] }) : "Deposit"
199
209
  }
@@ -201,5 +211,5 @@ function Oe() {
201
211
  ] });
202
212
  }
203
213
  export {
204
- Oe as GCashWithdrawal
214
+ tr as GCashWithdrawal
205
215
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("@ark-ui/react"),k=require("@hookform/resolvers/zod"),b=require("react"),j=require("react-hook-form"),c=require("zod"),N=require("zustand/shallow");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../../../constants/index.js");require("../../../../utils/capitalize.js");const h=require("../../../../utils/parseDecimal.js");require("../../../../utils/getLocaleInfo.js");require("../../../../utils/getQueryClient.js");require("../../../../utils/isMobile.js");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const T=require("../../../../client/hooks/useCreateInstapayWithdrawalMutation.js"),D=require("../../../../client/hooks/useGlobalStore.js");require("../../../../client/hooks/useInfiniteQueryHelper.js");const P=require("../../../../client/hooks/useInstapayBankListQuery.js");require("usehooks-ts");const W=require("../../../../client/hooks/usePaymentSettingsQuery.js"),f=require("../../../../client/utils/toaster.js"),z=require("../../../../icons/CheckIcon.js"),w=require("../../../../icons/ChevronDownIcon.js"),L=require("../../../../icons/ChevronUpIcon.js"),R=require("../../../../icons/SpinnerIcon.js");require("../../../../ui/AlertDialog/AlertDialog.js");require("../../../../ui/Avatar/Avatar.js");require("../../../../ui/Badge/Badge.js");const V=require("../../../../ui/Button/Button.js");require("../../../../ui/Checkbox/Checkbox.js");require("../../../../ui/Clipboard/Clipboard.js");require("../../../../ui/DatePicker/DatePicker.js");require("../../../../ui/Dialog/Dialog.js");require("../../../../ui/Drawer/Drawer.js");const o=require("../../../../ui/Field/Field.js");require("../../../../ui/IconButton/iconButton.recipe.js");const m=require("../../../../ui/NumberInput/NumberInput.js");require("../../../../ui/PinInput/PinInput.js");require("../../../../ui/Popover/Popover.js");require("tailwind-merge");require("../../../../ui/SegmentGroup/SegmentGroup.js");const s=require("../../../../ui/Select/Select.js");require("../../../../ui/Table/Table.js");require("../../../../ui/Tabs/Tabs.js");const B=require("../../AmountChoices.js");function E(){var g,C;const y=D.useGlobalStore(N.useShallow(r=>({depositWithdrawal:r.depositWithdrawal}))),x=T.useCreateInstapayWithdrawalMutation({onSuccess(){t.reset(),y.depositWithdrawal.setOpen(!1),f.toaster.success({description:"Withdrawal request submitted successfully."})},onError(r){f.toaster.error({description:r.message})}}),a=P.useInstapayBankListQuery().data,p=W.usePaymentSettingsQuery().data,l=p==null?void 0:p.instapayWithdrawalGatewaySettings,u=h.parseDecimal(l==null?void 0:l.minimumAmount,0),d=h.parseDecimal(l==null?void 0:l.maximumAmount,0),I=c.z.object({amount:c.z.string().superRefine((r,i)=>{const n=h.parseDecimal(r,0);n<u&&i.addIssue({type:"number",code:c.z.ZodIssueCode.too_small,inclusive:!0,minimum:u,message:`Minimum amount is ${u.toLocaleString()}`}),n>d&&i.addIssue({type:"number",code:c.z.ZodIssueCode.too_big,inclusive:!0,maximum:d,message:`Maximum amount is ${d.toLocaleString()}`})}),password:c.z.string().min(8,"Password must be 8 or more characters").max(64,"Password must be not be more than 64 characters"),accountNumber:c.z.string().min(1).trim(),bankCode:c.z.string().min(1,"Bank is required").trim()}),t=j.useForm({mode:"all",resolver:k.zodResolver(I),defaultValues:{amount:"0",password:"",accountNumber:"",bankCode:""}});b.useEffect(()=>{u&&t.reset({amount:u.toString(),bankCode:t.getValues("bankCode"),password:"",accountNumber:""})},[t,u]),b.useEffect(()=>{a!=null&&a.length&&t.reset({amount:t.getValues("amount"),bankCode:a[0].code,password:"",accountNumber:""})},[t,a]);const S=t.handleSubmit(async r=>{x.mutate({amount:r.amount,transactionPassword:r.password,accountNumber:r.accountNumber,bankCode:r.bankCode})}),q=b.useMemo(()=>v.createListCollection({items:a??[],itemToValue:r=>r.code,itemToString:r=>r.name}),[a]);return console.log(q.items),e.jsxs("form",{onSubmit:S,noValidate:!0,autoComplete:"off",children:[e.jsx(j.Controller,{control:t.control,name:"bankCode",render:r=>{var i;return e.jsxs(o.Root,{invalid:!!t.formState.errors.bankCode,children:[e.jsxs(s.Root,{collection:q,positioning:{sameWidth:!0},value:r.field.value?[r.field.value]:[],onValueChange:n=>{r.field.onChange(n.value.at(0)??"")},children:[e.jsx(s.Label,{children:"Bank"}),e.jsx(s.Control,{children:e.jsxs(s.Trigger,{children:[e.jsx(s.ValueText,{}),e.jsx(s.Indicator,{asChild:!0,children:e.jsx(w.ChevronDownIcon,{})})]})}),e.jsx(s.Positioner,{children:e.jsx(s.Content,{children:e.jsx(s.ItemGroup,{children:q.items.map(n=>e.jsxs(s.Item,{item:n,children:[e.jsx(s.ItemText,{children:n.name}),e.jsx(s.ItemIndicator,{asChild:!0,children:e.jsx(z.CheckIcon,{})})]},n.id))})})})]}),e.jsx(o.ErrorText,{children:(i=t.formState.errors.bankCode)==null?void 0:i.message})]})}}),e.jsxs(o.Root,{invalid:!!t.formState.errors.accountNumber,className:"mt-3xl",children:[e.jsx(o.Label,{children:"Bank account number"}),e.jsx(o.Input,{...t.register("accountNumber")}),e.jsx(o.ErrorText,{children:(g=t.formState.errors.accountNumber)==null?void 0:g.message})]}),e.jsx(j.Controller,{control:t.control,name:"amount",render:r=>{var i;return e.jsxs(o.Root,{invalid:!!t.formState.errors.amount,className:"mt-3xl",children:[e.jsxs(m.Root,{min:0,step:1,value:r.field.value,onValueChange:n=>{r.field.onChange(n.value)},formatOptions:{maximumFractionDigits:2,minimumFractionDigits:0},allowMouseWheel:!0,children:[e.jsx(m.Label,{children:"Enter amount you want to withdraw"}),e.jsxs(m.Control,{children:[e.jsx(m.Input,{}),e.jsx(m.IncrementTrigger,{children:e.jsx(L.ChevronUpIcon,{})}),e.jsx(m.DecrementTrigger,{children:e.jsx(w.ChevronDownIcon,{})})]})]}),e.jsx(o.ErrorText,{children:(i=t.formState.errors.amount)==null?void 0:i.message})]})}}),e.jsx(B.AmountChoices,{value:h.parseDecimal(t.watch("amount"),0),onChange:r=>{t.setValue("amount",r.toString(),{shouldTouch:!0,shouldDirty:!0,shouldValidate:!0})},min:u,max:d,className:"mt-xl"}),e.jsxs(o.Root,{className:"mt-3xl",invalid:!!t.formState.errors.password,children:[e.jsx(o.Label,{children:"Password"}),e.jsx(o.Input,{type:"password",...t.register("password")}),e.jsx(o.ErrorText,{children:(C=t.formState.errors.password)==null?void 0:C.message})]}),e.jsxs("p",{className:"mt-4xl text-xs",children:["Upon clicking the deposit button, you agree to the"," ",e.jsx("button",{type:"button",className:"underline underline-offset-2",children:"Terms of Use and Privacy Policy"}),"."]}),e.jsx(V.Button,{type:"submit",className:"mt-4.5",disabled:x.isPending,children:x.isPending?e.jsxs(e.Fragment,{children:[e.jsx(R.SpinnerIcon,{}),"Processing..."]}):"Deposit"})]})}exports.InstapayWithdrawal=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),k=require("@ark-ui/react"),N=require("@hookform/resolvers/zod"),b=require("react"),g=require("react-hook-form"),c=require("zod"),T=require("zustand/shallow");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../../../constants/index.js");require("../../../../utils/capitalize.js");const x=require("../../../../utils/parseDecimal.js");require("../../../../utils/getLocaleInfo.js");require("../../../../utils/getQueryClient.js");require("../../../../utils/isMobile.js");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const P=require("../../../../client/hooks/useCreateInstapayWithdrawalMutation.js"),D=require("../../../../client/hooks/useGlobalStore.js");require("../../../../client/hooks/useInfiniteQueryHelper.js");const E=require("../../../../client/hooks/useInstapayBankListQuery.js");require("usehooks-ts");const W=require("../../../../client/hooks/usePaymentSettingsQuery.js"),I=require("../../../../client/utils/toaster.js"),R=require("../../../../icons/CheckIcon.js"),y=require("../../../../icons/ChevronDownIcon.js"),V=require("../../../../icons/ChevronUpIcon.js"),z=require("../../../../icons/EyeIcon.js"),L=require("../../../../icons/EyeOffIcon.js"),B=require("../../../../icons/SpinnerIcon.js");require("../../../../ui/AlertDialog/AlertDialog.js");require("../../../../ui/Avatar/Avatar.js");require("../../../../ui/Badge/Badge.js");const M=require("../../../../ui/Button/Button.js");require("../../../../ui/Checkbox/Checkbox.js");require("../../../../ui/Clipboard/Clipboard.js");require("../../../../ui/Collapsible/Collapsible.js");require("../../../../ui/DatePicker/DatePicker.js");require("../../../../ui/Dialog/Dialog.js");require("../../../../ui/Drawer/Drawer.js");const n=require("../../../../ui/Field/Field.js");require("../../../../ui/IconButton/iconButton.recipe.js");const m=require("../../../../ui/NumberInput/NumberInput.js"),d=require("../../../../ui/PasswordInput/PasswordInput.js");require("../../../../ui/PinInput/PinInput.js");require("../../../../ui/Popover/Popover.js");require("tailwind-merge");require("../../../../ui/Progress/Progress.js");require("../../../../ui/SegmentGroup/SegmentGroup.js");const s=require("../../../../ui/Select/Select.js");require("../../../../ui/Table/Table.js");require("../../../../ui/Tabs/Tabs.js");const Q=require("../../AmountChoices.js");function A(){var f,C;const w=D.useGlobalStore(T.useShallow(r=>({depositWithdrawal:r.depositWithdrawal}))),q=P.useCreateInstapayWithdrawalMutation({onSuccess(){t.reset(),w.depositWithdrawal.setOpen(!1),I.toaster.success({description:"Withdrawal request submitted successfully."})},onError(r){I.toaster.error({description:r.message})}}),a=E.useInstapayBankListQuery().data,p=W.usePaymentSettingsQuery().data,l=p==null?void 0:p.instapayWithdrawalGatewaySettings,u=x.parseDecimal(l==null?void 0:l.minimumAmount,0),h=x.parseDecimal(l==null?void 0:l.maximumAmount,0),S=c.z.object({amount:c.z.string().superRefine((r,i)=>{const o=x.parseDecimal(r,0);o<u&&i.addIssue({type:"number",code:c.z.ZodIssueCode.too_small,inclusive:!0,minimum:u,message:`Minimum amount is ${u.toLocaleString()}`}),o>h&&i.addIssue({type:"number",code:c.z.ZodIssueCode.too_big,inclusive:!0,maximum:h,message:`Maximum amount is ${h.toLocaleString()}`})}),password:c.z.string().min(8,"Password must be 8 or more characters").max(64,"Password must be not be more than 64 characters"),accountNumber:c.z.string().min(1).trim(),bankCode:c.z.string().min(1,"Bank is required").trim()}),t=g.useForm({mode:"all",resolver:N.zodResolver(S),defaultValues:{amount:"0",password:"",accountNumber:"",bankCode:""}});b.useEffect(()=>{u&&t.reset({amount:u.toString(),bankCode:t.getValues("bankCode"),password:"",accountNumber:""})},[t,u]),b.useEffect(()=>{a!=null&&a.length&&t.reset({amount:t.getValues("amount"),bankCode:a[0].code,password:"",accountNumber:""})},[t,a]);const v=t.handleSubmit(async r=>{q.mutate({amount:r.amount,transactionPassword:r.password,accountNumber:r.accountNumber,bankCode:r.bankCode})}),j=b.useMemo(()=>k.createListCollection({items:a??[],itemToValue:r=>r.code,itemToString:r=>r.name}),[a]);return console.log(j.items),e.jsxs("form",{onSubmit:v,noValidate:!0,autoComplete:"off",children:[e.jsx(g.Controller,{control:t.control,name:"bankCode",render:r=>{var i;return e.jsxs(n.Root,{invalid:!!t.formState.errors.bankCode,children:[e.jsxs(s.Root,{collection:j,positioning:{sameWidth:!0},value:r.field.value?[r.field.value]:[],onValueChange:o=>{r.field.onChange(o.value.at(0)??"")},children:[e.jsx(s.Label,{children:"Bank"}),e.jsx(s.Control,{children:e.jsxs(s.Trigger,{children:[e.jsx(s.ValueText,{}),e.jsx(s.Indicator,{asChild:!0,children:e.jsx(y.ChevronDownIcon,{})})]})}),e.jsx(s.Positioner,{children:e.jsx(s.Content,{children:e.jsx(s.ItemGroup,{children:j.items.map(o=>e.jsxs(s.Item,{item:o,children:[e.jsx(s.ItemText,{children:o.name}),e.jsx(s.ItemIndicator,{asChild:!0,children:e.jsx(R.CheckIcon,{})})]},o.id))})})})]}),e.jsx(n.ErrorText,{children:(i=t.formState.errors.bankCode)==null?void 0:i.message})]})}}),e.jsxs(n.Root,{invalid:!!t.formState.errors.accountNumber,className:"mt-3xl",children:[e.jsx(n.Label,{children:"Bank account number"}),e.jsx(n.Input,{...t.register("accountNumber")}),e.jsx(n.ErrorText,{children:(f=t.formState.errors.accountNumber)==null?void 0:f.message})]}),e.jsx(g.Controller,{control:t.control,name:"amount",render:r=>{var i;return e.jsxs(n.Root,{invalid:!!t.formState.errors.amount,className:"mt-3xl",children:[e.jsxs(m.Root,{min:0,step:1,value:r.field.value,onValueChange:o=>{r.field.onChange(o.value)},formatOptions:{maximumFractionDigits:2,minimumFractionDigits:0},allowMouseWheel:!0,children:[e.jsx(m.Label,{children:"Enter amount you want to withdraw"}),e.jsxs(m.Control,{children:[e.jsx(m.Input,{}),e.jsx(m.IncrementTrigger,{children:e.jsx(V.ChevronUpIcon,{})}),e.jsx(m.DecrementTrigger,{children:e.jsx(y.ChevronDownIcon,{})})]})]}),e.jsx(n.ErrorText,{children:(i=t.formState.errors.amount)==null?void 0:i.message})]})}}),e.jsx(Q.AmountChoices,{value:x.parseDecimal(t.watch("amount"),0),onChange:r=>{t.setValue("amount",r.toString(),{shouldTouch:!0,shouldDirty:!0,shouldValidate:!0})},min:u,max:h,className:"mt-xl"}),e.jsxs(n.Root,{className:"mt-3xl",invalid:!!t.formState.errors.password,children:[e.jsxs(d.Root,{children:[e.jsx(d.Label,{children:"Password"}),e.jsxs(d.Control,{children:[e.jsx(d.Input,{...t.register("password")}),e.jsx(d.VisibilityTrigger,{children:e.jsx(d.Indicator,{fallback:e.jsx(L.EyeOffIcon,{}),asChild:!0,children:e.jsx(z.EyeIcon,{})})})]})]}),e.jsx(n.ErrorText,{children:(C=t.formState.errors.password)==null?void 0:C.message})]}),e.jsxs("p",{className:"mt-4xl text-xs",children:["Upon clicking the deposit button, you agree to the"," ",e.jsx("button",{type:"button",className:"underline underline-offset-2",children:"Terms of Use and Privacy Policy"}),"."]}),e.jsx(M.Button,{type:"submit",className:"mt-4.5",disabled:q.isPending,children:q.isPending?e.jsxs(e.Fragment,{children:[e.jsx(B.SpinnerIcon,{}),"Processing..."]}):"Deposit"})]})}exports.InstapayWithdrawal=A;