/**
 * Callback function for user ID change events
 */
type UserIdChangeCallback = (userId: string | undefined) => void;
/**
 * User session client for managing session persistence using localStorage
 * Handles session state persistence and cross-tab synchronization
 */
export declare class UserSessionClient {
    private static readonly USER_ID_STORAGE_KEY;
    private readonly storage;
    private readonly callbacks;
    private cleanupListener?;
    constructor();
    /**
     * Sign in a user with the given user ID
     * @param userId - The user ID to sign in
     */
    signIn(userId: string): void;
    /**
     * Sign out the current user
     */
    signOut(): void;
    /**
     * Subscribe to user ID changes
     * @param callback - Function to call when user ID changes
     * @returns Cleanup function to unsubscribe
     */
    onUserIdChange(callback: UserIdChangeCallback): () => void;
    /**
     * Clean up resources when the client is no longer needed
     */
    destroy(): void;
    /**
     * Get the current user ID from storage
     * @returns User ID or null if not authenticated
     */
    getUserId(): string | undefined;
    /**
     * Set the user ID in storage
     * @param userId - User ID to store, or null to clear
     */
    private setUserId;
    /**
     * Set up storage listener for cross-tab synchronization
     */
    private setupStorageListener;
    /**
     * Notify all registered callbacks of session changes
     */
    private notifyCallbacks;
}
/**
 * Global user session client instance
 */
export declare const userSessionClient: UserSessionClient;
export {};
//# sourceMappingURL=user-session-client.d.ts.map