import { ServerName, ServerType, McVersion, Memory, WorldOptions, Server, World } from '../../../domain/index.js'; import type { WorldWithServerStatus } from './IWorldRepository.js'; /** * Prompt Port - Outbound Port * Interface for user interaction/prompts */ export interface IPromptPort { /** * Show introduction message */ intro(message: string): void; /** * Show conclusion message */ outro(message: string): void; /** * Text input prompt */ text(options: TextPromptOptions): Promise; /** * Select from options */ select(options: SelectPromptOptions): Promise; /** * Confirm yes/no prompt */ confirm(options: ConfirmPromptOptions): Promise; /** * Password input prompt (masked) */ password(options: PasswordPromptOptions): Promise; /** * Prompt for server name with validation */ promptServerName(): Promise; /** * Prompt for server type selection */ promptServerType(): Promise; /** * Prompt for Minecraft version */ promptMcVersion(serverType: ServerType): Promise; /** * Prompt for memory allocation */ promptMemory(defaultValue?: string): Promise; /** * Prompt for world options (new/existing/download) */ promptWorldOptions(): Promise; /** * Prompt for server selection from list */ promptServerSelection(servers: Server[]): Promise; /** * Prompt for world selection from list */ promptWorldSelection(worlds: World[]): Promise; /** * Prompt for existing world selection with availability status * Shows worlds categorized by: available, stopped server, running server * @param worlds - List of worlds with their server status * @returns Selected world or null if cancelled/no selection */ promptExistingWorldSelection(worlds: WorldWithServerStatus[]): Promise; /** * Prompt for initial whitelist players * Called only after the user chose to enable the whitelist (off by default) * @returns Array of player names to whitelist (empty array = whitelist enabled, no players) */ promptWhitelistPlayers(): Promise; /** * Prompt for modpack slug (project identifier) */ promptModpackSlug(): Promise; /** * Prompt for modpack version (optional) */ promptModpackVersion(): Promise; /** * Prompt for modpack loader (optional) * @param availableLoaders - If provided, only show these loaders as options */ promptModpackLoader(availableLoaders?: string[]): Promise; /** * Prompt for mods to exclude from the modpack (optional). * Used to drop client-only mods that crash a dedicated server. * Returns undefined when nothing is excluded. */ promptModpackExcludeFiles(): Promise; /** * Start a spinner with message */ spinner(): Spinner; /** * Display success message */ success(message: string): void; /** * Display error message */ error(message: string): void; /** * Display warning message */ warn(message: string): void; /** * Display info message */ info(message: string): void; /** * Display note */ note(message: string, title?: string): void; /** * Check if user cancelled */ isCancel(value: unknown): boolean; /** * Handle user cancellation */ handleCancel(): never; } /** * Text prompt options */ export interface TextPromptOptions { message: string; placeholder?: string; initialValue?: string; validate?: (value: string) => string | void; } /** * Select prompt options */ export interface SelectPromptOptions { message: string; options: SelectOption[]; initialValue?: T; } /** * Select option */ export interface SelectOption { value: T; label: string; hint?: string; } /** * Confirm prompt options */ export interface ConfirmPromptOptions { message: string; initialValue?: boolean; } /** * Password prompt options */ export interface PasswordPromptOptions { message: string; mask?: string; validate?: (value: string) => string | void; } /** * Spinner interface */ export interface Spinner { start(message?: string): void; stop(message?: string): void; message(message: string): void; } //# sourceMappingURL=IPromptPort.d.ts.map