/**
 * Project Selection Handler
 *
 * Manages interactive project selection prompts during OAuth flow.
 * Parses CLIProxyAPI stdout for project lists and coordinates
 * between backend (stdin writer) and frontend (WebSocket/UI).
 */
/// <reference types="node" />
import { EventEmitter } from 'events';
/**
 * Parsed project from CLIProxyAPI output
 */
export interface GCloudProject {
    id: string;
    name: string;
    index: number;
}
/**
 * Project selection prompt data sent to UI
 */
export interface ProjectSelectionPrompt {
    sessionId: string;
    provider: string;
    projects: GCloudProject[];
    defaultProjectId: string;
    supportsAll: boolean;
}
/**
 * Project selection response from UI
 */
export interface ProjectSelectionResponse {
    sessionId: string;
    selectedId: string;
}
export declare const projectSelectionEvents: EventEmitter<[never]>;
/**
 * Parse project list from CLIProxyAPI stdout
 *
 * Expected format:
 * "Available Google Cloud projects:
 *  [1] project-id-123 (Project Name)
 *  [2] another-project (Another Name)
 *  Type 'ALL' to onboard every listed project."
 */
export declare function parseProjectList(output: string): GCloudProject[];
/**
 * Parse default project ID from prompt
 *
 * Expected format: "Enter project ID [default-project-id] or ALL:"
 */
export declare function parseDefaultProject(output: string): string | null;
/**
 * Check if output contains project selection prompt
 */
export declare function isProjectSelectionPrompt(output: string): boolean;
/**
 * Check if output contains project list
 */
export declare function isProjectList(output: string): boolean;
/**
 * Generate unique session ID for OAuth flow
 */
export declare function generateSessionId(): string;
/**
 * Request project selection from UI
 * Returns promise that resolves when user selects a project
 *
 * @param prompt - Project selection prompt data
 * @returns Promise<string> - Selected project ID or 'ALL', or default if timeout
 */
export declare function requestProjectSelection(prompt: ProjectSelectionPrompt): Promise<string>;
/**
 * Submit project selection from UI
 *
 * @param response - Selection response with session ID and selected project
 * @returns boolean - True if selection was accepted
 */
export declare function submitProjectSelection(response: ProjectSelectionResponse): boolean;
/**
 * Cancel pending project selection
 */
export declare function cancelProjectSelection(sessionId: string): boolean;
/**
 * Get pending project selection prompt
 */
export declare function getPendingSelection(sessionId: string): ProjectSelectionPrompt | null;
/**
 * Check if there's a pending selection
 */
export declare function hasPendingSelection(sessionId: string): boolean;
declare const _default: {
    parseProjectList: typeof parseProjectList;
    parseDefaultProject: typeof parseDefaultProject;
    isProjectSelectionPrompt: typeof isProjectSelectionPrompt;
    isProjectList: typeof isProjectList;
    generateSessionId: typeof generateSessionId;
    requestProjectSelection: typeof requestProjectSelection;
    submitProjectSelection: typeof submitProjectSelection;
    cancelProjectSelection: typeof cancelProjectSelection;
    getPendingSelection: typeof getPendingSelection;
    hasPendingSelection: typeof hasPendingSelection;
    projectSelectionEvents: EventEmitter<[never]>;
};
export default _default;
//# sourceMappingURL=project-selection-handler.d.ts.map