@opexa/portal-components 0.0.696 → 0.0.698

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 (108) hide show
  1. package/dist/client/hooks/useCreateGCashWebpayDepositMutation.d.ts +4 -0
  2. package/dist/client/hooks/useCreateGCashWebpayDepositMutation.js +73 -0
  3. package/dist/components/AccountInfo/GoogleDisconnect.d.ts +7 -0
  4. package/dist/components/AccountInfo/GoogleDisconnect.js +11 -0
  5. package/dist/components/DepositWithdrawal/Deposit/Deposit.js +25 -54
  6. package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .d.ts +1 -0
  7. package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .js +191 -0
  8. package/dist/components/DepositWithdrawal/PaymentMethods.js +31 -9
  9. package/dist/components/DepositWithdrawal/utils.d.ts +1 -3
  10. package/dist/components/DepositWithdrawal/utils.js +1 -3
  11. package/dist/components/DigitainLauncher/Loading.d.ts +1 -0
  12. package/dist/components/DigitainLauncher/Loading.js +5 -0
  13. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarousel.d.ts +23 -0
  14. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarousel.js +1 -1
  15. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.d.ts +24 -1
  16. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +41 -9
  17. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -0
  18. package/dist/components/Jackpots/JackpotsList/JackpotsList.d.ts +22 -0
  19. package/dist/components/Jackpots/JackpotsList/JackpotsList.js +1 -1
  20. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -0
  21. package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.d.ts +24 -1
  22. package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +32 -10
  23. package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.d.ts +24 -1
  24. package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.js +32 -10
  25. package/dist/components/Jackpots/JackpotsList/useJackpotsListItemData.d.ts +1 -0
  26. package/dist/components/Jackpots/JackpotsList/useJackpotsListItemData.js +11 -0
  27. package/dist/components/KYC/BasicInformation.d.ts +1 -0
  28. package/dist/components/KYC/BasicInformation.js +101 -0
  29. package/dist/components/KYC/IdentityVerification.d.ts +1 -0
  30. package/dist/components/KYC/IdentityVerification.js +120 -0
  31. package/dist/components/KYC/Indicator.d.ts +1 -0
  32. package/dist/components/KYC/Indicator.js +8 -0
  33. package/dist/components/KYC/KYC.lazy.d.ts +6 -0
  34. package/dist/components/KYC/KYC.lazy.js +45 -0
  35. package/dist/components/KYC/KYCContext.d.ts +6 -0
  36. package/dist/components/KYC/KYCContext.js +2 -0
  37. package/dist/components/KYC/KYCDefault/BasicInformation.d.ts +1 -0
  38. package/dist/components/KYC/KYCDefault/BasicInformation.js +101 -0
  39. package/dist/components/KYC/KYCVerificationStatus.d.ts +1 -0
  40. package/dist/components/KYC/KYCVerificationStatus.js +10 -0
  41. package/dist/components/KYC/KYCVerificationStatus.lazy.d.ts +1 -0
  42. package/dist/components/KYC/KYCVerificationStatus.lazy.js +33 -0
  43. package/dist/components/KYC/PersonalInformation.d.ts +1 -0
  44. package/dist/components/KYC/PersonalInformation.js +122 -0
  45. package/dist/components/KYC/useKYC.d.ts +25 -0
  46. package/dist/components/KYC/useKYC.js +38 -0
  47. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +1 -0
  48. package/dist/components/PortalProvider/CXDTokenObserver.js +30 -0
  49. package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +1 -0
  50. package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +29 -0
  51. package/dist/components/SessionWatcher/SessionWatcher.d.ts +1 -0
  52. package/dist/components/SessionWatcher/SessionWatcher.js +20 -0
  53. package/dist/components/SessionWatcher/index.d.ts +1 -0
  54. package/dist/components/SessionWatcher/index.js +1 -0
  55. package/dist/icons/LinkBrokenIcon.d.ts +2 -0
  56. package/dist/icons/LinkBrokenIcon.js +4 -0
  57. package/dist/images/responsible-gaming-yellow.png +0 -0
  58. package/dist/services/queries.d.ts +1 -1
  59. package/dist/services/queries.js +3 -0
  60. package/dist/services/wallet.d.ts +2 -0
  61. package/dist/services/wallet.js +4 -4
  62. package/dist/types/index.d.ts +1 -0
  63. package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
  64. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
  65. package/dist/ui/Badge/Badge.d.ts +12 -12
  66. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  67. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  68. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  69. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  70. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  71. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  72. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  73. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  74. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  75. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  76. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  77. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  78. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  79. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  80. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  81. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  82. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  83. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  84. package/dist/ui/Field/Field.d.ts +21 -21
  85. package/dist/ui/Field/field.recipe.d.ts +3 -3
  86. package/dist/ui/Menu/Menu.d.ts +306 -306
  87. package/dist/ui/Menu/menu.recipe.d.ts +17 -17
  88. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  89. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  90. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  91. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  92. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  93. package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
  94. package/dist/ui/Popover/Popover.d.ts +55 -55
  95. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  96. package/dist/ui/Progress/Progress.d.ts +27 -27
  97. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  98. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  99. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  100. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  101. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  102. package/dist/ui/Select/Select.d.ts +45 -45
  103. package/dist/ui/Select/select.recipe.d.ts +3 -3
  104. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  105. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  106. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  107. package/package.json +1 -1
  108. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -0,0 +1,4 @@
