import type { ApiError, User } from '../../../models/interfaces';
import type { ClientSession } from '../../../models/session';
import { getStorageKeys, type StorageInterface } from '../utils/storageHelpers';
import type { OxyServices } from '../../../core';
import type { QueryClient } from '@tanstack/react-query';
export interface UseSessionManagementOptions {
    oxyServices: OxyServices;
    storage: StorageInterface | null;
    storageKeyPrefix?: string;
    loginSuccess: (user: User) => void;
    logoutStore: () => void;
    applyLanguagePreference: (user: User) => Promise<void>;
    onAuthStateChange?: (user: User | null) => void;
    onError?: (error: ApiError) => void;
    setAuthError?: (message: string | null) => void;
    logger?: (message: string, error?: unknown) => void;
    setTokenReady?: (ready: boolean) => void;
    queryClient?: QueryClient | null;
}
export interface UseSessionManagementResult {
    sessions: ClientSession[];
    activeSessionId: string | null;
    setActiveSessionId: (sessionId: string | null) => void;
    updateSessions: (incoming: ClientSession[], options?: {
        merge?: boolean;
    }) => void;
    switchSession: (sessionId: string) => Promise<User>;
    refreshSessions: (activeUserId?: string) => Promise<void>;
    clearSessionState: () => Promise<void>;
    saveActiveSessionId: (sessionId: string) => Promise<void>;
    trackRemovedSession: (sessionId: string) => void;
    storageKeys: ReturnType<typeof getStorageKeys>;
    isRefreshInFlight: boolean;
}
/**
 * Manage session state, persistence, and high-level multi-session operations.
 *
 * @param options - Session management configuration
 */
export declare const useSessionManagement: ({ oxyServices, storage, storageKeyPrefix, loginSuccess, logoutStore, applyLanguagePreference, onAuthStateChange, onError, setAuthError, logger, setTokenReady, queryClient, }: UseSessionManagementOptions) => UseSessionManagementResult;
//# sourceMappingURL=useSessionManagement.d.ts.map