/**
 * @license
 * Copyright 2025 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import type { Config } from '@hoptrendy/hopcode-core';
import { AuthType, CodingPlanRegion } from '@hoptrendy/hopcode-core';
import type { LoadedSettings } from '../../config/settings.js';
export interface OpenAICredentials {
    apiKey: string;
    baseUrl?: string;
    model?: string;
}
import { AuthState } from '../types.js';
import type { HistoryItem } from '../types.js';
import { type AlibabaStandardRegion } from '../../constants/alibabaStandardApiKey.js';
/**
 * Generate a Qwen-managed env key from protocol and base URL.
 * Format: QWEN_CUSTOM_API_KEY_${PROTOCOL}_${NORMALIZED_BASE_URL}
 */
export declare function generateCustomApiKeyEnvKey(protocol: string, baseUrl: string): string;
/**
 * Normalize model IDs: split by comma, trim, deduplicate, remove empty.
 */
export declare function normalizeCustomModelIds(modelIdsInput: string): string[];
/**
 * Mask an API key for display: show first 3 and last 4 chars.
 */
export declare function maskApiKey(apiKey: string): string;
export type { QwenAuthState } from '../hooks/useQwenAuth.js';
export declare const useAuthCommand: (settings: LoadedSettings, config: Config, addItem: (item: Omit<HistoryItem, "id">, timestamp: number) => void, onAuthChange?: () => void) => {
    authState: AuthState;
    setAuthState: import("react").Dispatch<import("react").SetStateAction<AuthState>>;
    authError: string;
    onAuthError: (error: string | null) => void;
    isAuthDialogOpen: boolean;
    isAuthenticating: boolean;
    pendingAuthType: AuthType;
    externalAuthState: {
        title: string;
        message: string;
        detail?: string;
    };
    qwenAuthState: import("../hooks/useHopCodeAuth.js").HopCodeAuthState;
    handleAuthSelect: (authType: AuthType | undefined, credentials?: OpenAICredentials) => Promise<void>;
    handleCodingPlanSubmit: (apiKey: string, region?: CodingPlanRegion) => Promise<void>;
    handleAlibabaStandardSubmit: (apiKey: string, region: AlibabaStandardRegion, modelIdsInput: string) => Promise<void>;
    handleOpenRouterSubmit: () => Promise<void>;
    handleCustomApiKeySubmit: (protocol: AuthType.USE_OPENAI | AuthType.USE_ANTHROPIC | AuthType.USE_GEMINI, baseUrl: string, apiKey: string, modelIdsInput: string, generationConfig?: {
        enableThinking?: boolean;
        multimodal?: {
            image?: boolean;
            video?: boolean;
            audio?: boolean;
        };
        maxTokens?: number;
    }) => Promise<void>;
    openAuthDialog: () => void;
    cancelAuthentication: () => void;
};
