type NativeUIPromise = Promise; type NativeUIPosition = 'top' | 'center' | 'bottom'; type NativeUISheetActionStyle = 'default' | 'destructive'; interface NativeUIBridge { call(name: string, ...args: any[]): NativeUIPromise; } interface NativeUIResult { status?: string; [key: string]: any; } interface ToastOptions { message: string; durationMs?: number; duration?: 'short' | 'long'; position?: NativeUIPosition; } interface LoadingOptions { id?: string; message?: string; text?: string; cancelable?: boolean; cancelText?: string; } interface LoadingResult extends NativeUIResult { id: string; visible?: boolean; } interface LoadingUpdateOptions { id: string; message?: string; text?: string; } interface LoadingHideOptions { id?: string; } interface NativeUILoadingHandle { id: string; update(messageOrOptions: string | Omit): Promise; hide(): Promise; } interface NativeUILoadingModule { show(messageOrOptions?: string | LoadingOptions): Promise; update(id: string, messageOrOptions: string | Omit): Promise; hide(idOrOptions?: string | LoadingHideOptions): Promise; } interface TextModalOptions { title?: string; message?: string; text?: string; buttonText?: string; } interface AlertOptions extends TextModalOptions { okText?: string; confirmText?: string; } interface DialogResult extends NativeUIResult { action?: string; dismissed?: boolean; } interface ConfirmOptions extends AlertOptions { cancelText?: string; destructive?: boolean; } interface ConfirmResult extends DialogResult { confirmed: boolean; } interface PromptOptions extends ConfirmOptions { placeholder?: string; defaultValue?: string; value?: string; } interface PromptResult extends ConfirmResult { value: string | null; } interface SheetAction { id?: string; value?: string; title?: string; text?: string; label?: string; style?: NativeUISheetActionStyle; } interface SheetOptions { title?: string; message?: string; text?: string; actions: SheetAction[]; cancelText?: string; width?: 'compact' | 'full'; presentationWidth?: 'compact' | 'full'; fullWidth?: boolean; maxWidthDp?: number; horizontalMarginDp?: number; } interface SheetResult extends NativeUIResult { actionId: string | null; index: number; dismissed: boolean; } interface OUIDNativeUIModule { toast(messageOrOptions: string | ToastOptions, options?: Omit): Promise; loading: NativeUILoadingModule; text(options: string | TextModalOptions): Promise; showTextModal(options: string | TextModalOptions): Promise; alert(options: string | AlertOptions): Promise; confirm(options: string | ConfirmOptions): Promise; prompt(options: string | PromptOptions): Promise; sheet(options: SheetOptions): Promise; } declare function createOUIDNativeUI(bridge?: NativeUIBridge): OUIDNativeUIModule; declare function installOUIDNativeUI(bridge?: NativeUIBridge): OUIDNativeUIModule; declare const OUIDNativeUI: OUIDNativeUIModule; declare module '@ouidesigner/ouider' { interface OUIDBridgeExtensions { ui: OUIDNativeUIModule; } } export { type AlertOptions, type ConfirmOptions, type ConfirmResult, type DialogResult, type LoadingHideOptions, type LoadingOptions, type LoadingResult, type LoadingUpdateOptions, type NativeUIBridge, type NativeUILoadingHandle, type NativeUILoadingModule, type NativeUIPosition, type NativeUIPromise, type NativeUIResult, type NativeUISheetActionStyle, OUIDNativeUI, type OUIDNativeUIModule, type PromptOptions, type PromptResult, type SheetAction, type SheetOptions, type SheetResult, type TextModalOptions, type ToastOptions, createOUIDNativeUI, installOUIDNativeUI };