import { OrganizationAuthClient } from '../../../compat/better-auth/react.js'; export interface OrganizationRootLocalization { settings: { cancel: string; saveChanges: string; }; } /** * Auth client that can drive organization plugin hooks. * Prefer creating clients with the organization plugin so this is structural. */ export type OrganizationCapableAuthClient = OrganizationAuthClient; export interface UseOrganizationAuthOptions { /** * Explicit organization-capable auth client; falls back to `AuthProvider` * via `useAuth()`. Prefer typed package clients over `unknown` casts. */ authClient?: OrganizationCapableAuthClient | null; } export interface UseOrganizationAuthResult { /** True when a usable auth client is available. */ isReady: boolean; /** Typed organization client (may be a cast empty object when not ready). */ organizationClient: OrganizationAuthClient; /** Plugin localization (roles, member copy, etc.). */ organizationLocalization: Record; /** * Organization plugin policy. False hides personal scope and refuses * `setActive({ organizationId: null })`. Defaults to true. */ personalAccount: boolean; /** Resolved client from prop or provider; null when missing. */ resolvedAuthClient: OrganizationCapableAuthClient | null; /** Configured role labels from the organization plugin. */ roles: Record | undefined; /** Root auth localization (settings.cancel, saveChanges, …). */ rootLocalization: OrganizationRootLocalization; /** Whether slug availability should be checked before create/update. */ shouldCheckSlug: boolean; } /** * Shared auth wiring for organization surfaces. * * Resolves the auth client from an optional prop or `AuthProvider`, and reads * organization plugin localization/roles in one place. */ export declare function useOrganizationAuth(options?: UseOrganizationAuthOptions): UseOrganizationAuthResult;