@opexa/portal-components 0.0.706 → 0.0.708

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 (241) hide show
  1. package/dist/components/DepositWithdrawal/Deposit/AiOGCashDeposit/AiOGCashDeposit.js +3 -4
  2. package/dist/components/DepositWithdrawal/Deposit/AiOGrabPayDeposit/AiOGrabPayDeposit.js +3 -4
  3. package/dist/components/DepositWithdrawal/Deposit/AiOPalawanPayDeposit/AiOPalawanPayDeposit.js +3 -4
  4. package/dist/components/DepositWithdrawal/Deposit/AiOPayMayaDeposit/AiOPayMayaDeposit.js +3 -4
  5. package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +2 -3
  6. package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit/GCashWebpayDeposit.js +2 -3
  7. package/dist/components/DepositWithdrawal/Deposit/LibanganDeposit/LibanganDeposit.js +2 -3
  8. package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +2 -3
  9. package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +2 -3
  10. package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.js +2 -3
  11. package/dist/components/DepositWithdrawal/Withdrawal/GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.d.ts +1 -0
  12. package/dist/components/DepositWithdrawal/Withdrawal/GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.js +141 -0
  13. package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +5 -29
  14. package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +10 -1
  15. package/dist/components/DepositWithdrawal/utils.d.ts +1 -1
  16. package/dist/components/DepositWithdrawal/utils.js +1 -0
  17. package/dist/components/Jackpots/Jackpots.module.css +184 -184
  18. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  19. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  20. package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
  21. package/dist/components/KYC/KYCVerificationStatus.lazy.js +7 -13
  22. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  23. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  24. package/dist/services/queries.d.ts +1 -1
  25. package/dist/services/queries.js +2994 -2991
  26. package/dist/styles/theme.css +773 -773
  27. package/dist/types/index.d.ts +1 -0
  28. package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
  29. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
  30. package/dist/ui/Badge/Badge.d.ts +12 -12
  31. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  32. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  33. package/dist/ui/Carousel/Carousel.d.ts +72 -72
  34. package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
  35. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  36. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  37. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  38. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  39. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  40. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  41. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  42. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  43. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  44. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  45. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  46. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  47. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  48. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  49. package/dist/ui/Field/Field.d.ts +21 -21
  50. package/dist/ui/Field/field.recipe.d.ts +3 -3
  51. package/dist/ui/Menu/Menu.d.ts +198 -198
  52. package/dist/ui/Menu/menu.recipe.d.ts +11 -11
  53. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  54. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  55. package/dist/ui/Popover/Popover.d.ts +88 -88
  56. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  57. package/dist/ui/Progress/Progress.d.ts +27 -27
  58. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  59. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  60. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  61. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  62. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  63. package/dist/ui/Select/Select.d.ts +45 -45
  64. package/dist/ui/Select/select.recipe.d.ts +3 -3
  65. package/dist/ui/Table/Table.d.ts +21 -21
  66. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  67. package/dist/ui/Table/table.recipe.d.ts +3 -3
  68. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  69. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  70. package/package.json +176 -176
  71. package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
  72. package/dist/components/DigitainLauncher/Loading.js +0 -5
  73. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
  74. package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
  75. package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
  76. package/dist/components/Disclaimer/TermsOfUse.js +0 -13
  77. package/dist/components/FeatureFlag/FeatureFlag.d.ts +0 -1
  78. package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
  79. package/dist/components/FeatureFlag/index.d.ts +0 -1
  80. package/dist/components/FeatureFlag/index.js +0 -1
  81. package/dist/components/KYC/AutoOpen.d.ts +0 -1
  82. package/dist/components/KYC/AutoOpen.js +0 -40
  83. package/dist/components/KYC/BasicInformation.d.ts +0 -1
  84. package/dist/components/KYC/BasicInformation.js +0 -101
  85. package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
  86. package/dist/components/KYC/CaptureIdDocument.js +0 -219
  87. package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
  88. package/dist/components/KYC/CaptureSelfie.js +0 -285
  89. package/dist/components/KYC/DisplayImage.d.ts +0 -5
  90. package/dist/components/KYC/DisplayImage.js +0 -8
  91. package/dist/components/KYC/FileUpload.d.ts +0 -10
  92. package/dist/components/KYC/FileUpload.js +0 -72
  93. package/dist/components/KYC/IdentityVerification.d.ts +0 -1
  94. package/dist/components/KYC/IdentityVerification.js +0 -120
  95. package/dist/components/KYC/Indicator.d.ts +0 -1
  96. package/dist/components/KYC/Indicator.js +0 -8
  97. package/dist/components/KYC/KYC.lazy.d.ts +0 -6
  98. package/dist/components/KYC/KYC.lazy.js +0 -45
  99. package/dist/components/KYC/KYCContext.d.ts +0 -6
  100. package/dist/components/KYC/KYCContext.js +0 -2
  101. package/dist/components/KYC/NoCameraError.d.ts +0 -7
  102. package/dist/components/KYC/NoCameraError.js +0 -6
  103. package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
  104. package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
  105. package/dist/components/KYC/PersonalInformation.d.ts +0 -1
  106. package/dist/components/KYC/PersonalInformation.js +0 -122
  107. package/dist/components/KYC/backup/Header.d.ts +0 -1
  108. package/dist/components/KYC/backup/Header.js +0 -8
  109. package/dist/components/KYC/backup/Indicator.d.ts +0 -1
  110. package/dist/components/KYC/backup/Indicator.js +0 -9
  111. package/dist/components/KYC/backup/KYC.d.ts +0 -1
  112. package/dist/components/KYC/backup/KYC.js +0 -14
  113. package/dist/components/KYC/backup/KYC.lazy.d.ts +0 -1
  114. package/dist/components/KYC/backup/KYC.lazy.js +0 -26
  115. package/dist/components/KYC/backup/KYCContext.d.ts +0 -6
  116. package/dist/components/KYC/backup/KYCContext.js +0 -2
  117. package/dist/components/KYC/backup/Step1.d.ts +0 -1
  118. package/dist/components/KYC/backup/Step1.js +0 -13
  119. package/dist/components/KYC/backup/Step2.d.ts +0 -1
  120. package/dist/components/KYC/backup/Step2.js +0 -13
  121. package/dist/components/KYC/backup/Step3.d.ts +0 -1
  122. package/dist/components/KYC/backup/Step3.js +0 -13
  123. package/dist/components/KYC/backup/Step4.d.ts +0 -1
  124. package/dist/components/KYC/backup/Step4.js +0 -7
  125. package/dist/components/KYC/backup/useKYC.d.ts +0 -10
  126. package/dist/components/KYC/backup/useKYC.js +0 -8
  127. package/dist/components/KYC/loadModels.d.ts +0 -1
  128. package/dist/components/KYC/loadModels.js +0 -9
  129. package/dist/components/KYC/useKYC.d.ts +0 -25
  130. package/dist/components/KYC/useKYC.js +0 -38
  131. package/dist/components/KYC/utils.d.ts +0 -9
  132. package/dist/components/KYC/utils.js +0 -79
  133. package/dist/components/Messages/Message.d.ts +0 -1
  134. package/dist/components/Messages/Message.js +0 -35
  135. package/dist/components/Messages/MessageContext.d.ts +0 -6
  136. package/dist/components/Messages/MessageContext.js +0 -2
  137. package/dist/components/Messages/MessagePopup.d.ts +0 -1
  138. package/dist/components/Messages/MessagePopup.js +0 -20
  139. package/dist/components/Messages/MessageTrigger.d.ts +0 -8
  140. package/dist/components/Messages/MessageTrigger.js +0 -19
  141. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
  142. package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
  143. package/dist/components/Quests/CountdownTimer.d.ts +0 -15
  144. package/dist/components/Quests/CountdownTimer.js +0 -33
  145. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
  146. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -78
  147. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
  148. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
  149. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
  150. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
  151. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
  152. package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
  153. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
  154. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
  155. package/dist/components/SignIn/utils.d.ts +0 -8
  156. package/dist/components/SignIn/utils.js +0 -26
  157. package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
  158. package/dist/components/SignUp/SignUp.lazy.js +0 -18
  159. package/dist/components/SignUp/SignUpContext.d.ts +0 -6
  160. package/dist/components/SignUp/SignUpContext.js +0 -2
  161. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
  162. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
  163. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
  164. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
  165. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
  166. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
  167. package/dist/components/SignUp/SignUpForm.d.ts +0 -1
  168. package/dist/components/SignUp/SignUpForm.js +0 -284
  169. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
  170. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
  171. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
  172. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
  173. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
  174. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
  175. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
  176. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
  177. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
  178. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
  179. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
  180. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
  181. package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
  182. package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
  183. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
  184. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
  185. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
  186. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
  187. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
  188. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
  189. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
  190. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
  191. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
  192. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
  193. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
  194. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
  195. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
  196. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
  197. package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
  198. package/dist/components/shared/IdDocumentField.client.js +0 -204
  199. package/dist/components/shared/IdDocumentField.d.ts +0 -2
  200. package/dist/components/shared/IdDocumentField.js +0 -11
  201. package/dist/components/shared/SelfieField.client.d.ts +0 -20
  202. package/dist/components/shared/SelfieField.client.js +0 -327
  203. package/dist/components/shared/SelfieField.d.ts +0 -2
  204. package/dist/components/shared/SelfieField.js +0 -11
  205. package/dist/constants/BranchCode.d.ts +0 -4
  206. package/dist/constants/BranchCode.js +0 -42
  207. package/dist/constants/Branches.d.ts +0 -2
  208. package/dist/constants/Branches.js +0 -42
  209. package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
  210. package/dist/handlers/postTransformIdFrontImage.js +0 -67
  211. package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
  212. package/dist/handlers/postTransformSelfieImage.js +0 -71
  213. package/dist/handlers.d.ts +0 -43
  214. package/dist/handlers.js +0 -297
  215. package/dist/icons/BellRingIcon.d.ts +0 -2
  216. package/dist/icons/BellRingIcon.js +0 -4
  217. package/dist/images/responsible-gaming-yellow.png +0 -0
  218. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  219. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  220. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  221. package/dist/third-parties/FacebookPixel/api.js +0 -1
  222. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  223. package/dist/third-parties/FacebookPixel/index.js +0 -1
  224. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  225. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  226. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  227. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  228. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  229. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  230. package/dist/third-parties/index.d.ts +0 -2
  231. package/dist/third-parties/index.js +0 -2
  232. package/dist/utils/dataUrlToBlob.d.ts +0 -1
  233. package/dist/utils/dataUrlToBlob.js +0 -11
  234. package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
  235. package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
  236. package/dist/utils/getGameName.d.ts +0 -1
  237. package/dist/utils/getGameName.js +0 -6
  238. package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
  239. package/dist/utils/isBetween3amAnd3pm.js +0 -5
  240. package/dist/utils/resizeImageSize.d.ts +0 -2
  241. package/dist/utils/resizeImageSize.js +0 -11
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
3
  import Link from 'next/link';