1
+ import type { SetOptional } from 'type-fest';
2
+ import { type CreateGCashWebpayDepositInput } from '../../services/wallet';
3
+ import type { Deposit, Mutation } from '../../types';
4
+ export declare const useCreateGCashWebpayDepositMutation: Mutation<Deposit, SetOptional<CreateGCashWebpayDepositInput, 'id'>>;
@@ -0,0 +1,73 @@
1
+ import { ObjectId } from '@opexa/object-id';
2
+ import { useMutation } from '@tanstack/react-query';
3
+ import { clamp } from 'lodash-es';
4
+ import invariant from 'tiny-invariant';
5
+ import { ObjectType } from '../../services/ObjectType.js';
6
+ import { createGCashWebpayDeposit, getDeposit, } from '../../services/wallet.js';
7
+ import { createPoll } from '../../utils/createPoll.js';
8
+ import { getQueryClient } from '../../utils/getQueryClient.js';
9
+ import { getCreateGCashDepositMutationKey } from '../../utils/mutationKeys.js';
10
+ import { parseDecimal } from '../../utils/parseDecimal.js';
11
+ import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
12
+ import { getSession } from '../services/getSession.js';
13
+ export const useCreateGCashWebpayDepositMutation = (config) => {
14
+ const queryClient = getQueryClient();
15
+ const mutation = useMutation({
16
+ ...config,
17
+ mutationKey: getCreateGCashDepositMutationKey(),
18
+ mutationFn: async (input) => {
19
+ const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
20
+ const session = await getSession();
21
+ invariant(session.status === 'authenticated');
22
+ await createGCashWebpayDeposit({ ...input, id }, {
23
+ headers: {
24
+ Authorization: `Bearer ${session.token}`,
25
+ ...(session.domain && {
26
+ Domain: session.domain,
27
+ }),
28
+ },
29
+ });
30
+ const poll = createPoll(async () => {
31
+ const session = await getSession();
32
+ invariant(session.status === 'authenticated');
33
+ return await getDeposit(id, {
34
+ headers: {
35
+ Authorization: `Bearer ${session.token}`,
36
+ },
37
+ });
38
+ }, {
39
+ until(res) {
40
+ return !!res?.checkoutUrl;
41
+ },
42
+ interval: 1000,
43
+ maxAttempt: 5,
44
+ });
45
+ const res = await poll();
46
+ if (!res?.checkoutUrl) {
47
+ const error = new Error();
48
+ error.name = 'GCashDepositError';
49
+ error.message = 'Failed to process GCash deposit';
50
+ throw error;
51
+ }
52
+ const depositsCount = queryClient.getQueryData(getDepositsCountQueryKey()) ?? 0;
53
+ if (depositsCount <= 0) {
54
+ queryClient.setQueryData(getAvailableQuestsQueryKey(), (prev) => {
55
+ return prev?.map((quest) => {
56
+ const progressPercentage = clamp(parseDecimal(quest.progressPercentage, 0) + 50, 100);
57
+ if (quest.type === 'ONBOARDING') {
58
+ return {
59
+ ...quest,
60
+ status: progressPercentage >= 100 ? 'COMPLETED' : quest.status,
61
+ progressPercentage: progressPercentage.toFixed(2),
62
+ };
63
+ }
64
+ return quest;
65
+ });
66
+ });
67
+ }
68
+ queryClient.setQueryData(getDepositsCountQueryKey(), (prev) => prev ? prev + 1 : 1);
69
+ return res;
70
+ },
71
+ });
72
+ return mutation;
73
+ };
@@ -0,0 +1,7 @@
1
+ import { type UseDisclosureReturn } from '../../client/hooks/useDisclosure';
2
+ interface GoogleDisconnectProps {
3
+ onConfirmAction?: (ctx: UseDisclosureReturn) => React.ReactNode;
4
+ children?: (ctx: UseDisclosureReturn) => React.ReactNode;
5
+ }
6
+ export declare function GoogleDisconnect(props: GoogleDisconnectProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useDisclosure, } from '../../client/hooks/useDisclosure.js';
4
+ import { LinkBrokenIcon } from '../../icons/LinkBrokenIcon.js';
5
+ import { XIcon } from '../../icons/XIcon.js';
6
+ import { Dialog } from '../../ui/Dialog/index.js';
7
+ import { Portal } from '../../ui/Portal/index.js';
8
+ export function GoogleDisconnect(props) {
9
+ const disclosure = useDisclosure();
10
+ return (_jsxs(_Fragment, { children: [props.children?.(disclosure), _jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: disclosure.open, onOpenChange: (details) => disclosure.setOpen(details.open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto min-h-auto max-w-[25rem] overflow-y-auto rounded-xl p-6", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col ", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(LinkBrokenIcon, {}) }), _jsx("h2", { className: "mb-1 text-center font-semibold text-lg xl:mt-xl", children: "Disconnect Google Account" }), _jsx("p", { className: "text-center text-sm text-text-tertiary-600 leading-2xl", children: "Are you sure you want to disconnect your Google account? This may affect your ability to log in or sync data." })] }), _jsx("div", { className: "pt-6", children: props.onConfirmAction?.(disclosure) })] }) })] }) })] }));
11
+ }
@@ -7,13 +7,13 @@ import { usePaymentSettingsQuery } from '../../../client/hooks/usePaymentSetting
7
7
  import { AlertCircleIcon } from '../../../icons/AlertCircleIcon.js';
