import { type ReactNode } from "react"; import type { AuthCollectionSlug } from "../plugin.js"; import type { PayloadSession } from "./getPayloadSession.js"; export interface PayloadSessionContext { /** * The status of the session */ status: "loading" | "authenticated" | "unauthenticated"; /** * The session */ session: PayloadSession | null; /** * Function to refresh the session */ refresh: () => Promise | null>; /** * Function to refetch the session from the server */ refetch: () => Promise | null>; } export declare const Context: import("react").Context>; interface Props { /** * The slug of the collection that contains the users * * @default "users" */ userCollectionSlug?: TSlug; /** * The session from the server * * @default null */ session?: PayloadSession | null; /** * The children to render */ children: ReactNode; } /** * PayloadSessionProvider that provides the session to the context provider */ export declare const PayloadSessionProvider: ({ userCollectionSlug, session, children, }: Props) => import("react").JSX.Element; export {};