@opexa/portal-components 0.0.360 → 0.0.362

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 (74) hide show
  1. package/dist/client/hooks/useFacebookClientQuery.d.ts +2 -0
  2. package/dist/client/hooks/useFacebookClientQuery.js +13 -0
  3. package/dist/client/hooks/useUnlinkFacebookMutation.d.ts +2 -0
  4. package/dist/client/hooks/useUnlinkFacebookMutation.js +31 -0
  5. package/dist/components/AccountInfo/AccountInfo.js +53 -2
  6. package/dist/components/Banner/Banner.client.d.ts +12 -0
  7. package/dist/components/Banner/Banner.client.js +49 -0
  8. package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +8 -3
  9. package/dist/components/DigitainLauncher/Loading.d.ts +1 -0
  10. package/dist/components/DigitainLauncher/Loading.js +5 -0
  11. package/dist/components/Jackpots/Jackpots.d.ts +1 -1
  12. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarousel.d.ts +11 -0
  13. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarousel.js +1 -1
  14. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.d.ts +12 -1
  15. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +9 -2
  16. package/dist/components/Jackpots/JackpotsList/JackpotsList.d.ts +11 -0
  17. package/dist/components/Jackpots/JackpotsList/JackpotsList.js +1 -1
  18. package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.d.ts +12 -1
  19. package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +9 -2
  20. package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.d.ts +12 -1
  21. package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.js +10 -3
  22. package/dist/components/KYC/BasicInformation.d.ts +1 -0
  23. package/dist/components/KYC/BasicInformation.js +101 -0
  24. package/dist/components/KYC/IdentityVerification.d.ts +1 -0
  25. package/dist/components/KYC/IdentityVerification.js +120 -0
  26. package/dist/components/KYC/Indicator.d.ts +1 -0
  27. package/dist/components/KYC/Indicator.js +8 -0
  28. package/dist/components/KYC/KYC.lazy.d.ts +6 -0
  29. package/dist/components/KYC/KYC.lazy.js +45 -0
  30. package/dist/components/KYC/KYCContext.d.ts +6 -0
  31. package/dist/components/KYC/KYCContext.js +2 -0
  32. package/dist/components/KYC/PersonalInformation.d.ts +1 -0
  33. package/dist/components/KYC/PersonalInformation.js +122 -0
  34. package/dist/components/KYC/useKYC.d.ts +25 -0
  35. package/dist/components/KYC/useKYC.js +38 -0
  36. package/dist/components/SignIn/FacebookSignInTrigger.d.ts +1 -0
  37. package/dist/components/SignIn/FacebookSignInTrigger.js +51 -0
  38. package/dist/components/SignIn/MobileNumberSignIn.js +2 -1
  39. package/dist/components/SignIn/SignIn.lazy.d.ts +1 -0
  40. package/dist/components/SignIn/utils.d.ts +8 -0
  41. package/dist/components/SignIn/utils.js +26 -0
  42. package/dist/constants/Branches.d.ts +2 -0
  43. package/dist/constants/Branches.js +42 -0
  44. package/dist/icons/StarIcon.d.ts +3 -2
  45. package/dist/icons/StarIcon.js +6 -3
  46. package/dist/images/close-chest-bstar.png +0 -0
  47. package/dist/images/open-chest-bstar.png +0 -0
  48. package/dist/images/responsible-gaming-yellow.png +0 -0
  49. package/dist/services/account.d.ts +14 -0
  50. package/dist/services/account.js +8 -1
  51. package/dist/services/queries.d.ts +3 -1
  52. package/dist/services/queries.js +11 -0
  53. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +4 -0
  54. package/dist/third-parties/FacebookPixel/FacebookPixel.js +4 -0
  55. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  56. package/dist/third-parties/FacebookPixel/api.js +1 -0
  57. package/dist/third-parties/FacebookPixel/index.d.ts +1 -0
  58. package/dist/third-parties/FacebookPixel/index.js +1 -0
  59. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +4 -0
  60. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +4 -0
  61. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  62. package/dist/third-parties/GoogleRecaptcha/api.js +1 -0
  63. package/dist/third-parties/GoogleRecaptcha/index.d.ts +1 -0
  64. package/dist/third-parties/GoogleRecaptcha/index.js +1 -0
  65. package/dist/third-parties/index.d.ts +2 -0
  66. package/dist/third-parties/index.js +2 -0
  67. package/dist/types/index.d.ts +1 -0
  68. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  69. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  70. package/dist/utils/mutationKeys.d.ts +1 -0
  71. package/dist/utils/mutationKeys.js +4 -0
  72. package/dist/utils/queryKeys.d.ts +1 -0
  73. package/dist/utils/queryKeys.js +1 -0
  74. package/package.json +2 -1