8
8
  import { SpinnerIcon } from '../../../icons/SpinnerIcon.js';
9
9
  import { onMobileDevice } from '../../../utils/onMobileDevice.js';
10
- import { AiOPaymentMethods } from '../AiOPaymentMethods.js';
11
10
  import { PaymentMethods } from '../PaymentMethods.js';
12
11
  import { AiOGCashDeposit } from './AiOGCashDeposit/AiOGCashDeposit.js';
13
12
  import { AiOGrabPayDeposit } from './AiOGrabPayDeposit/AiOGrabPayDeposit.js';
14
13
  import { AiOPalawanPayDeposit } from './AiOPalawanPayDeposit/AiOPalawanPayDeposit.js';
15
14
  import { AiOPayMayaDeposit } from './AiOPayMayaDeposit/AiOPayMayaDeposit.js';
16
15
  import { GCashDeposit } from './GCashDeposit/GCashDeposit.js';
16
+ import { GCashWebpayDeposit } from './GCashWebpayDeposit /GCashWebpayDeposit .js';
17
17
  import { LibanganDeposit } from './LibanganDeposit/LibanganDeposit.js';
18
18
  import { MayaAppDeposit } from './MayaAppDeposit/MayaAppDeposit.js';
19
19
  import { MayaDeposit } from './MayaDeposit/MayaDeposit.js';
