import { QueryClientConfig, UseQueryOptions } from '../../../.external/lib/@tanstack/react-query'; import { ComponentType, PropsWithChildren } from 'react'; import { Adapters } from '../adapters/types'; import { AuthUser } from '../auth/types'; import { LangProps } from './Contexts/types'; import { AuthDependencies, InfoDependencies } from './hooks/types'; export interface ProviderProps { /** The platform adapters (storage, network, auth transport, file download, OAuth opener, form data) provided to the app. */ adapters: Adapters; /** The base URL for the API. */ baseUrl?: string; /** The props for the QueryClient. See here `https://tanstack.com/query/latest/docs/reference/QueryClient`. */ queryClientProps?: QueryClientConfig; /** The react-query props for the auth. See here `https://tanstack.com/query/latest/docs/framework/react/reference/useQuery`. */ authQueryProps?: Partial>; /** Overrides for the auth dependency functions. */ authParams?: AuthDependencies; /** Overrides for the info dependency functions. */ infoParams?: InfoDependencies; /** Whether to inherit the Mantine theme. */ inheritMantineTheme?: boolean; /** The props for the language context. */ langProps?: LangProps; /** Whether to enable debug mode, which logs additional information to the console. */ debug?: boolean; } export interface WithProviderOptions { /** The display name for the wrapped component. */ displayName?: string; /** Whether to forward refs to the wrapped component. */ forwardRef?: boolean; } export type WithProviderProps

= ProviderProps | ((props: P) => ProviderProps); export type WithProvider =

(providerProps: WithProviderProps

, Component: ComponentType

, options?: WithProviderOptions) => ComponentType

; export type InnerProviderProps = PropsWithChildren;