import type { NextPage } from 'next'; import type { AppProps as NextAppProps } from 'next/app'; import type { ReactElement, ReactNode } from 'react'; import type { MessageFormatElement } from 'react-intl'; import type { VALID_THEMES } from '../utils/constants'; export type NextPageWithLayoutOptions = { isHome?: boolean; }; export type NextPageWithLayout = NextPage & { getLayout?: ( page: ReactElement, options: NextPageWithLayoutOptions ) => ReactNode; }; // modified version - allows custom pageProps type, falling back to 'unknown' type AppProps

= { pageProps: P; } & Omit, 'pageProps'>; type CustomPageProps = { translation: Record | Record; }; export type AppPropsWithLayout = AppProps & { Component: NextPageWithLayout; }; export type Position = 'bottom' | 'center' | 'left' | 'right' | 'top'; /** Spacing keys defined has CSS variables */ export type Spacing = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'; export type Validator = (value: unknown) => value is T; export type AckeeTrackerValue = 'full' | 'partial'; export type Theme = (typeof VALID_THEMES)[number];