import { type MinimalClerkClient } from "jazz-tools"; /** * Authentication state returned by {@link useClerkAuth}. * * - `"anonymous"`: User is not authenticated with Jazz (may or may not be signed into Clerk) * - `"signedIn"`: User is authenticated with both Clerk and Jazz */ export type ClerkAuth = { state: "anonymous" | "signedIn"; }; /** * Registers a Clerk authentication listener and provides reactive auth state. * * Must be used within a component that is a child of `JazzSvelteProvider`. * Automatically syncs Clerk authentication state with Jazz. * * @example * ```svelte * * * {#if auth.state === "signedIn"} *
Welcome back!
* {:else} *Please sign in
* {/if} * ``` * * @param clerk - The Clerk client instance * @returns An object with a reactive `state` property * @throws Error if used in guest mode * @category Auth Providers */ export declare function useClerkAuth(clerk: MinimalClerkClient): ClerkAuth; //# sourceMappingURL=ClerkAuth.svelte.d.ts.map