@@ -25,15 +25,6 @@ export function Deposit() {
25
25
  const paymentSettingsQuery = usePaymentSettingsQuery();
26
26
  const paymentSettings = paymentSettingsQuery.data;
27
27
  const featureFlag = useFeatureFlag();
28
- const aioDepositMethodEnabled = (() => {
29
- const isMobile = onMobileDevice();
30
- const enabledKey = isMobile ? 'mobileWebEnabled' : 'webEnabled';
31
- return (paymentSettings?.aioGCashDepositGatewaySettings?.[enabledKey] ||
32
- paymentSettings?.aioPayMayaDepositGatewaySettings?.[enabledKey] ||
33
- paymentSettings?.aioGrabPayDepositGatewaySettings?.[enabledKey] ||
34
- paymentSettings?.aioPalawanPayDepositGatewaySettings?.[enabledKey] ||
35
- false);
36
- })();
37
28
  const enabledPaymentMethods = (() => {
38
29
  const l = [];
39
30
  if (onMaya) {
@@ -45,77 +36,62 @@ export function Deposit() {
45
36
  const paymentMethods = [
46
37
  {
47
38
  method: 'GCASH',
48
- condition: () => paymentSettings?.gcashDepositGatewaySettings?.[enabledKey] || false,
39
+ enabled: paymentSettings?.gcashDepositGatewaySettings?.[enabledKey],
49
40
  },
50
41
  {
51
42
  method: 'MAYA',
52
- condition: () => paymentSettings?.mayaDepositGatewaySettings?.[enabledKey] || false,
43
+ enabled: paymentSettings?.mayaDepositGatewaySettings?.[enabledKey],
53
44
  },
54
45
  {
55
46
  method: 'QRPH',
56
- condition: () => paymentSettings?.qrphDepositGatewaySettings?.[enabledKey] || false,
47
+ enabled: paymentSettings?.qrphDepositGatewaySettings?.[enabledKey],
57
48
  },
58
49
  {
59
50
  method: 'ONLINE_BANK',
60
- condition: () => paymentSettings?.onlineBankDepositGatewaySettings?.[enabledKey] ||
61
- false,
51
+ enabled: paymentSettings?.onlineBankDepositGatewaySettings?.[enabledKey],
62
52
  },
63
53
  {
64
54
  method: 'LIBANGAN_PAY_IN',
65
- condition: () => paymentSettings?.libanganDepositGatewaySettings?.[enabledKey] ||
66
- false,
55
+ enabled: paymentSettings?.libanganDepositGatewaySettings?.[enabledKey],
67
56
  },
68
57
  {
69
58
  method: 'PISO_PAY',
70
- condition: () => paymentSettings?.pisoPayDepositGatewaySettings?.[enabledKey] || false,
59
+ enabled: paymentSettings?.pisoPayDepositGatewaySettings?.[enabledKey],
71
60
  },
72
- {
73
- method: 'AIO_EWALLET',
74
- condition: () => featureFlag.enabled && aioDepositMethodEnabled,
75
- },
76
- ];
77
- paymentMethods.forEach(({ method, condition }) => {
78
- if (condition()) {
79
- l.push(method);
80
- }
81
- });
82
- return l;
83
- })();
84
- const enabledAiOeWalletPaymentMethods = (() => {
85
- const l = [];
86
- const isMobile = onMobileDevice();
87
- const enabledKey = isMobile ? 'mobileWebEnabled' : 'webEnabled';
88
- const m = [
89
61
  {
90
62
  method: 'AIO_GCASH',
91
- condition: () => paymentSettings?.aioGCashDepositGatewaySettings?.[enabledKey] ||
92
- false,
63
+ enabled: paymentSettings?.aioGCashDepositGatewaySettings?.[enabledKey] &&
64
+ featureFlag.enabled,
93
65
  },
94
66
  {
95
67
  method: 'AIO_PAY_MAYA',
96
- condition: () => paymentSettings?.aioPayMayaDepositGatewaySettings?.[enabledKey] ||
97
- false,
68
+ enabled: paymentSettings?.aioPayMayaDepositGatewaySettings?.[enabledKey] &&
69
+ featureFlag.enabled,
98
70
  },
99
71
  {
100
72
  method: 'AIO_GRAB_PAY',
101
- condition: () => paymentSettings?.aioGrabPayDepositGatewaySettings?.[enabledKey] ||
102
- false,
73
+ enabled: paymentSettings?.aioGrabPayDepositGatewaySettings?.[enabledKey] &&
74
+ featureFlag.enabled,
103
75
  },
104
76
  {
105
77
  method: 'AIO_PALAWAN_PAY',
106
- condition: () => paymentSettings?.aioPalawanPayDepositGatewaySettings?.[enabledKey] ||
107
- false,
78
+ enabled: paymentSettings?.aioPalawanPayDepositGatewaySettings?.[enabledKey] &&
79
+ featureFlag.enabled,
80
+ },
81
+ {
82
+ method: 'GCASH_WEBPAY',
83
+ enabled: paymentSettings?.gcashWebpayDepositGatewaySettings?.[enabledKey] &&
84
+ featureFlag.enabled,
108
85
  },
109
86
  ];
110
- m.forEach(({ method, condition }) => {
111
- if (condition()) {
112
- l.push(method);
87
+ paymentMethods.forEach((o) => {
88
+ if (o.enabled) {
89
+ l.push(o.method);
113
90
  }
114
91
  });
115
92
  return l;
116
93
  })();
117
94
  const [paymentMethod, setPaymentMethod] = useState();
118
- const [paymentMethodAiOeWallet, setPaymentMethodAiOeWallet] = useState('AIO_GCASH');
119
95
  useEffect(() => {
120
96
  if (enabledPaymentMethods.length > 0 && !paymentMethod) {
121
97
  setPaymentMethod(enabledPaymentMethods[0]);
@@ -129,15 +105,10 @@ export function Deposit() {
129
105
  if (!isMayaSessionValid) {
130
106
  return _jsx(MayaSessionSessionExpired, {});
131
107
  }
132
- if (enabledPaymentMethods.length <= 0 &&
133
- enabledAiOeWalletPaymentMethods.length <= 0) {
108
+ if (enabledPaymentMethods.length <= 0) {
134
109
  return _jsx(NoAvailablePaymentMethods, {});
135
110
  }
136
- return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'QRPH' && _jsx(QRPHDeposit, {}), paymentMethod === 'GCASH' && _jsx(GCashDeposit, {}), paymentMethod === 'MAYA' && _jsx(MayaDeposit, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppDeposit, {}), paymentMethod === 'ONLINE_BANK' && _jsx(OnlineBankDeposit, {}), paymentMethod === 'LIBANGAN_PAY_IN' && _jsx(LibanganDeposit, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayDeposit, {}), paymentMethod === 'AIO_EWALLET' && (_jsxs(_Fragment, { children: [_jsx(AiOPaymentMethods, { value: paymentMethodAiOeWallet, onChange: setPaymentMethodAiOeWallet, options: enabledAiOeWalletPaymentMethods, label: "AIO eWallet payment methods", defaultValue: "AIO_GCASH" }), paymentMethodAiOeWallet === 'AIO_GCASH' &&
137
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOGCashDeposit, {}), paymentMethodAiOeWallet === 'AIO_PAY_MAYA' &&
138
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOPayMayaDeposit, {}), paymentMethodAiOeWallet === 'AIO_GRAB_PAY' &&
139
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOGrabPayDeposit, {}), paymentMethodAiOeWallet === 'AIO_PALAWAN_PAY' &&
140
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOPalawanPayDeposit, {})] }))] }));
111
+ return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'QRPH' && _jsx(QRPHDeposit, {}), paymentMethod === 'GCASH' && _jsx(GCashDeposit, {}), paymentMethod === 'MAYA' && _jsx(MayaDeposit, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppDeposit, {}), paymentMethod === 'ONLINE_BANK' && _jsx(OnlineBankDeposit, {}), paymentMethod === 'LIBANGAN_PAY_IN' && _jsx(LibanganDeposit, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayDeposit, {}), paymentMethod === 'AIO_GCASH' && _jsx(AiOGCashDeposit, {}), paymentMethod === 'AIO_PAY_MAYA' && _jsx(AiOPayMayaDeposit, {}), paymentMethod === 'AIO_GRAB_PAY' && _jsx(AiOGrabPayDeposit, {}), paymentMethod === 'AIO_PALAWAN_PAY' && _jsx(AiOPalawanPayDeposit, {}), paymentMethod === 'GCASH_WEBPAY' && _jsx(GCashWebpayDeposit, {})] }));
141
112
  }