@@ -0,0 +1,2 @@
1
+ import type { Query } from '../../types';
2
+ export declare const useFacebookClientQuery: Query<string | null>;
@@ -0,0 +1,13 @@
1
+ import { useQuery } from '@tanstack/react-query';
2
+ import { getFacebookClientId } from '../../services/account.js';
3
+ import { getFacebookClientIdQueryKey } from '../../utils/queryKeys.js';
4
+ export const useFacebookClientQuery = (options) => {
5
+ const query = useQuery({
6
+ ...options,
7
+ queryKey: getFacebookClientIdQueryKey(),
8
+ queryFn: async ({ signal }) => {
9
+ return await getFacebookClientId({ signal });
10
+ },
11
+ });
12
+ return query;
13
+ };
@@ -0,0 +1,2 @@
1
+ import type { Mutation } from '../../types';
2
+ export declare const useUnlinkFacebookMutation: Mutation<void, string>;
@@ -0,0 +1,31 @@
1
+ import { useMutation } from '@tanstack/react-query';
2
+ import invariant from 'tiny-invariant';
3
+ import { unlinkFacebook } from '../../services/account.js';
4
+ import { getQueryClient } from '../../utils/getQueryClient.js';
5
+ import { getUnlinkFacebookMutationKey } from '../../utils/mutationKeys.js';
6
+ import { getAccountQueryKey } from '../../utils/queryKeys.js';
7
+ import { getSession } from '../services/getSession.js';
8
+ export const useUnlinkFacebookMutation = (config) => {
9
+ const queryClient = getQueryClient();
10
+ return useMutation({
11
+ ...config,
12
+ mutationKey: getUnlinkFacebookMutationKey(),
13
+ mutationFn: async (id) => {
14
+ const session = await getSession();
15
+ invariant(session.status === 'authenticated');
16
+ await unlinkFacebook(id, {
17
+ headers: {
18
+ Authorization: `Bearer ${session.token}`,
19
+ },
20
+ });
21
+ queryClient.setQueryData(getAccountQueryKey(), (prev) => {
22
+ if (!prev)
23
+ return prev;
24
+ return {
25
+ ...prev,
26
+ facebookId: null,
27
+ };
28
+ });
29
+ },
30
+ });
31
+ };
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import FacebookLogin from '@greatsumini/react-facebook-login';
3
4
  import { zodResolver } from '@hookform/resolvers/zod';
4
5
  import { GoogleOAuthProvider, useGoogleLogin } from '@react-oauth/google';
5
6
  import { differenceInYears, format } from 'date-fns';
@@ -10,10 +11,12 @@ import { twMerge } from 'tailwind-merge';
10
11
  import { z } from 'zod';
11
12
  import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
12
13
  import { useDisclosure } from '../../client/hooks/useDisclosure.js';
14
+ import { useFacebookClientQuery } from '../../client/hooks/useFacebookClientQuery.js';
13
15
  import { useGoogleClientIdQuery } from '../../client/hooks/useGoogleClientIdQuery.js';
14
16
  import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
15
17
  import { useMobileNumberParser } from '../../client/hooks/useMobileNumberParser.js';
16
18
  import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
19
+ import { useUnlinkFacebookMutation } from '../../client/hooks/useUnlinkFacebookMutation.js';
17
20
  import { useUnlinkGoogleMutation } from '../../client/hooks/useUnlinkGoogleMutation.js';
18
21
  import { useUpdateAccountMutation } from '../../client/hooks/useUpdateAccountMutation.js';
19
22
  import { toaster } from '../../client/utils/toaster.js';
@@ -159,7 +162,55 @@ function SSO({ google, facebook }) {
159
162
  const googleClientId = googleClientIdQuery.data;
160
163
  if (!facebook && !google)
161
164
  return null;
162
- return (_jsxs("div", { children: [_jsx("h2", { className: "font-semibold text-sm text-text-secondary-700", children: "Account Connections" }), _jsxs("div", { className: "mt-5 rounded-xl border border-border-secondary bg-bg-primary-alt px-4 py-5 shadow-xs", children: [googleClientId && (_jsx(GoogleOAuthProvider, { clientId: googleClientId, children: _jsx(LinkGoogleAccount, {}) })), facebook /* FIXME: replace with facebookClientId or something */ && (_jsxs("div", { className: "mt-6 flex items-center", children: [_jsxs("div", { className: "flex grow items-center gap-sm", children: [_jsx(IconButton, { variant: "outline", colorScheme: "gray", children: _jsx(FacebookIcon, { className: "size-6" }) }), _jsxs("div", { children: [_jsx("p", { className: "font-medium text-sm leading-tight", children: "Facebook" }), _jsx("p", { className: "mt-xs text-text-success-primary-600 text-xs leading-tight", children: "Connected" })] })] }), _jsx("button", { type: "button", className: "font-semibold text-button-tertiary-error-fg text-sm", children: "Disconnect" })] }))] })] }));
165
+ return (_jsxs("div", { children: [_jsx("h2", { className: "font-semibold text-sm text-text-secondary-700", children: "Account Connections" }), _jsxs("div", { className: "mt-5 flex flex-col gap-2 rounded-xl border border-border-secondary bg-bg-primary-alt px-4 py-5 shadow-xs", children: [googleClientId && google && (_jsx(GoogleOAuthProvider, { clientId: googleClientId, children: _jsx(LinkGoogleAccount, {}) })), facebook && _jsx(LinkFacebookAccount, {})] })] }));
166
+ }
167
+ const LinkFacebookAccount = () => {
168
+ const accountQuery = useAccountQuery();
169
+ const account = accountQuery.data;
170
+ const sessionQuery = useSessionQuery();
171
+ const session = sessionQuery.data;
172
+ const facebookClientIdQuery = useFacebookClientQuery();
173
+ const facebookClientId = facebookClientIdQuery.data;
174
+ if (!account || !facebookClientId)
175
+ return null;
176
+ return (_jsxs("div", { className: "flex items-center gap-sm", children: [_jsxs("div", { className: "flex grow items-center gap-sm", children: [_jsx(IconButton, { variant: "outline", colorScheme: "gray", children: _jsx(FacebookIcon, { className: "size-6" }) }), _jsxs("div", { children: [_jsx("p", { className: "font-medium text-sm leading-tight", children: "Facebook" }), _jsx("p", { className: twMerge('mt-xs text-xs leading-tight', account.facebookId
177
+ ? 'text-text-success-primary-600'
178
+ : 'text-text-secondary-700'), children: account.facebookId ? 'Connected' : 'Not Connected' })] })] }), account.facebookId ? (_jsx(UnlinkFacebookAccount, {})) : (_jsx(FacebookLogin, { appId: facebookClientId, useRedirect: true, dialogParams: {
179
+ state: encodeURIComponent(`${window.location.origin},${PLATFORM_CODE},${session?.token}`),
180
+ redirect_uri: `${AUTH_ENDPOINT}/facebook/link`,
181
+ }, onFail: () => {
182
+ toaster.error({
183
+ title: 'Facebook Sign In Failed',
184
+ description: 'Failed to sign in with Facebook. Please try again.',
185
+ });
186
+ }, render: ({ onClick }) => {
187
+ return (_jsx(Button, { onClick: onClick, fullWidth: false, children: "Connect" }));
188
+ } }))] }));
189
+ };
190
+ function UnlinkFacebookAccount() {
191
+ const accountQuery = useAccountQuery();
192
+ const account = accountQuery.data;
193
+ const disclosure = useDisclosure();
194
+ const unlinkFacebookMutation = useUnlinkFacebookMutation({
195
+ onSuccess() {
196
+ toaster.success({
197
+ title: 'Successfully Disconnected Facebook Account',
198
+ description: 'Your Facebook account has been disconnected. You can reconnect anytime from your account settings.',
199
+ });
200
+ disclosure.setOpen(false);
201
+ },
202
+ onError() {
203
+ toaster.error({
204
+ title: 'Error',
205
+ description: 'An error occurred while disconnecting your Facebook account. Please try again later.',
206
+ });
207
+ },
208
+ });
209
+ if (!account)
210
+ return null;
211
+ return (_jsxs(Dialog.Root, { open: disclosure.open, onOpenChange: (details) => disclosure.setOpen(details.open), lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: [_jsx(Dialog.Trigger, { className: "font-semibold text-button-tertiary-error-fg text-sm", children: "Disconnect" }), _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(LinkBroken02Icon, {}) }), _jsx(Dialog.Title, { className: "mt-4 mb-1 text-center font-semibold text-lg xl:mt-xl", children: "Disconnect Facebook Account" }), _jsx(Dialog.Description, { className: "text-center text-sm text-text-tertiary-600 leading-2xl", children: "Are you sure you want to disconnect your Facebook account? This may affect your ability to log in or sync data." })] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "flex justify-between gap-2 pt-6", children: [_jsx(Button, { variant: "outline", disabled: unlinkFacebookMutation.isPending, onClick: () => api.setOpen(false), children: "Cancel" }), _jsx(Button, { variant: "solid", disabled: unlinkFacebookMutation.isPending, onClick: () => {
212
+ unlinkFacebookMutation.mutate(account.id);
213
+ }, children: "Disconnect" })] })) })] }) })] })] }));
163
214
  }
