import type { Answers, ChoiceOptions } from 'inquirer'; import type { PromptQuestion, AnswerValue, PromptListChoices } from '../types.js'; import type { UISelectableOption } from '@sap-ux/ui-components'; /** * Method finds dependant question names for passed question. * Method goes into recursion and finds dependant questions on deeper levels. * * @param questions - All questions * @param name - Question name for which dependant question names should be resolved * @param dependantPromptNames - Existing dependant names to update * @returns Found dependant question names for passed question. */ export declare function getDependantQuestions(questions: PromptQuestion[], name: string, dependantPromptNames?: string[]): string[]; /** * Method finds all dynamic questions. * * @param questions - All questions * @returns Found dynamic questions. */ export declare function getDynamicQuestions(questions: PromptQuestion[]): string[]; /** * Method updates answer value and resets dependant questions answer. * * @param answers - Latest answers * @param questions - All questions * @param name - Answer to update * @param value - New value of answer * @returns New reference of updated answers. */ export declare function updateAnswers(answers: Answers, questions: PromptQuestion[], name: string, value?: AnswerValue): Answers; /** * Method updates single answer in answers object. * * @param answers - Answers to update * @param path - Path to answer * @param value - Value of answer * @returns Updated answers. */ export declare function setAnswer(answers: Answers, path: string, value: unknown): Answers; /** * Method gets answer value by passed path. * * @param answers - All answers * @param path - Path to answer * @returns Answer value. */ export declare function getAnswer(answers: Answers, path: string): unknown; /** * Method convert choices(inquirer) to dropdown/combobox options(ui-components). * * @param choices - Array of choices * @returns Returns dropdown/combobox options. */ export declare function convertChoicesToOptions(choices: PromptListChoices): UISelectableOption[]; /** * Method deeply compares two answers objects. * * @param obj1 - First object with answers * @param obj2 - Second object with answers * @returns True if objects are same. */ export declare function isDeepEqual(obj1: Answers, obj2: Answers): boolean; //# sourceMappingURL=utils.d.ts.map