import type { Awaitable } from '../type-utils.js' export interface PromptBase { field: string label: string required?: boolean defaultValue?: TValue | ((answers: Record) => TValue) } export interface TextPrompt extends PromptBase { type: 'text' } export type SelectPromptOption = string | { value: string, label: string } export interface SelectPrompt extends PromptBase { type: 'select' options: SelectPromptOption[] | ((search: string, answers: Record) => Awaitable) } export type Prompt = TextPrompt | SelectPrompt