142
113
  function MayaSessionSessionExpired() {
143
114
  return (_jsxs("div", { className: "py-xl", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-warning-secondary", children: _jsx(AlertCircleIcon, { className: "size-6 text-text-featured-icon-light-warning" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg", children: "Session Expired" }), _jsx("p", { className: "mx-auto mt-xs max-w-[25rem] text-center text-sm text-text-tertiary-600", children: "Your session has timed out. To continue with deposits or withdrawals, Please try reloading the app." })] }));
@@ -0,0 +1 @@
1
+ export declare function GCashWebpayDeposit(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,191 @@
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 invariant from 'tiny-invariant';
7
+ import { z } from 'zod';
8
+ import { useShallow } from 'zustand/shallow';
9
+ import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePromosQuery.js';
10
+ import { useCreateGCashWebpayDepositMutation } from '../../../../client/hooks/useCreateGCashWebpayDepositMutation.js';
11
+ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
12
+ import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
13
+ import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
14
+ import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
15
+ import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
16
+ import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
17
+ import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
18
+ import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
19
+ import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
20
+ import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
21
+ import { XIcon } from '../../../../icons/XIcon.js';
22
+ import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
23
+ import { Button } from '../../../../ui/Button/index.js';
24
+ import { Field } from '../../../../ui/Field/index.js';
25
+ import { NumberInput } from '../../../../ui/NumberInput/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 { AvailablePromos } from '../AvailablePromos.js';
31
+ export function GCashWebpayDeposit() {
32
+ const depositWithdrawalProps = useDepositWithdrawalPropsContext();
33
+ const disclosure = useDisclosure();
34
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
35
+ depositWithdrawal: ctx.depositWithdrawal,
36
+ kycVerificationStatus: ctx.kycVerificationStatus,
37
+ })));
38
+ const verificationQuery = useMemberVerificationQuery();
39
+ const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
40
+ const [status, setStatus] = useState('waiting');
41
+ const createDepositMutation = useCreateGCashWebpayDepositMutation({
42
+ onMutate() {
43
+ disclosure.setOpen(true);
44
+ setStatus('processing');
45
+ },
46
+ onSuccess(data) {
47
+ invariant(data.checkoutUrl);
48
+ window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
49
+ form.reset();
50
+ disclosure.setOpen(false);
51
+ },
52
+ onError() {
53
+ disclosure.setOpen(true);
54
+ setStatus('failed');
55
+ },
56
+ });
57
+ const depositQuery = useDepositQuery(createDepositMutation.data?.id, {
58
+ enabled: createDepositMutation.data != null,
59
+ refetchInterval(ctx) {
60
+ if (ctx.state.data?.status === 'CANCELLED' ||
61
+ ctx.state.data?.status === 'CONFIRMED') {
62
+ return false;
63
+ }
64
+ else {
65
+ return 2500;
66
+ }
67
+ },
68
+ });
69
+ useEffect(() => {
70
+ if (depositQuery.data?.status === 'CANCELLED') {
71
+ disclosure.setOpen(true);
72
+ setStatus('failed');
73
+ }
74
+ else if (depositQuery.data?.status === 'CONFIRMED') {
75
+ disclosure.setOpen(true);
76
+ setStatus('success');
77
+ }
78
+ }, [depositQuery.data?.status, disclosure]);
79
+ const depositsCountQuery = useDepositsCountQuery();
80
+ const depositsCount = depositsCountQuery.data ?? 0;
81
+ const paymentSettingsQuery = usePaymentSettingsQuery();
82
+ const paymentSettings = paymentSettingsQuery.data;
83
+ const gatewaySettings = paymentSettings?.gcashWebpayDepositGatewaySettings;
84
+ const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
85
+ const minimumAmount = depositsCount <= 0
86
+ ? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
87
+ : parseDecimal(gatewaySettings?.minimumAmount, 0);
88
+ const promosQuery = useAvailablePromosQuery();
89
+ const promos = promosQuery.data ?? [];
90
+ const definition = z
91
+ .object({
92
+ amount: z.string().superRefine((val, ctx) => {
93
+ const n = parseDecimal(val, 0);
94
+ if (n < minimumAmount) {
95
+ ctx.addIssue({
96
+ type: 'number',
97
+ code: z.ZodIssueCode.too_small,
98
+ inclusive: true,
99
+ minimum: minimumAmount,
100
+ message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
101
+ });
102
+ }
103
+ if (n > maximumAmount) {
104
+ ctx.addIssue({
105
+ type: 'number',
106
+ code: z.ZodIssueCode.too_big,
107
+ inclusive: true,
108
+ maximum: maximumAmount,
109
+ message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
110
+ });
111
+ }
112
+ }),
113
+ promo: z.string().optional().nullable(),
114
+ })
115
+ .superRefine((value, ctx) => {
116
+ const promo = promos.find((o) => o.id === value.promo);
117
+ const promoMinAmount = parseDecimal(promo?.minimumDepositAmount, 0);
118
+ const promoMaxAmount = parseDecimal(promo?.maximumDepositAmount, 0);
119
+ const amount = parseDecimal(value.amount, 0);
120
+ if (promo && amount < promoMinAmount) {
121
+ ctx.addIssue({
122
+ path: ['amount'],
123
+ code: z.ZodIssueCode.custom,
124
+ message: `Minimum amount for this promo is ${promoMinAmount.toLocaleString()}`,
125
+ });
126
+ }
127
+ if (promo && amount > promoMaxAmount) {
128
+ ctx.addIssue({
129
+ path: ['amount'],
130
+ code: z.ZodIssueCode.custom,
131
+ message: `Maximum amount for this promo is ${promoMaxAmount}`,
132
+ });
133
+ }
134
+ });
135
+ const form = useForm({
136
+ mode: 'all',
137
+ resolver: zodResolver(definition),
138
+ defaultValues: {
139
+ amount: '0',
140
+ promo: globalStore.depositWithdrawal.promo ?? null,
141
+ },
142
+ });
143
+ useEffect(() => {
144
+ if (minimumAmount) {
145
+ form.reset({
146
+ amount: minimumAmount.toString(),
147
+ promo: form.getValues('promo') ?? null,
148
+ });
149
+ }
150
+ }, [form, minimumAmount]);
151
+ return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
152
+ //handle new kyc process
153
+ if (verificationStatus === 'PENDING' ||
154
+ verificationStatus === 'UNVERIFIED' ||
155
+ verificationStatus === 'REJECTED' ||
156
+ verificationStatus === 'CREATED') {
157
+ globalStore.kycVerificationStatus.setOpen(true);
158
+ return;
159
+ }
160
+ else {
161
+ createDepositMutation.reset();
162
+ createDepositMutation.mutate({
163
+ amount: data.amount.toString(),
164
+ promo: data.promo ?? undefined,
165
+ successRedirectionUrl: window.location.origin,
166
+ cancelRedirectionUrl: window.location.origin,
167
+ });
168
+ }
169
+ }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
170
+ o.field.onChange(details.value);
171
+ }, formatOptions: {
172
+ maximumFractionDigits: 2,
173
+ minimumFractionDigits: 0,
174
+ }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _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) => {
175
+ form.setValue('amount', value.toString(), {
176
+ shouldTouch: true,
177
+ shouldDirty: true,
178
+ shouldValidate: true,
179
+ });
180
+ }, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: (value) => {
181
+ o.field.onChange(value);
182
+ globalStore.depositWithdrawal.setPromo(null);
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
+ disclosure.setOpen(details.open);
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' &&
188
+ '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
+ api.setOpen(false);
190
+ }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
191
+ }
@@ -4,13 +4,14 @@ import { twMerge } from 'tailwind-merge';
4
4
  import { useControllableState } from '../../client/hooks/useControllableState.js';
