/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
/**
 * Anthropic OAuth Provider Implementation
 */
import { OAuthProvider } from './oauth-manager.js';
import { OAuthToken, TokenStore } from '@vybestack/llxprt-code-core';
import { HistoryItemWithoutId } from '../ui/types.js';
export declare class AnthropicOAuthProvider implements OAuthProvider {
    private _tokenStore?;
    name: string;
    private deviceFlow;
    private authCodeResolver?;
    private authCodeRejecter?;
    private pendingAuthPromise?;
    private initializationState;
    private initializationPromise?;
    private initializationError?;
    private errorHandler;
    private retryHandler;
    private logger;
    private addItem?;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P06
     * @requirement REQ-001.1
     * @pseudocode lines 7-10
     *
     * Constructor completes synchronously - no async calls
     */
    constructor(_tokenStore?: TokenStore | undefined, addItem?: (itemData: Omit<HistoryItemWithoutId, 'id'>, baseTimestamp: number) => number);
    /**
     * Set the addItem callback for displaying messages in the UI
     */
    setAddItem(addItem: (itemData: Omit<HistoryItemWithoutId, 'id'>, baseTimestamp: number) => number): void;
    /**
     * Wait for authorization code from UI dialog
     */
    waitForAuthCode(): Promise<string>;
    /**
     * Submit authorization code from UI dialog
     */
    submitAuthCode(code: string): void;
    /**
     * Cancel OAuth flow
     */
    cancelAuth(): void;
    /**
     * Lazy initialization with proper state management
     * Ensures initialization only happens once and handles concurrent calls
     */
    private ensureInitialized;
    initiateAuth(): Promise<void>;
    /**
     * Complete authentication with the authorization code
     * @pseudocode lines 60-62: Save token after successful auth
     */
    completeAuth(authCode: string): Promise<void>;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P08
     * @requirement REQ-001.1
     * @pseudocode lines 17-25
     */
    initializeToken(): Promise<void>;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P08
     * @requirement REQ-001.1
     * @pseudocode lines 71-72
     */
    getToken(): Promise<OAuthToken | null>;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P08
     * @requirement REQ-001.1
     * @pseudocode lines 74-98
     */
    refreshIfNeeded(): Promise<OAuthToken | null>;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P08
     * @requirement REQ-002.1
     * @pseudocode lines 100-112
     */
    logout(): Promise<void>;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P08
     * @requirement REQ-003.1
     * @pseudocode lines 27-30
     */
    private isTokenExpired;
}
