'use client'; import { convexClient } from "@convex-dev/better-auth/client/plugins"; import { ConvexReactClient } from "convex/react"; import { ReactNode } from "react"; import * as react_jsx_runtime0 from "react/jsx-runtime"; import { AuthClient, AuthClient as AuthClient$1 } from "@convex-dev/better-auth/react"; //#region src/auth-client/convex-auth-provider.d.ts type ConvexAuthProviderProps = { children: ReactNode; /** Convex client instance */ client: ConvexReactClient; /** Better Auth client instance */ authClient: AuthClient$1; /** Initial session token (from SSR) */ initialToken?: string; /** Callback when mutation called while unauthorized */ onMutationUnauthorized?: () => void; /** Callback when query called while unauthorized */ onQueryUnauthorized?: (info: { queryName: string; }) => void; /** Custom function to detect UNAUTHORIZED errors. Default checks code property. */ isUnauthorized?: (error: unknown) => boolean; }; /** * Unified auth provider for Convex + Better Auth. * Handles token sync, HMR persistence, and auth callbacks. * * Structure: AuthProvider wraps ConvexAuthProviderInner so that * useAuthStore() is available when creating fetchAccessToken. */ declare function ConvexAuthProvider({ children, client, authClient, initialToken, onMutationUnauthorized, onQueryUnauthorized, isUnauthorized }: ConvexAuthProviderProps): react_jsx_runtime0.JSX.Element; //#endregion export { type AuthClient, ConvexAuthProvider, ConvexAuthProviderProps, convexClient };