import { createAuthManager, AuthConfig, UserInfo, TokenPayload } from '../../auth/index';
export type { AuthConfig, UserInfo, TokenPayload };
type AuthManager = ReturnType<typeof createAuthManager>;
export interface UseAuthResult {
    /** The underlying auth manager instance. */
    manager: AuthManager;
    /** True when a valid, non-expired access token is present. */
    isAuthenticated: boolean;
    /** Decoded user info extracted from the JWT payload, or null. */
    user: UserInfo | null;
    /** Re-read auth state from the manager (useful after external mutations). */
    refresh: () => void;
    /**
     * Perform a token refresh using the stored refresh token.
     * Resolves to the new access token, or null on failure.
     */
    refreshToken: () => Promise<string | null>;
    /** Clear tokens and call the server logout endpoint. */
    logout: () => Promise<void>;
}
/**
 * @param config - Optional AuthConfig.  When omitted the module-level default
 *   manager is used (shared with other consumers in the same app).  Pass an
 *   explicit config to get an isolated manager instance.
 */
export declare function useAuth(config?: AuthConfig): UseAuthResult;
//# sourceMappingURL=useAuth.d.ts.map