import type { ApiError, User } from '../../../models/interfaces';
import type { AuthState } from '../../stores/authStore';
import type { ClientSession } from '../../../models/session';
import type { StorageInterface } from '../utils/storageHelpers';
import type { OxyServices } from '../../../core';
export interface UseAuthOperationsOptions {
    oxyServices: OxyServices;
    storage: StorageInterface | null;
    sessions: ClientSession[];
    activeSessionId: string | null;
    setActiveSessionId: (sessionId: string | null) => void;
    updateSessions: (sessions: ClientSession[], options?: {
        merge?: boolean;
    }) => void;
    saveActiveSessionId: (sessionId: string) => Promise<void>;
    clearSessionState: () => Promise<void>;
    switchSession: (sessionId: string) => Promise<User>;
    applyLanguagePreference: (user: User) => Promise<void>;
    onAuthStateChange?: (user: User | null) => void;
    onError?: (error: ApiError) => void;
    loginSuccess: (user: User) => void;
    loginFailure: (message: string) => void;
    logoutStore: () => void;
    setAuthState: (state: Partial<AuthState>) => void;
    setIdentitySynced: (synced: boolean) => void;
    setSyncing: (syncing: boolean) => void;
    logger?: (message: string, error?: unknown) => void;
}
export interface UseAuthOperationsResult {
    /** Create a new identity locally (offline-first) and optionally sync with server */
    createIdentity: () => Promise<{
        recoveryPhrase: string[];
        synced: boolean;
    }>;
    /** Import an existing identity from recovery phrase */
    importIdentity: (phrase: string) => Promise<{
        synced: boolean;
    }>;
    /** Sign in with existing identity on device */
    signIn: (deviceName?: string) => Promise<User>;
    /** Logout from current session */
    logout: (targetSessionId?: string) => Promise<void>;
    /** Logout from all sessions */
    logoutAll: () => Promise<void>;
    /** Check if device has an identity stored */
    hasIdentity: () => Promise<boolean>;
    /** Get the public key of the stored identity */
    getPublicKey: () => Promise<string | null>;
    /** Check if identity is synced with server */
    isIdentitySynced: () => Promise<boolean>;
    /** Sync local identity with server (when online) */
    syncIdentity: () => Promise<User>;
}
/**
 * Authentication operations using public key cryptography.
 * No passwords required - identity is based on ECDSA key pairs.
 */
export declare const useAuthOperations: ({ oxyServices, storage, sessions, activeSessionId, setActiveSessionId, updateSessions, saveActiveSessionId, clearSessionState, switchSession, applyLanguagePreference, onAuthStateChange, onError, loginSuccess, loginFailure, logoutStore, setAuthState, setIdentitySynced, setSyncing, logger, }: UseAuthOperationsOptions) => UseAuthOperationsResult;
//# sourceMappingURL=useAuthOperations.d.ts.map