164
215
  const LinkGoogleAccount = () => {
165
216
  const accountQuery = useAccountQuery();
@@ -200,7 +251,7 @@ function UnlinkGoogleAccount() {
200
251
  });
201
252
  if (!account)
202
253
  return null;
203
- return (_jsxs(Dialog.Root, { open: disclosure.open, onOpenChange: (details) => disclosure.setOpen(details.open), lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: [_jsx(Dialog.Trigger, { className: "font-semibold text-button-tertiary-error-fg text-sm", children: "Disconnect" }), _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(LinkBroken02Icon, {}) }), _jsx(Dialog.Title, { className: "mb-1 text-center font-semibold text-lg xl:mt-xl", children: "Disconnect Google Account" }), _jsx(Dialog.Description, { 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(Dialog.Context, { children: (api) => (_jsxs("div", { className: "flex justify-between gap-2 pt-6", children: [_jsx(Button, { variant: "outline", disabled: unlinkGoogleMutation.isPending, onClick: () => api.setOpen(false), children: "Cancel" }), _jsx(Button, { variant: "solid", disabled: unlinkGoogleMutation.isPending, onClick: () => {
254
+ return (_jsxs(Dialog.Root, { open: disclosure.open, onOpenChange: (details) => disclosure.setOpen(details.open), lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: [_jsx(Dialog.Trigger, { className: "font-semibold text-button-tertiary-error-fg text-sm", children: "Disconnect" }), _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(LinkBroken02Icon, {}) }), _jsx(Dialog.Title, { className: "mt-4 mb-1 text-center font-semibold text-lg xl:mt-xl", children: "Disconnect Google Account" }), _jsx(Dialog.Description, { 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(Dialog.Context, { children: (api) => (_jsxs("div", { className: "flex justify-between gap-2 pt-6", children: [_jsx(Button, { variant: "outline", disabled: unlinkGoogleMutation.isPending, onClick: () => api.setOpen(false), children: "Cancel" }), _jsx(Button, { variant: "solid", disabled: unlinkGoogleMutation.isPending, onClick: () => {
204
255
  unlinkGoogleMutation.mutate(account.id);
205
256
  }, children: "Disconnect" })] })) })] }) })] })] }));
206
257
  }
@@ -0,0 +1,12 @@
1
+ import type { ImageProps } from 'next/image';
2
+ export interface BannerEntry {
3
+ src: ImageProps['src'];
4
+ redirectUrl?: string;
5
+ }
6
+ export interface BannerProps {
7
+ banners: BannerEntry[];
8
+ imageWidth?: number | [mobile: number, desktop: number];
9
+ imageHeight?: number | [mobile: number, desktop: number];
10
+ className?: string;
11
+ }
12
+ export declare function Banner__client(props: BannerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,49 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import emblaCarouselAutoplay from 'embla-carousel-autoplay';
4
+ import useEmblaCarousel, {} from 'embla-carousel-react';
5
+ import isMobile from 'is-mobile';
6
+ import Image from 'next/image';
7
+ import Link from 'next/link';
8
+ import { Fragment, useEffect, useState } from 'react';
9
+ import { twMerge } from 'tailwind-merge';
10
+ import { dataAttr } from '../../utils/dataAttr.js';
11
+ export function Banner__client(props) {
12
+ const [emblaRef, emblaApi] = useEmblaCarousel({
13
+ loop: true,
14
+ align: 'start',
15
+ }, [
16
+ emblaCarouselAutoplay({
17
+ playOnInit: true,
18
+ delay: 5000,
19
+ }),
20
+ ]);
21
+ const [currentIndex, setCurrentIndex] = useState(0);
22
+ useEffect(() => {
23
+ function handler(detail) {
24
+ setCurrentIndex(detail?.selectedScrollSnap() ?? 0);
25
+ }
26
+ emblaApi?.on('scroll', handler);
27
+ emblaApi?.on('init', handler);
28
+ return () => {
29
+ emblaApi?.on('init', handler);
30
+ emblaApi?.off('scroll', handler);
31
+ };
32
+ }, [emblaApi]);
33
+ const imageWidth = !props.imageWidth
34
+ ? [400, 1200]
35
+ : Array.isArray(props.imageWidth)
36
+ ? props.imageWidth
37
+ : [props.imageWidth, props.imageWidth];
38
+ const imageHeight = !props.imageHeight
39
+ ? [225, 300]
40
+ : Array.isArray(props.imageHeight)
41
+ ? props.imageHeight
42
+ : [props.imageHeight, props.imageHeight];
43
+ return (_jsxs("div", { className: twMerge('relative', props.className), children: [_jsx("div", { ref: emblaRef, className: "overflow-hidden", children: _jsx("div", { className: "flex gap-2", children: props.banners.map((banner, index) => {
44
+ const img = (_jsx(Image, { src: banner.src, alt: "", width: isMobile() ? imageWidth[0] : imageWidth[1], height: isMobile() ? imageHeight[0] : imageHeight[1], className: "block h-auto w-full", priority: index === 0 }));
45
+ return (_jsx(Fragment, { children: !banner.redirectUrl ? (_jsx("div", { className: "w-full shrink-0", children: img })) : (_jsx(Link, { href: banner.redirectUrl, className: "block w-full shrink-0", "aria-label": `Open ${banner.redirectUrl}`, children: img })) }, index));
46
+ }) }) }), _jsx("div", { className: "absolute bottom-lg left-1/2 flex w-fit -translate-x-1/2 gap-2", children: props.banners.map((_, index) => (_jsx("button", { type: "button", className: "ui-active:bg-brand-500 bg-gray-300 size-3 shrink-0 rounded-full border border-white transition-all duration-300 ui-active:w-9", onClick: () => {
47
+ emblaApi?.scrollTo(index);
48
+ }, "aria-label": `Go to slide ${index + 1}`, "data-active": dataAttr(index === currentIndex) }, index))) })] }));
49
+ }
@@ -31,12 +31,17 @@ export function DepositWithdrawal(props) {
31
31
  const walletQuery = useWalletQuery({
32
32
  refetchInterval: 5000,
33
33
  });
34
- //check if the user has pending/ongoing bonuses
34
+ // biome-ignore lint/correctness/useExhaustiveDependencies: globalStore is stable and doesn't need to be in dependencies
35
35
  useEffect(() => {
36
- if (hasPendingBonus && !globalStore.pendingBonus.shouldShowWarning) {
36
+ if (hasPendingBonus) {
37
37
  globalStore.pendingBonus.setShouldShowWarning(hasPendingBonus);
38
38
  }
39
- }, [hasPendingBonus, globalStore.pendingBonus]);
39
+ return () => {
40
+ if (!hasPendingBonus) {
41
+ globalStore.pendingBonus.setShouldShowWarning(false);
42
+ }
43
+ };
44
+ }, [hasPendingBonus]);
40
45
  return (_jsxs(_Fragment, { children: [_jsx(DepositWithdrawalPropsProvider, { value: props, children: _jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: globalStore.depositWithdrawal.open, onOpenChange: (details) => {
41
46
  globalStore.depositWithdrawal.setOpen(details.open);
42
47
  if (!details.open) {
@@ -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,4 +1,4 @@
1
1
  import { type JackpotsCarouselProps } from './JackpotsCarousel/JackpotsCarousel';
2
2
  import { type JackpotsListProps } from './JackpotsList/JackpotsList';
3
- export type JackpotsProps = JackpotsCarouselProps | JackpotsListProps;
3
+ export type JackpotsProps = (JackpotsCarouselProps | JackpotsListProps);
4
4
  export declare function Jackpots(props: JackpotsProps): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -16,6 +16,17 @@ export interface JackpotsCarouselProps {
16
16
  className?: string | ClassNameEntries;
17
17
  style?: CSSProperties | StyleEntries;
18
18
  animate?: boolean;
19
+ customJackpotChestImage?: {
20
+ image: {
21
+ open: string;
22
+ closed: string;
23
+ };
24
+ style?: {
25
+ wrapper?: string;
26
+ image?: string;
27
+ };
28
+ };
29
+ jackpotProfileShape?: 'oval' | 'star';
19
30
  }
20
31
  export declare function JackpotsCarousel({ style, className, ...props }: JackpotsCarouselProps): import("react/jsx-runtime").JSX.Element | null;
21
32
  export {};
@@ -64,5 +64,5 @@ export function JackpotsCarousel({ style, className, ...props }) {
64
64
  const classNames = isString(className)
65
65
  ? { root: className }
66
66
  : (className ?? {});
67
- return (_jsxs("div", { 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 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.itemRoot, viewAllUrl: props.viewAllUrl, animate: props.animate }) }, jackpot.id))) }) })] }));
67
+ return (_jsxs("div", { 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 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.itemRoot, viewAllUrl: props.viewAllUrl, animate: props.animate, customJackpotChestImage: props.customJackpotChestImage, jackpotProfileShape: props.jackpotProfileShape }) }, jackpot.id))) }) })] }));
68
68
  }