4
4
  import { useEffect, useState } from 'react';
@@ -6,6 +6,7 @@ import { Controller, useForm } from 'react-hook-form';
6
6
  import invariant from 'tiny-invariant';
7
7
  import { z } from 'zod';
8
8
  import { useShallow } from 'zustand/shallow';
9
+ import { useCreateAiOGCashDepositMutation } from '../../../../client/hooks/useAiOGCashDepositMutation.js';
9
10
  import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePromosQuery.js';
10
11
  import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
11
12
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
@@ -27,7 +28,6 @@ import { parseDecimal } from '../../../../utils/parseDecimal.js';
27
28
  import { AmountChoices } from '../../AmountChoices.js';
28
29
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
29
30
  import { AvailablePromos } from '../AvailablePromos.js';
30
- import { useCreateAiOGCashDepositMutation } from '../../../../client/hooks/useAiOGCashDepositMutation.js';
31
31
  export function AiOGCashDeposit() {
32
32
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
33
33
  const disclosure = useDisclosure();
@@ -182,8 +182,7 @@ export function AiOGCashDeposit() {
182
182
  }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
183
183
  disclosure.setOpen(details.open);
184
184
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
185
- "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
186
- 'Your deposit has been successfully processed.', status === 'failed' &&
185
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
187
186
  'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
188
187
  api.setOpen(false);
189
188
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
3
  import Link from 'next/link';
4
4
  import { useEffect, useState } from 'react';
@@ -6,6 +6,7 @@ import { Controller, useForm } from 'react-hook-form';
6
6
  import invariant from 'tiny-invariant';
7
7
  import { z } from 'zod';
8
8
  import { useShallow } from 'zustand/shallow';
9
+ import { useCreateAiOGrabPayDepositMutation } from '../../../../client/hooks/useAiOGrabPayDepositMutation.js';
9
10
  import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePromosQuery.js';
10
11
  import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
11
12
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
@@ -27,7 +28,6 @@ import { parseDecimal } from '../../../../utils/parseDecimal.js';
27
28
  import { AmountChoices } from '../../AmountChoices.js';
28
29
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
29
30
  import { AvailablePromos } from '../AvailablePromos.js';
30
- import { useCreateAiOGrabPayDepositMutation } from '../../../../client/hooks/useAiOGrabPayDepositMutation.js';
31
31
  export function AiOGrabPayDeposit() {
32
32
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
33
33
  const disclosure = useDisclosure();
@@ -182,8 +182,7 @@ export function AiOGrabPayDeposit() {
182
182
  }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
183
183
  disclosure.setOpen(details.open);
184
184
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
185
- "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
186
- 'Your deposit has been successfully processed.', status === 'failed' &&
185
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
187
186
  'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
188
187
  api.setOpen(false);
189
188
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
3
  import Link from 'next/link';
4
4
  import { useEffect, useState } from 'react';
@@ -6,6 +6,7 @@ import { Controller, useForm } from 'react-hook-form';
6
6
  import invariant from 'tiny-invariant';
7
7
  import { z } from 'zod';
8
8
  import { useShallow } from 'zustand/shallow';
9
+ import { useCreateAiOPalawanPayDepositMutation } from '../../../../client/hooks/useAiOPalawanPayDepositMutation.js';
9
10
  import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePromosQuery.js';
10
11
  import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
11
12
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
@@ -27,7 +28,6 @@ import { parseDecimal } from '../../../../utils/parseDecimal.js';
27
28
  import { AmountChoices } from '../../AmountChoices.js';
28
29
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
29
30
  import { AvailablePromos } from '../AvailablePromos.js';
30
- import { useCreateAiOPalawanPayDepositMutation } from '../../../../client/hooks/useAiOPalawanPayDepositMutation.js';
31
31
  export function AiOPalawanPayDeposit() {
32
32
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
33
33
  const disclosure = useDisclosure();
@@ -182,8 +182,7 @@ export function AiOPalawanPayDeposit() {
182
182
  }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
183
183
  disclosure.setOpen(details.open);
184
184
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
185
- "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
186
- 'Your deposit has been successfully processed.', status === 'failed' &&
185
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
187
186
  'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
188
187
  api.setOpen(false);
189
188
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
3
  import Link from 'next/link';
4
4
  import { useEffect, useState } from 'react';
@@ -6,6 +6,7 @@ import { Controller, useForm } from 'react-hook-form';
6
6
  import invariant from 'tiny-invariant';
7
7
  import { z } from 'zod';
8
8
  import { useShallow } from 'zustand/shallow';
9
+ import { useCreateAiOPayMayaDepositMutation } from '../../../../client/hooks/useAiOPayMayaDepositMutation.js';
9
10
  import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePromosQuery.js';
10
11
  import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
11
12
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
@@ -27,7 +28,6 @@ import { parseDecimal } from '../../../../utils/parseDecimal.js';
27
28
  import { AmountChoices } from '../../AmountChoices.js';
28
29
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
29
30
  import { AvailablePromos } from '../AvailablePromos.js';
30
- import { useCreateAiOPayMayaDepositMutation } from '../../../../client/hooks/useAiOPayMayaDepositMutation.js';
31
31
  export function AiOPayMayaDeposit() {
32
32
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
33
33
  const disclosure = useDisclosure();
@@ -182,8 +182,7 @@ export function AiOPayMayaDeposit() {
182
182
  }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
183
183
  disclosure.setOpen(details.open);
184
184
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
185
- "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
186
- 'Your deposit has been successfully processed.', status === 'failed' &&
185
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
187
186
  'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
188
187
  api.setOpen(false);
189
188
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
3
  import Link from 'next/link';
4
4
  import { useEffect, useState } from 'react';
@@ -181,8 +181,7 @@ export function GCashDeposit() {
181
181
  }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
182
182
  disclosure.setOpen(details.open);
183
183
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
184
- "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
185
- 'Your deposit has been successfully processed.', status === 'failed' &&
184
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
186
185
  'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
187
186
  api.setOpen(false);
188
187
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
3
  import Link from 'next/link';
4
4
  import { useEffect, useState } from 'react';
@@ -183,8 +183,7 @@ export function GCashWebpayDeposit() {
183
183
  }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
184
184
  disclosure.setOpen(details.open);
185
185
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
186
- "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
187
- 'Your deposit has been successfully processed.', status === 'failed' &&
186
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
188
187
  'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
189
188
  api.setOpen(false);
190
189
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
3
  import Link from 'next/link';
4
4
  import { useEffect, useState } from 'react';
@@ -182,8 +182,7 @@ export function LibanganDeposit() {
182
182
  }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
183
183
  disclosure.setOpen(details.open);
184
184
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
185
- "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
186
- 'Your deposit has been successfully processed.', status === 'failed' &&
185
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
187
186
  'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
188
187
  api.setOpen(false);
189
188
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
3
  import Link from 'next/link';
4
4
  import { useEffect, useState } from 'react';
@@ -153,8 +153,7 @@ export function MayaAppDeposit() {
153
153
  setStatus('waiting');
154
154
  }
155
155
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { disabled: status === 'processing', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
156
- "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
157
- 'Your deposit has been successfully processed.', status === 'failed' &&
156
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
158
157
  'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
159
158
  api.setOpen(false);
160
159
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
3
  import Link from 'next/link';
4
4
  import { useEffect, useState } from 'react';
@@ -181,8 +181,7 @@ export function MayaDeposit() {
181
181
  }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
182
182
  disclosure.setOpen(details.open);
183
183
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
184
- "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
185
- 'Your deposit has been successfully processed.', status === 'failed' &&
184
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
186
185
  'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
187
186
  api.setOpen(false);
188
187
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { zodResolver } from '@hookform/resolvers/zod';
3
3
  import { ObjectId } from '@opexa/object-id';
4
4
  import Link from 'next/link';
@@ -190,8 +190,7 @@ export function PisoPayDeposit() {
190
190
  }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
191
191
  disclosure.setOpen(details.open);
192
192
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
193
- "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
194
- 'Your deposit has been successfully processed.', status === 'failed' &&
193
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
195
194
  'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
196
195
  api.setOpen(false);
197
196
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
@@ -0,0 +1 @@
1
+ export declare function GCashStandardCashInWithdrawal(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,141 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { zodResolver } from '@hookform/resolvers/zod';
3
+ import Link from 'next/link';
4
+ import { useEffect, useState } from 'react';
5
+ import { Controller, useForm } from 'react-hook-form';
6
+ import { z } from 'zod';
7
+ import { useShallow } from 'zustand/shallow';
8
+ import { useCreateGCashStandardCashInWithdrawalMutation } from '../../../../client/hooks/useCreateGCashStandardCashInWithdrawal.js';
9
+ import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
10
+ import { useLocaleInfo } from '../../../../client/hooks/useLocaleInfo.js';
11
+ import { useMobileNumberParser } from '../../../../client/hooks/useMobileNumberParser.js';
12
+ import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
13
+ import { useWalletQuery } from '../../../../client/hooks/useWalletQuery.js';
14
+ import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
15
+ import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
16
+ import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
17
+ import { EyeIcon } from '../../../../icons/EyeIcon.js';
18
+ import { EyeOffIcon } from '../../../../icons/EyeOffIcon.js';
19
+ import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
20
+ import { XIcon } from '../../../../icons/XIcon.js';
21
+ import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
22
+ import { Button } from '../../../../ui/Button/index.js';
23
+ import { Field } from '../../../../ui/Field/index.js';
24
+ import { NumberInput } from '../../../../ui/NumberInput/index.js';
25
+ import { PasswordInput } from '../../../../ui/PasswordInput/index.js';
26
+ import { Portal } from '../../../../ui/Portal/index.js';
27
+ import { parseDecimal } from '../../../../utils/parseDecimal.js';
28
+ import { AmountChoices } from '../../AmountChoices.js';
29
+ import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
30
+ import { explainError } from '../../utils.js';
31
+ import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
32
+ import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
33
+ export function GCashStandardCashInWithdrawal() {
34
+ const depositWithdrawalProps = useDepositWithdrawalPropsContext();
35
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
36
+ depositWithdrawal: ctx.depositWithdrawal,
37
+ hasPendingBonus: ctx.pendingBonus,
38
+ })));
39
+ const [status, setStatus] = useState('waiting');
40
+ const localeInfo = useLocaleInfo();
41
+ const mobileNumberParser = useMobileNumberParser();
42
+ const walletQuery = useWalletQuery();
43
+ const turnoverRequirement = parseDecimal(walletQuery.data?.turnoverRequirement, 0);
44
+ const createWithdrawalMutation = useCreateGCashStandardCashInWithdrawalMutation({
45
+ onMutate() {
46
+ setStatus('processing');
47
+ },
48
+ onSuccess() {
49
+ setStatus('success');
50
+ form.reset();
51
+ },
52
+ onError() {
53
+ setStatus('failed');
54
+ },
55
+ });
56
+ const paymentSettingsQuery = usePaymentSettingsQuery();
57
+ const paymentSettings = paymentSettingsQuery.data;
58
+ const gatewaySettings = paymentSettings?.gcashWithdrawalGatewaySettings;
59
+ const minimumAmount = parseDecimal(gatewaySettings?.minimumAmount, 0);
60
+ const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
61
+ const definition = z.object({
62
+ amount: z.string().superRefine((val, ctx) => {
63
+ const n = parseDecimal(val, 0);
64
+ if (n < minimumAmount) {
65
+ ctx.addIssue({
66
+ type: 'number',
67
+ code: z.ZodIssueCode.too_small,
68
+ inclusive: true,
69
+ minimum: minimumAmount,
70
+ message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
71
+ });
72
+ }
73
+ if (n > maximumAmount) {
74
+ ctx.addIssue({
75
+ type: 'number',
76
+ code: z.ZodIssueCode.too_big,
77
+ inclusive: true,
78
+ maximum: maximumAmount,
79
+ message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
80
+ });
81
+ }
82
+ }),
83
+ password: z
84
+ .string()
85
+ .min(8, 'Password must be 8 or more characters')
86
+ .max(64, 'Password must be not be more than 64 characters'),
87
+ mobileNumber: z
88
+ .string()
89
+ .regex(localeInfo.mobileNumber.pattern, 'Invalid mobile number'),
90
+ });
91
+ const form = useForm({
92
+ mode: 'all',
93
+ resolver: zodResolver(definition),
94
+ defaultValues: {
95
+ amount: '0',
96
+ password: '',
97
+ mobileNumber: '',
98
+ },
99
+ });
100
+ useEffect(() => {
101
+ if (minimumAmount) {
102
+ form.reset({
103
+ amount: minimumAmount.toString(),
104
+ password: '',
105
+ mobileNumber: '',
106
+ });
107
+ }
108
+ }, [form, minimumAmount]);
109
+ const handleSubmit = form.handleSubmit(async (data) => {
110
+ if (globalStore.hasPendingBonus.shouldShowWarning) {
111
+ globalStore.hasPendingBonus.setOpen(true);
112
+ return;
113
+ }
114
+ createWithdrawalMutation.mutate({
115
+ amount: data.amount,
116
+ recipientMobileNumber: mobileNumberParser.format(data.mobileNumber),
117
+ transactionPassword: data.password,
118
+ });
119
+ });
120
+ return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.mobileNumber, children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsx(localeInfo.country.flag, { className: "-translate-y-1/2 pointer-events-none absolute top-1/2 left-3.5 size-5" }), _jsx(Field.Input, { className: "pl-10.5", ...form.register('mobileNumber') })] }), _jsx(Field.ErrorText, { children: form.formState.errors.mobileNumber?.message })] }), _jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
121
+ o.field.onChange(details.value);
122
+ }, formatOptions: {
123
+ maximumFractionDigits: 2,
124
+ minimumFractionDigits: 0,
125
+ }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to withdraw" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
126
+ form.setValue('amount', value.toString(), {
127
+ shouldTouch: true,
128
+ shouldDirty: true,
129
+ shouldValidate: true,
130
+ });
131
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
132
+ if (!details.open) {
133
+ setStatus('waiting');
134
+ }
135
+ }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { disabled: status === 'processing', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Withdraw', status === 'success' && 'Withdrawal Submitted', status === 'failed' && 'Withdraw Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
136
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
137
+ 'Your withdrawal request has been submitted successfully and is awaiting confirmation. You won’t have to wait long — once approved, the funds will be credited to your account.', status === 'failed' &&
138
+ explainError(createWithdrawalMutation.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
139
+ api.setOpen(false);
140
+ }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
141
+ }
@@ -5,9 +5,7 @@ import { useEffect, useState } from 'react';
5
5
  import { Controller, useForm } from 'react-hook-form';