5
5
  import { CheckIcon } from '../../icons/CheckIcon.js';
6
6
  import gcash from '../../images/gcash.png';
7
+ import grabPay from '../../images/grabpay.png';
7
8
  import instapay from '../../images/instapay.png';
8
9
  import libangan from '../../images/libangan.png';
9
10
  import maya from '../../images/maya.png';
10
11
  import onlineBank from '../../images/online-bank.png';
12
+ import palawanPay from '../../images/palawanpay.png';
11
13
  import pisoPay from '../../images/piso-pay.png';
12
14
  import qrph from '../../images/QRPH.png';
13
- import wallet from '../../images/wallet.png';
14
15
  import { Checkbox } from '../../ui/Checkbox/index.js';
15
16
  import { Field } from '../../ui/Field/index.js';
16
17
  import { PaymentMethodDefinition } from './utils.js';
@@ -61,9 +62,29 @@ const OPTIONS = [
61
62
  image: pisoPay,
62
63
  },
63
64
  {
64
- value: 'AIO_EWALLET',
65
- label: 'AIO eWallet',
66
- image: wallet,
65
+ value: 'AIO_GCASH',
66
+ label: 'GCash',
67
+ image: gcash,
68
+ },
69
+ {
70
+ value: 'AIO_PAY_MAYA',
71
+ label: 'Maya',
72
+ image: maya,
73
+ },
74
+ {
75
+ value: 'AIO_GRAB_PAY',
76
+ label: 'GrabPay',
77
+ image: grabPay,
78
+ },
79
+ {
80
+ value: 'AIO_PALAWAN_PAY',
81
+ label: 'Palawan Pay',
82
+ image: palawanPay,
83
+ },
84
+ {
85
+ value: 'GCASH_WEBPAY',
86
+ label: 'GCash Webpay',
87
+ image: gcash,
67
88
  },
