/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
/**
 * @plan PLAN-20250823-AUTHFIXES.P05
 * Qwen 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 QwenOAuthProvider implements OAuthProvider {
    private tokenStore?;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P05
     * @requirement REQ-001.1
     * @pseudocode line 5
     */
    name: string;
    private deviceFlow;
    private initializationState;
    private initializationPromise?;
    private initializationError?;
    private errorHandler;
    private retryHandler;
    private addItem?;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P05
     * @requirement REQ-001.1
     * @pseudocode lines 6-15
     *
     * 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;
    /**
     * Lazy initialization with proper state management
     * Ensures initialization only happens once and handles concurrent calls
     */
    private ensureInitialized;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P05
     * @requirement REQ-001.1
     * @pseudocode lines 17-26
     */
    private initializeToken;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P05
     * @requirement REQ-001.1
     * @pseudocode lines 32-57
     */
    initiateAuth(): Promise<void>;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P05
     * @requirement REQ-001.1
     * @pseudocode lines 27-31
     */
    private isTokenExpired;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P05
     * @requirement REQ-001.1
     * @pseudocode lines 58-59
     */
    getToken(): Promise<OAuthToken | null>;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P05
     * @requirement REQ-001.1
     * @pseudocode lines 61-85
     */
    refreshIfNeeded(): Promise<OAuthToken | null>;
    /**
     * @plan PLAN-20250823-AUTHFIXES.P05
     * @requirement REQ-001.1
     * @pseudocode lines 87-89
     */
    logout(): Promise<void>;
}
