import { ControlValueAccessor } from '@angular/forms'; /** * This Component displays questions one after an other. * The only possible answers are yes or no. * After the last question, a templatable screen is diplayed. * * @example * */ export declare class YesNoListComponent implements ControlValueAccessor { /** * Model where are stored the answers */ _answers: Object; /** * Main question displayed */ question: string; /** * Callback called on last question reached */ callback: Function; /** * Subquestions/propositions provided as an array */ itemsList: any; answers: Object; /** * Subquestions/propositions stored ordered by their "orderInGroup" */ sortedItemsList: any[]; /** * ID of the current displayed item */ currentItem: number; /** * Percentage of the questionary reached */ progress: string; /** * Constructor of the components, * set the current item to 0 */ constructor(); private resolveCurrentItem(); /** * Increment the progress bar until the last item is clicked, * Then, increments currentItem if it's not the last one, or execute the callback. */ nextItem(): void; /** * Saves the answer to the current question as a yes. * Then, call the nextItem method. */ answerYes(): void; /** * Saves the answer to the current question as a no. * Then, call the nextItem method. */ answerNo(): void; /** * This method is part of ControlValueAccessor interface. * Its role is to set value from the model to the DOM * * @param value Value given from the model */ writeValue(value: any): void; /** * This method is part of ControlValueAccessor interface. * Its role is to set the function that will propagate changes from the DOM to the model. * * @param fn {function} Angular internal function */ registerOnChange(fn: any): void; /** * This method is part of ControlValueAccessor interface. * Not used here */ registerOnTouched(): void; /** * Container for the propagation function. */ propagateChange: (_: any) => void; }