import { type CheckboxChoice, type InputDefinition } from './defs.js'; export type ArrayDefOptions = { /** * A summary of the object to display to the user in a list. * * The default is call `summarizeForEdit` for each item and put them in a comma-separated list, * clipped to 60 characters. */ summarizeForEdit?: (item: T[], context?: unknown[]) => string; /** * Whether duplicates are allowed in the output. The default is false. */ allowDuplicates?: boolean; /** * The minimum number of items required. Defaults to 1. */ minItems?: number; /** * The maximum number of items allowed. The default is to not have a limit. */ maxItems?: number; helpText?: string; }; /** * InputDefinition for an array of items, entered via the supplied `InputDefinition`, `inputDef`. * * @param itemDef Definition used to input or edit a single item. * @param options See definition of `ArrayDefOptions` for more details. */ export declare function arrayDef(name: string, itemDef: InputDefinition, options?: ArrayDefOptions): InputDefinition; /** * Simplified version of type required by `inquirer` for checkbox validation function, which * inquirer does not export. */ export type CheckboxValidateFunction = (choices: readonly CheckboxChoice[]) => true | string; export type CheckboxDefOptions = { /** * A summary of the object to display to the user in a list. * * The default is to call `summarizeForEdit` for each item and put them in a * comma-separated list, clipped to 60 characters. */ summarizeForEdit?: (item: T[], context?: unknown[]) => string; validate?: CheckboxValidateFunction; default?: T[]; helpText?: string; }; type ComplexCheckboxDefItem = { name: string; value: T; }; export type CheckboxDefItem = T extends string ? string | ComplexCheckboxDefItem : ComplexCheckboxDefItem; export declare function checkboxDef(name: string, items: CheckboxDefItem[], options?: CheckboxDefOptions): InputDefinition; export {}; //# sourceMappingURL=array.d.ts.map