6
6
  import { z } from 'zod';
7
7
  import { useShallow } from 'zustand/shallow';
8
- import { useCreateGCashStandardCashInWithdrawalMutation } from '../../../../client/hooks/useCreateGCashStandardCashInWithdrawal.js';
9
8
  import { useCreateGCashWithdrawalMutation } from '../../../../client/hooks/useCreateGCashWithdrawalMutation.js';
10
- import { useFeatureFlag } from '../../../../client/hooks/useFeatureFlag.js';
11
9
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
12
10
  import { useLocaleInfo } from '../../../../client/hooks/useLocaleInfo.js';
13
11
  import { useMobileNumberParser } from '../../../../client/hooks/useMobileNumberParser.js';
@@ -34,7 +32,6 @@ import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
34
32
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
35
33
  export function GCashWithdrawal() {
36
34
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
37
- const featureFlag = useFeatureFlag();
38
35
  const globalStore = useGlobalStore(useShallow((ctx) => ({
39
36
  depositWithdrawal: ctx.depositWithdrawal,
40
37
  hasPendingBonus: ctx.pendingBonus,
@@ -44,18 +41,6 @@ export function GCashWithdrawal() {
44
41
  const mobileNumberParser = useMobileNumberParser();
45
42
  const walletQuery = useWalletQuery();
46
43
  const turnoverRequirement = parseDecimal(walletQuery.data?.turnoverRequirement, 0);
47
- const createWithdrawalMutationNext = useCreateGCashStandardCashInWithdrawalMutation({
48
- onMutate() {
49
- setStatus('processing');
50
- },
51
- onSuccess() {
52
- setStatus('success');
53
- form.reset();
54
- },
55
- onError() {
56
- setStatus('failed');
57
- },
58
- });
59
44
  const createWithdrawalMutation = useCreateGCashWithdrawalMutation({
60
45
  onMutate() {
61
46
  setStatus('processing');
@@ -126,20 +111,11 @@ export function GCashWithdrawal() {
126
111
  globalStore.hasPendingBonus.setOpen(true);
127
112
  return;
128
113
  }
129
- if (featureFlag.enabled) {
130
- createWithdrawalMutationNext.mutate({
131
- amount: data.amount,
132
- recipientMobileNumber: mobileNumberParser.format(data.mobileNumber),
133
- transactionPassword: data.password,
134
- });
135
- }
136
- if (!featureFlag.enabled) {
137
- createWithdrawalMutation.mutate({
138
- amount: data.amount,
139
- recipientMobileNumber: mobileNumberParser.format(data.mobileNumber),
140
- transactionPassword: data.password,
141
- });
142
- }
114
+ createWithdrawalMutation.mutate({
115
+ amount: data.amount,
116
+ recipientMobileNumber: mobileNumberParser.format(data.mobileNumber),
117
+ transactionPassword: data.password,
118
+ });
143
119
  });
144
120
  return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.mobileNumber, children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsx(localeInfo.country.flag, { className: "-translate-y-1/2 pointer-events-none absolute top-1/2 left-3.5 size-5" }), _jsx(Field.Input, { className: "pl-10.5", ...form.register('mobileNumber') })] }), _jsx(Field.ErrorText, { children: form.formState.errors.mobileNumber?.message })] }), _jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
145
121
  o.field.onChange(details.value);
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
3
  import { useShallow } from 'zustand/shallow';
4
+ import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
4
5
  import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
5
6
  import { useIsMayaSessionValidQuery } from '../../../client/hooks/useIsMayaSessionValidQuery.js';
6
7
  import { useMayaAuth } from '../../../client/hooks/useMayaAuth.js';
@@ -14,6 +15,7 @@ import { onMobileDevice } from '../../../utils/onMobileDevice.js';
14
15
  import { parseDecimal } from '../../../utils/parseDecimal.js';
15
16
  import { useDepositWithdrawalPropsContext } from '../DepositWithdrawalContext.js';
16
17
  import { PaymentMethods } from '../PaymentMethods.js';
18
+ import { GCashStandardCashInWithdrawal } from './GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.js';
17
19
  import { GCashWithdrawal } from './GCashWithdrawal/GCashWithdrawal.js';
18
20
  import { InstapayWithdrawal } from './InstapayWithdrawal/InstapayWithdrawal.js';
19
21
  import { MayaAppWithdrawal } from './MayaAppWithdrawal/MayaAppWithdrawal.js';
@@ -24,6 +26,7 @@ export function Withdrawal() {
24
26
  const { onMaya } = useMayaAuth();
25
27
  const { allowUnverifiedAccounts } = useDepositWithdrawalPropsContext();
26
28
  const walletQuery = useWalletQuery();
29
+ const featureFlag = useFeatureFlag();
27
30
  const wallet = walletQuery.data;
28
31
  const paymentSettingsQuery = usePaymentSettingsQuery();
29
32
  const paymentSettings = paymentSettingsQuery.data;
@@ -64,6 +67,12 @@ export function Withdrawal() {
64
67
  condition: () => paymentSettings?.pisoPayWithdrawalGatewaySettings?.[enabledKey] ||
65
68
  false,
66
69
  },
70
+ {
71
+ method: 'GCASH_STANDARD_CASH_IN',
72
+ condition: () => !featureFlag.enabled
73
+ ? false
74
+ : paymentSettings?.gcashStandardCashInWithdrawalGatewaySettings?.[enabledKey] || false,
75
+ },
67
76
  ];
68
77
  paymentMethods.forEach(({ method, condition }) => {
69
78
  if (condition()) {
@@ -99,7 +108,7 @@ export function Withdrawal() {
99
108
  if (enabledPaymentMethods.length <= 0) {
100
109
  return _jsx(NoAvailablePaymentMethods, {});
101
110
  }
102
- return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'GCASH' && _jsx(GCashWithdrawal, {}), paymentMethod === 'MAYA' && _jsx(MayaWithdrawal, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppWithdrawal, {}), paymentMethod === 'INSTAPAY' && _jsx(InstapayWithdrawal, {}), paymentMethod === 'VENTAJA_DISBURSEMENT' && _jsx(VentajaWithdrawal, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayWithdrawal, {})] }));
111
+ return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'GCASH' && _jsx(GCashWithdrawal, {}), paymentMethod === 'MAYA' && _jsx(MayaWithdrawal, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppWithdrawal, {}), paymentMethod === 'INSTAPAY' && _jsx(InstapayWithdrawal, {}), paymentMethod === 'VENTAJA_DISBURSEMENT' && _jsx(VentajaWithdrawal, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayWithdrawal, {}), paymentMethod === 'GCASH_STANDARD_CASH_IN' && (_jsx(GCashStandardCashInWithdrawal, {}))] }));
103
112
  }
104
113
  function AccountVerificationRequired() {
105
114
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { KnownDepositError, KnownWithdrawalError, WithdrawalError } from '../../types';
3
- export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY", "GCASH_WEBPAY"]>;
3
+ export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "GCASH_STANDARD_CASH_IN", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY", "GCASH_WEBPAY"]>;
4
4
  export type PaymentMethod = z.infer<typeof PaymentMethodDefinition>;
5
5
  export type DepositWithdrawalErrors = KnownDepositError | KnownWithdrawalError | WithdrawalError | string;
6
6
  export declare function explainError(error?: DepositWithdrawalErrors): string;
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export const PaymentMethodDefinition = z.enum([
3
3
  'GCASH',
4
+ 'GCASH_STANDARD_CASH_IN',
4
5
  'MAYA_APP',
5
6
  'MAYA',
6
7
  'ONLINE_BANK',