@@ -4,6 +4,17 @@ export interface JackpotsCarouselItemProps {
4
4
  className?: string;
5
5
  /** @default "/jackpots" */
6
6
  viewAllUrl?: string;
7
+ customJackpotChestImage?: {
8
+ image: {
9
+ open: string;
10
+ closed: string;
11
+ };
12
+ style?: {
13
+ wrapper?: string;
14
+ image?: string;
15
+ };
16
+ };
7
17
  animate?: boolean;
18
+ jackpotProfileShape?: 'oval' | 'star';
8
19
  }
9
- export declare function JackpotsCarouselItem({ style, className, viewAllUrl, animate, }: JackpotsCarouselItemProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function JackpotsCarouselItem({ style, className, viewAllUrl, animate, customJackpotChestImage, jackpotProfileShape, }: JackpotsCarouselItemProps): import("react/jsx-runtime").JSX.Element;
@@ -12,6 +12,7 @@ import { useLocaleInfo } from '../../../client/hooks/useLocaleInfo.js';
12
12
  import { ArrowNarrowUpRightIcon } from '../../../icons/ArrowNarrowUpRightIcon.js';
13
13
  import { ChevronLeftIcon } from '../../../icons/ChevronLeftIcon.js';
14
14
  import { ChevronRightIcon } from '../../../icons/ChevronRightIcon.js';
15
+ import { StarIcon } from '../../../icons/StarIcon.js';
15
16
  import { Trophy01Icon } from '../../../icons/Trophy01Icon.js';
16
17
  import { User01Icon } from '../../../icons/User01Icon.js';
17
18
  import closeChest from '../../../images/close-chest.png';
@@ -25,7 +26,7 @@ import { mask } from '../../../utils/mask.js';
25
26
  import { parseDecimal } from '../../../utils/parseDecimal.js';
26
27
  import { useJackpotsCarouselItemContext } from './JackpotsCarouselContext.js';
27
28
  import styles from './JackpotsCarouselItem.module.css';
28
- export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = true, }) {
29
+ export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = true, customJackpotChestImage, jackpotProfileShape = 'oval', }) {
29
30
  const jackpot = useJackpotsCarouselItemContext();
30
31
  const jackpotPayoutsQuery = useJackpotPayoutsQuery({
31
32
  first: 30,
@@ -86,7 +87,13 @@ export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = t
86
87
  currency: localeInfo.currency.code,
87
88
  minDecimalPlaces: 2,
88
89
  maxDecimalPlaces: 2,
89
- }) })] }), _jsx("div", { className: "hidden min-w-25 lg:block" }), _jsx("div", { className: "right-0 bottom-[-60] z-1 min-w-25 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", className: "size-full h-25 w-25 p-2 lg:h-37.5 lg:w-37.5" }) })] }), latestJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex", children: [_jsxs("div", { className: "relative flex h-18 w-18 items-center justify-center rounded-full bg-bg-tertiary", children: [_jsx(User01Icon, { className: "size-9 text-text-quarterary-500" }), _jsxs("div", { className: "absolute right-0 bottom-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 font-bold text-brand-950 text-xs", children: [latestJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs", children: [_jsx(Trophy01Icon, { className: "size-3.5 text-utility-brand-600" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(latestJackpotPayout.member.name, {
90
+ }) })] }), _jsx("div", { className: "hidden min-w-25 lg:block" }), _jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 min-w-25 lg:absolute', customJackpotChestImage?.style?.wrapper), children: _jsx(Image, { width: 150, height: 150, src: customJackpotChestImage?.image
91
+ ? isPayingOut
92
+ ? customJackpotChestImage.image.open
93
+ : customJackpotChestImage.image.closed
94
+ : isPayingOut
95
+ ? openChest
96
+ : closeChest, alt: "closeChest", className: twMerge('size-full h-25 w-25 p-2 lg:h-37.5 lg:w-37.5', customJackpotChestImage?.style?.image) }) })] }), latestJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex", children: [jackpotProfileShape === 'oval' ? (_jsxs("div", { className: "relative flex h-18 w-18 items-center justify-center rounded-full bg-bg-tertiary", children: [_jsx(User01Icon, { className: "size-9 text-text-quarterary-500" }), _jsxs("div", { className: "absolute right-0 bottom-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 font-bold text-brand-950 text-xs", children: [latestJackpotPayout.multiplier, "x"] })] })) : (_jsxs("div", { className: "relative grid h-18 w-18", children: [_jsx(StarIcon, { className: "col-start-1 row-start-1 h-full w-full" }), _jsx(User01Icon, { className: "z-10 col-start-1 row-start-1 size-9 place-self-center text-text-quarterary-500" }), _jsxs("div", { className: "-right-0 absolute bottom-0 z-20 flex h-7 w-7 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 text-center font-bold text-brand-950 text-xs", children: [latestJackpotPayout.multiplier, "x"] })] })), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs", children: [_jsx(Trophy01Icon, { className: "size-3.5 text-utility-brand-600" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(latestJackpotPayout.member.name, {
90
97
  totalCharsCount: 6,
91
98
  }) }), _jsx("div", { className: "text-2xl text-brand-400", children: formatNumber(latestJackpotPayout.amount, {
92
99
  currency: localeInfo.currency.code,
@@ -31,6 +31,17 @@ export interface JackpotsListProps {
31
31
  */
32
32
  viewGamesUrl?: string | ((gameProvider: GameProviderData) => string);
33
33
  animate?: boolean;
34
+ customJackpotChestImage?: {
35
+ image: {
36
+ open: string;
37
+ closed: string;
38
+ };
39
+ style?: {
40
+ wrapper?: string;
41
+ image?: string;
42
+ };
43
+ };
44
+ jackpotProfileShape?: 'oval' | 'star';
34
45
  }
35
46
  export declare function JackpotsList(props: JackpotsListProps): import("react/jsx-runtime").JSX.Element;
36
47
  export {};
@@ -31,5 +31,5 @@ export function JackpotsList(props) {
31
31
  const classNames = isString(props.className)
32
32
  ? { root: props.className }
33
33
  : (props.className ?? {});
34
- return (_jsx(JackpotsListPropsContext, { value: props, children: _jsxs("div", { style: styles.root, className: classNames.root, children: [_jsx("div", { className: "mb-3 font-semibold text-lg lg:mb-4.5", children: props.heading ?? 'Jackpots' }), jackpots.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "hidden flex-col gap-6 lg:flex", children: jackpots.map((jackpot) => (_jsx(JackpotsListItemContext, { value: jackpot, children: _jsx(JackpotsListItemDesktop, { style: styles.itemRoot, className: classNames.itemRoot, animate: props.animate }) }, jackpot.id))) }), _jsx("div", { className: "flex flex-col gap-6 lg:hidden", children: jackpots.map((jackpot) => (_jsx(JackpotsListItemContext, { value: jackpot, children: _jsx(JackpotsListItemMobile, { style: styles.itemRoot, className: classNames.itemRoot, animate: props.animate }) }, jackpot.id))) })] })) : (_jsxs("div", { className: 'mt-5 flex h-fit flex-col items-center justify-center lg:mt-0 lg:h-62', children: [_jsx(Image, { width: 100, height: 100, src: closeChest, alt: "closeChest", className: "size-full h-29.5 w-29.5 mix-blend-luminosity lg:h-25 lg:w-25" }), _jsxs("div", { className: "mt-4 font-semibold text-base text-text-primary-900", children: ["No ", props.heading ?? 'Jackpots'] }), _jsxs("div", { className: "mt-1 text-center text-sm text-text-tertiary-600", children: ["No ", props.heading?.toLocaleLowerCase() ?? 'jackpots', " are running at the moment. ", _jsx("br", {}), "Please check back later!"] })] }))] }) }));
34
+ return (_jsx(JackpotsListPropsContext, { value: props, children: _jsxs("div", { style: styles.root, className: classNames.root, children: [_jsx("div", { className: "mb-3 font-semibold text-lg lg:mb-4.5", children: props.heading ?? 'Jackpots' }), jackpots.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "hidden flex-col gap-6 lg:flex", children: jackpots.map((jackpot) => (_jsx(JackpotsListItemContext, { value: jackpot, children: _jsx(JackpotsListItemDesktop, { style: styles.itemRoot, className: classNames.itemRoot, animate: props.animate, customJackpotChestImage: props.customJackpotChestImage, jackpotProfileShape: props.jackpotProfileShape }) }, jackpot.id))) }), _jsx("div", { className: "flex flex-col gap-6 lg:hidden", children: jackpots.map((jackpot) => (_jsx(JackpotsListItemContext, { value: jackpot, children: _jsx(JackpotsListItemMobile, { style: styles.itemRoot, className: classNames.itemRoot, animate: props.animate, customJackpotChestImage: props.customJackpotChestImage, jackpotProfileShape: props.jackpotProfileShape }) }, jackpot.id))) })] })) : (_jsxs("div", { className: 'mt-5 flex h-fit flex-col items-center justify-center lg:mt-0 lg:h-62', children: [_jsx(Image, { width: 100, height: 100, src: closeChest, alt: "closeChest", className: "size-full h-29.5 w-29.5 mix-blend-luminosity lg:h-25 lg:w-25" }), _jsxs("div", { className: "mt-4 font-semibold text-base text-text-primary-900", children: ["No ", props.heading ?? 'Jackpots'] }), _jsxs("div", { className: "mt-1 text-center text-sm text-text-tertiary-600", children: ["No ", props.heading?.toLocaleLowerCase() ?? 'jackpots', " are running at the moment. ", _jsx("br", {}), "Please check back later!"] })] }))] }) }));
35
35
  }
