import type { OAuthProviderInfo } from 'dexie-cloud-common'; import { BehaviorSubject } from 'rxjs'; import { DXCAlert } from '../types/DXCAlert'; import { DXCInputField } from '../types/DXCInputField'; import { DXCUserInteraction } from '../types/DXCUserInteraction'; export interface DXCUserInteractionRequest { type: DXCUserInteraction['type']; title: string; alerts: DXCAlert[]; submitLabel?: string; cancelLabel?: string | null; fields: { [name: string]: DXCInputField; }; } export declare function interactWithUser(userInteraction: BehaviorSubject, req: T): Promise<{ [P in keyof T['fields']]: string; }>; export declare function alertUser(userInteraction: BehaviorSubject, title: string, ...alerts: DXCAlert[]): Promise<{}>; export declare function promptForEmail(userInteraction: BehaviorSubject, title: string, emailHint?: string, initialAlert?: DXCAlert): Promise; export declare function promptForOTP(userInteraction: BehaviorSubject, email: string, alert?: DXCAlert): Promise; export declare function confirmLogout(userInteraction: BehaviorSubject, currentUserId: string, numUnsyncedChanges: number): Promise; /** Result from provider selection prompt */ export type ProviderSelectionResult = { type: 'provider'; provider: string; } | { type: 'otp'; }; /** * Prompts the user to select an authentication method (OAuth provider or OTP). * * This function converts OAuth providers and OTP option into generic DXCOption[] * for the DXCSelect interaction, handling icon fetching and style hints. * * @param userInteraction - The user interaction BehaviorSubject * @param providers - Available OAuth providers * @param otpEnabled - Whether OTP is available * @param title - Dialog title * @param alerts - Optional alerts to display * @returns Promise resolving to the user's selection */ export declare function promptForProvider(userInteraction: BehaviorSubject, providers: OAuthProviderInfo[], otpEnabled: boolean, title?: string, alerts?: DXCAlert[]): Promise;