68
89
  ];
69
90
  export function PaymentMethods(props) {
@@ -80,9 +101,10 @@ export function PaymentMethods(props) {
80
101
  if (!lastValue)
81
102
  return;
82
103
  setValue(PaymentMethodDefinition.parse(lastValue));
83
- }, className: "grid grid-cols-2 gap-x-4 gap-y-3", children: options.map((option) => (_jsxs(Checkbox.Root, { value: option.value, className: "flex cursor-pointer items-center justify-between rounded-xl border border-border-secondary ui-checked:border-border-brand-solid p-lg", children: [_jsxs("div", { className: twMerge('rounded-xs bg-white px-sm py-[0.688rem]', option.value === 'GCASH' && 'bg-[#017EFF]', option.value === 'AIO_EWALLET' &&
84
- 'flex items-center space-x-sm bg-bg-secondary'), children: [_jsx(Image, { src: option.image, alt: "", width: 200, height: 40, className: twMerge('w-auto', option.value === 'LIBANGAN_PAY_IN' ||
85
- option.value === 'VENTAJA_DISBURSEMENT'
86
- ? 'h-[2.5rem]'
87
- : 'h-[1.063rem]'), draggable: false }), option.value === 'AIO_EWALLET' && (_jsx("p", { className: "text-text-secondary-700 text-xs leading-tight", children: "AIO eWallet" }))] }), _jsx(Checkbox.Control, { className: "shrink-0", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.HiddenInput, {})] }, option.value))) })] }));
104
+ }, className: "grid grid-cols-2 gap-x-4 gap-y-3", children: options.map((option) => (_jsxs(Checkbox.Root, { value: option.value, className: "flex cursor-pointer items-center justify-between rounded-xl border border-border-secondary ui-checked:border-border-brand-solid p-lg", children: [_jsx("div", { className: twMerge('rounded-xs', option.value === 'AIO_GRAB_PAY'
105
+ ? 'bg-transparent px-0 py-0'
106
+ : 'bg-white px-sm py-[0.688rem]', option.value.includes('GCASH') && 'bg-[#017EFF]', option.value === 'AIO_PALAWAN_PAY' && 'bg-[#026308]', option.value === 'AIO_PAY_MAYA' && 'bg-black'), children: _jsx(Image, { src: option.image, alt: "", width: 200, height: 40, className: twMerge('w-auto', 'h-[1.063rem]', option.value === 'LIBANGAN_PAY_IN' ||
107
+ option.value === 'VENTAJA_DISBURSEMENT'
108
+ ? 'h-[2.5rem]'
109
+ : '', option.value === 'AIO_GRAB_PAY' && 'h-[3rem] rounded-[4px]', option.value === 'AIO_PALAWAN_PAY' && 'h-[2rem]'), draggable: false }) }), _jsx(Checkbox.Control, { className: "shrink-0", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.HiddenInput, {})] }, option.value))) })] }));
88
110
  }
@@ -1,8 +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_EWALLET"]>;
4
- export declare const AiOeWalletPaymentMethodDefinition: z.ZodEnum<["AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY"]>;
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"]>;
5
4
  export type PaymentMethod = z.infer<typeof PaymentMethodDefinition>;
6
- export type AiOeWalletPaymentMethod = z.infer<typeof AiOeWalletPaymentMethodDefinition>;
7
5
  export type DepositWithdrawalErrors = KnownDepositError | KnownWithdrawalError | WithdrawalError | string;
8
6
  export declare function explainError(error?: DepositWithdrawalErrors): string;
@@ -9,13 +9,11 @@ export const PaymentMethodDefinition = z.enum([
9
9
  'LIBANGAN_PAY_IN',
10
10
  'VENTAJA_DISBURSEMENT',
11
11
  'PISO_PAY',
12
- 'AIO_EWALLET',
13
- ]);
14
- export const AiOeWalletPaymentMethodDefinition = z.enum([
15
12
  'AIO_GCASH',
16
13
  'AIO_PAY_MAYA',
17
14
  'AIO_GRAB_PAY',
18
15
  'AIO_PALAWAN_PAY',
16
+ 'GCASH_WEBPAY',
19
17
  ]);