@@ -3,6 +3,17 @@ interface JackpotsListItemDesktopProps {
3
3
  className?: string;
4
4
  style?: CSSProperties;
5
5
  animate?: boolean;
6
+ customJackpotChestImage?: {
7
+ image: {
8
+ open: string;
9
+ closed: string;
10
+ };
11
+ style?: {
12
+ wrapper?: string;
13
+ image?: string;
14
+ };
15
+ };
16
+ jackpotProfileShape?: 'oval' | 'star';
6
17
  }
7
- export declare function JackpotsListItemDesktop({ animate, ...props }: JackpotsListItemDesktopProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function JackpotsListItemDesktop({ animate, customJackpotChestImage, jackpotProfileShape, ...props }: JackpotsListItemDesktopProps): import("react/jsx-runtime").JSX.Element;
8
19
  export {};
@@ -6,6 +6,7 @@ import { twMerge } from 'tailwind-merge';
6
6
  import { ArrowNarrowUpRightIcon } from '../../../icons/ArrowNarrowUpRightIcon.js';
7
7
  import { ChevronLeftIcon } from '../../../icons/ChevronLeftIcon.js';
8
8
  import { ChevronRightIcon } from '../../../icons/ChevronRightIcon.js';
9
+ import { StarIcon } from '../../../icons/StarIcon.js';
9
10
  import { Trophy01Icon } from '../../../icons/Trophy01Icon.js';
10
11
  import { User01Icon } from '../../../icons/User01Icon.js';
11
12
  import closeChest from '../../../images/close-chest.png';
@@ -22,14 +23,20 @@ import styles from './JackpotsListItem.module.css';
22
23
  import { JackpotsListItemGameProviders } from './JackpotsListItemGameProviders.js';
23
24
  import { JackpotsListItemRules } from './JackpotsListItemRules.js';
24
25
  import { useJackpotsListItemData } from './useJackpotsListItemData.js';
25
- export function JackpotsListItemDesktop({ animate = true, ...props }) {
26
+ export function JackpotsListItemDesktop({ animate = true, customJackpotChestImage, jackpotProfileShape = 'oval', ...props }) {
26
27
  const jackpot = useJackpotsListItemContext();
27
28
  const { jackpotPayouts, topJackpotPayout, filteredGameProviders, localeInfo, isPayingOut, jackpotAmount, arrowImages, getAccumulatingJackpotDescription, } = useJackpotsListItemData();
28
29
  return (_jsxs("div", { className: twMerge('rounded-2xl border border-border-primary bg-bg-tertiary', props.className), children: [_jsxs("div", { style: props.style, className: twMerge('relative flex shrink-0 rounded-2xl p-3 text-center lg:gap-4 lg:p-5'), children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [isPayingOut ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx("span", { className: "full size-1.5 animate-pulse rounded bg-utility-success-500" }), "Paying Out"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "Accumulating"] })), _jsx("div", { className: "mt-1 text-left font-medium text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: "mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl", children: formatNumber(jackpotAmount, {
29
30
  currency: localeInfo.currency.code,
30
31
  minDecimalPlaces: 2,
31
32
  maxDecimalPlaces: 2,
32
- }) })] }), _jsx("div", { className: "min-w-30" }), _jsx("div", { className: "right-0 bottom-[-60] z-1 min-w-30 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", className: "size-full h-25 w-25 p-2 lg:h-37.5 lg:w-37.5" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex", children: [_jsxs("div", { className: "relative flex h-18 w-18 items-center justify-center rounded-full bg-bg-tertiary", children: [_jsx(User01Icon, { className: "size-9 text-text-quarterary-500" }), _jsxs("div", { className: "absolute right-0 bottom-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 font-bold text-brand-950 text-xs", children: [topJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs", children: [_jsx(Trophy01Icon, { className: "size-3.5 text-utility-brand-600" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(topJackpotPayout.member.name, {
33
+ }) })] }), _jsx("div", { className: "min-w-30" }), _jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 min-w-30 lg:absolute', customJackpotChestImage?.style?.wrapper), children: _jsx(Image, { width: 150, height: 150, src: customJackpotChestImage?.image
34
+ ? isPayingOut
35
+ ? customJackpotChestImage.image.open
36
+ : customJackpotChestImage.image.closed
37
+ : isPayingOut
38
+ ? openChest
39
+ : closeChest, alt: "closeChest", className: twMerge('size-full h-25 w-25 p-2 lg:h-37.5 lg:w-37.5', customJackpotChestImage?.style?.image) }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex", children: [jackpotProfileShape === 'oval' ? (_jsxs("div", { className: "relative flex h-18 w-18 items-center justify-center rounded-full bg-bg-tertiary", children: [_jsx(User01Icon, { className: "size-9 text-text-quarterary-500" }), _jsxs("div", { className: "absolute right-0 bottom-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 font-bold text-brand-950 text-xs", children: [topJackpotPayout.multiplier, "x"] })] })) : (_jsxs("div", { className: "relative grid h-18 w-18", children: [_jsx(StarIcon, { className: "col-start-1 row-start-1 h-full w-full" }), _jsx(User01Icon, { className: "z-10 col-start-1 row-start-1 size-9 place-self-center text-text-quarterary-500" }), _jsxs("div", { className: "-right-0 absolute bottom-0 z-20 flex h-7 w-7 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 text-center font-bold text-brand-950 text-xs", children: [topJackpotPayout.multiplier, "x"] })] })), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs", children: [_jsx(Trophy01Icon, { className: "size-3.5 text-utility-brand-600" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(topJackpotPayout.member.name, {
33
40
  totalCharsCount: 6,
34
41
  }) }), _jsx("div", { className: "text-2xl text-brand-400", children: formatNumber(topJackpotPayout.amount, {
35
42
  currency: localeInfo.currency.code,
@@ -3,6 +3,17 @@ interface JackpotsListItemMobileProps {
3
3
  className?: string;
4
4
  style?: CSSProperties;
5
5
  animate?: boolean;
6
+ customJackpotChestImage?: {
7
+ image: {
8
+ open: string;
9
+ closed: string;
10
+ };
11
+ style?: {
12
+ wrapper?: string;
13
+ image?: string;
14
+ };
15
+ };
16
+ jackpotProfileShape?: 'oval' | 'star';
6
17
  }
7
- export declare function JackpotsListItemMobile({ animate, ...props }: JackpotsListItemMobileProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function JackpotsListItemMobile({ animate, customJackpotChestImage, jackpotProfileShape, ...props }: JackpotsListItemMobileProps): import("react/jsx-runtime").JSX.Element;
8
19
  export {};
@@ -9,6 +9,7 @@ import { ArrowNarrowUpIcon } from '../../../icons/ArrowNarrowUpIcon.js';
9
9
  import { ArrowNarrowUpRightIcon } from '../../../icons/ArrowNarrowUpRightIcon.js';
10
10
  import { ChevronLeftIcon } from '../../../icons/ChevronLeftIcon.js';
11
11
  import { ChevronRightIcon } from '../../../icons/ChevronRightIcon.js';
12
+ import { StarIcon } from '../../../icons/StarIcon.js';
12
13
  import { Trophy01Icon } from '../../../icons/Trophy01Icon.js';
13
14
  import { User01Icon } from '../../../icons/User01Icon.js';
14
15
  import closeChest from '../../../images/close-chest.png';
@@ -25,7 +26,7 @@ import styles from './JackpotsListItem.module.css';
25
26
  import { JackpotsListItemGameProviders } from './JackpotsListItemGameProviders.js';
26
27
  import { JackpotsListItemRules } from './JackpotsListItemRules.js';
27
28
  import { useJackpotsListItemData } from './useJackpotsListItemData.js';
28
- export function JackpotsListItemMobile({ animate = true, ...props }) {
29
+ export function JackpotsListItemMobile({ animate = true, customJackpotChestImage, jackpotProfileShape = 'oval', ...props }) {
29
30
  const jackpot = useJackpotsListItemContext();
30
31
  const { jackpotPayouts, topJackpotPayout, filteredGameProviders, localeInfo, isPayingOut, jackpotAmount, arrowImages, getAccumulatingJackpotDescription, } = useJackpotsListItemData();
31
32
  const [isDetailsVisible, setIsDetailsVisible] = useState(false);
@@ -57,7 +58,13 @@ export function JackpotsListItemMobile({ animate = true, ...props }) {
57
58
  currency: localeInfo.currency.code,
58
59
  minDecimalPlaces: 2,
59
60
  maxDecimalPlaces: 2,
60
- }) })] }), _jsx("div", { className: "right-0 bottom-[-60] z-1 block min-w-34.5 lg:absolute", children: _jsx(Image, { width: 100, height: 100, src: isPayingOut ? openChest : closeChest, alt: "closeChest", className: "size-full h-34.5 w-34.5 p-2 lg:h-37.5 lg:w-37.5" }) })] }) }) }) }), _jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "mb-1 flex justify-between", children: [_jsx("div", { className: "font-semibold text-text-primary-900 text-xs", children: formatNumber(0, {
61
+ }) })] }), _jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 block min-w-34.5 lg:absolute', customJackpotChestImage?.style?.wrapper), children: _jsx(Image, { width: 100, height: 100, src: customJackpotChestImage?.image
62
+ ? isPayingOut
63
+ ? customJackpotChestImage.image.open
64
+ : customJackpotChestImage.image.closed
65
+ : isPayingOut
66
+ ? openChest
67
+ : closeChest, alt: "closeChest", className: twMerge('size-full h-34.5 w-34.5 p-2 lg:h-37.5 lg:w-37.5', customJackpotChestImage?.style?.image) }) })] }) }) }) }), _jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "mb-1 flex justify-between", children: [_jsx("div", { className: "font-semibold text-text-primary-900 text-xs", children: formatNumber(0, {
61
68
  currency: localeInfo.currency.code,
62
69
  compact: true,
63
70
  }) }), _jsxs("div", { className: "relative flex items-center justify-end gap-1.5", children: [isPayingOut ? (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-red-flash-1']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-red-flash-2']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-red-flash-3']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) })] })) : (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-green-flash-1']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-green-flash-2']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-green-flash-3']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) })] })), _jsx("div", { className: "font-semibold text-text-primary-900 text-xs", children: formatNumber(jackpot?.maximumJackpotPoolLimit, {
@@ -78,7 +85,7 @@ export function JackpotsListItemMobile({ animate = true, ...props }) {
78
85
  currency: localeInfo.currency.code,
79
86
  compact: true,
80
87
  })} Play now for your chance to win big! 🔥`
81
- : getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "relative mt-4 flex w-full gap-4 rounded-lg bg-bg-primary p-4", children: [_jsxs("div", { className: "relative flex h-18 w-18 items-center justify-center rounded-full bg-bg-tertiary", children: [_jsx(User01Icon, { className: "size-9 text-text-quarterary-500" }), _jsxs("div", { className: "absolute right-0 bottom-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 font-bold text-brand-950 text-xs", children: [topJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs", children: [_jsx(Trophy01Icon, { className: "size-3.5 text-utility-brand-600" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(topJackpotPayout.member.name) }), _jsx("div", { className: "text-2xl text-brand-400", children: formatNumber(topJackpotPayout.amount, {
88
+ : getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "relative mt-4 flex w-full gap-4 rounded-lg bg-bg-primary p-4", children: [jackpotProfileShape === 'oval' ? (_jsxs("div", { className: "relative flex h-18 w-18 items-center justify-center rounded-full bg-bg-tertiary", children: [_jsx(User01Icon, { className: "size-9 text-text-quarterary-500" }), _jsxs("div", { className: "absolute right-0 bottom-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 font-bold text-brand-950 text-xs", children: [topJackpotPayout.multiplier, "x"] })] })) : (_jsxs("div", { className: "relative grid h-18 w-18", children: [_jsx(StarIcon, { className: "col-start-1 row-start-1 h-full w-full" }), _jsx(User01Icon, { className: "z-10 col-start-1 row-start-1 size-9 place-self-center text-text-quarterary-500" }), _jsxs("div", { className: "-right-0 absolute bottom-0 z-20 flex h-7 w-7 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 text-center font-bold text-brand-950 text-xs", children: [topJackpotPayout.multiplier, "x"] })] })), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs", children: [_jsx(Trophy01Icon, { className: "size-3.5 text-utility-brand-600" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(topJackpotPayout.member.name) }), _jsx("div", { className: "text-2xl text-brand-400", children: formatNumber(topJackpotPayout.amount, {
82
89
  currency: localeInfo.currency.code,
83
90
  minDecimalPlaces: 2,
84
91
  maxDecimalPlaces: 2,
@@ -0,0 +1 @@
1
+ export declare function BasicInformation(): import("react/jsx-runtime").JSX.Element;