20
18
  const errorMap = {
21
19
  DAILY_PURCHASE_OR_DEPOSIT_LIMIT_EXCEEDED: 'You have exceeded your daily purchase or deposit limit. Please try again tomorrow.',
@@ -0,0 +1 @@
1
+ export declare function Loading(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ export function Loading() {
4
+ return (_jsx("div", { className: "flex h-[calc(100vh-400px)] w-full items-center justify-center px-4", children: _jsxs("div", { className: "flex flex-col items-center space-y-4", children: [_jsx("div", { className: "h-10 w-10 animate-spin rounded-full border-4 border-blue-500 border-t-transparent" }), _jsx("p", { className: "font-medium text-gray-700 text-lg", children: "Loading Sports Book\u2026" })] }) }));
5
+ }
@@ -1,3 +1,4 @@
1
+ import type { ImageProps } from 'next/image';
1
2
  import { type CSSProperties, type ReactNode } from 'react';
2
3
  export interface ClassNameEntries {
3
4
  root?: string;
@@ -39,6 +40,28 @@ export interface JackpotsCarouselProps {
39
40
  image?: string;
40
41
  };
41
42
  };
43
+ chestImagesByTier?: {
44
+ grand?: {
45
+ open: ImageProps['src'];
46
+ closed: ImageProps['src'];
47
+ };
48
+ major?: {
49
+ open: ImageProps['src'];
50
+ closed: ImageProps['src'];
51
+ };
52
+ minor?: {
53
+ open: ImageProps['src'];
54
+ closed: ImageProps['src'];
55
+ };
56
+ default?: {
57
+ open: ImageProps['src'];
58
+ closed: ImageProps['src'];
59
+ };
60
+ style?: {
61
+ wrapper?: string;
62
+ image?: string;
63
+ };
64
+ };
42
65
  jackpotProfileShape?: 'oval' | 'star';
43
66
  }
44
67
  export declare function JackpotsCarousel({ style, className, ...props }: JackpotsCarouselProps): import("react/jsx-runtime").JSX.Element | null;
@@ -67,5 +67,5 @@ export function JackpotsCarousel({ style, className, ...props }) {
67
67
  const classNames = isString(className)
68
68
  ? { root: className }
69
69
  : (className ?? {});
70
- return (_jsxs("div", { ref: ref, style: styles.root, className: classNames.root, children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "font-semibold text-lg", children: props.heading ?? 'Jackpots' }), _jsxs("div", { className: "flex items-center md:gap-3xl", children: [_jsxs(Link, { href: props.viewAllUrl ?? '/jackpots', className: "flex gap-sm font-semibold text-button-tertiary-fg text-sm", children: ["See All", _jsx(ChevronRightIcon, { className: "size-5 lg:hidden" })] }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { disabled: !canScrollPrev, onClick: scrollPrev, variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsxs(Button, { disabled: !canScrollNext, onClick: scrollNext, variant: "outline", colorScheme: "gray", className: "rounded-l-none", "aria-label": "Next", children: [_jsx("span", { className: "sr-only", children: "Next" }), _jsx(ArrowRightIcon, { className: "size-5" })] })] })] })] }), _jsx("div", { className: "relative mt-lg overflow-hidden", ref: emblaRef, children: _jsx("div", { className: "flex gap-2.5", children: jackpots.map((jackpot) => (_jsx(JackpotsCarouselItemContext, { value: jackpot, children: _jsx(JackpotsCarouselItem, { style: styles.itemRoot, className: classNames, viewAllUrl: props.viewAllUrl, animate: props.animate, customJackpotChestImage: props.customJackpotChestImage, jackpotProfileShape: props.jackpotProfileShape }) }, jackpot.id))) }) })] }));
70
+ return (_jsxs("div", { ref: ref, style: styles.root, className: classNames.root, children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "font-semibold text-lg", children: props.heading ?? 'Jackpots' }), _jsxs("div", { className: "flex items-center md:gap-3xl", children: [_jsxs(Link, { href: props.viewAllUrl ?? '/jackpots', className: "flex gap-sm font-semibold text-button-tertiary-fg text-sm", children: ["See All", _jsx(ChevronRightIcon, { className: "size-5 lg:hidden" })] }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { disabled: !canScrollPrev, onClick: scrollPrev, variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsxs(Button, { disabled: !canScrollNext, onClick: scrollNext, variant: "outline", colorScheme: "gray", className: "rounded-l-none", "aria-label": "Next", children: [_jsx("span", { className: "sr-only", children: "Next" }), _jsx(ArrowRightIcon, { className: "size-5" })] })] })] })] }), _jsx("div", { className: "relative mt-lg overflow-hidden", ref: emblaRef, children: _jsx("div", { className: "flex gap-2.5", children: jackpots.map((jackpot) => (_jsx(JackpotsCarouselItemContext, { value: jackpot, children: _jsx(JackpotsCarouselItem, { style: styles.itemRoot, className: classNames, viewAllUrl: props.viewAllUrl, animate: props.animate, customJackpotChestImage: props.customJackpotChestImage, jackpotProfileShape: props.jackpotProfileShape, chestImagesByTier: props.chestImagesByTier }) }, jackpot.id))) }) })] }));
71
71
  }