import { EventEmitter, OnInit, OnDestroy } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { SelectionModel } from '@angular/cdk/collections'; import { Subject } from 'rxjs'; import { FieldConfig } from '../../models/field-config.model'; import { FormField } from '../../models/form-field.model'; import { CheckboxOption, IconButton } from '@ieeesa-npm/models'; import { FormUtilityService } from '../../services/form-utility.service'; import * as i0 from "@angular/core"; /** * Provides implementation of all types of checkboxes. * @export * @class CheckboxComponent * @implements {OnInit} * @implements {FormField} */ export declare class CheckboxComponent implements OnInit, FormField, OnDestroy { private formUtilityService; config: FieldConfig; group: FormGroup; private _checkboxes; isLabelNeeded: boolean; /** * Input property to get checkbox options. * @memberof CheckboxComponent * @usageNotes const checkboxes = [{ id: 1, name:"Angular"}] */ set checkboxes(value: CheckboxOption[]); get checkboxes(): CheckboxOption[]; set recreateCheckboxOptionsControl(value: CheckboxOption[]); selectedCheckboxesInfo: SelectionModel; checkboxSelection: EventEmitter; checkboxOptionsAndSelection: EventEmitter; selectedCheckboxes: EventEmitter; ctaButtonClick: EventEmitter; destroy$: Subject; constructor(formUtilityService: FormUtilityService); /** * Implementation of ngOnInit lifecycle hook method of component to initialize component instance properties * and emits whenever the checkboxes selection state changes * @memberof CheckboxComponent */ ngOnInit(): void; /** * Recreate form controls whenever the new set of checkboxes are loaded when component is already initialized * @memberof CheckboxComponent */ recreateFormControl(): void; /** * Creates form group and initializes components properties from config. * @memberof CheckboxComponent */ createFormGroupAndInitializeProperties(): void; /** * Sets checkbox selection and emits selected option on change event. * @param {CheckboxOption} option * @param {boolean} checked * @memberof CheckboxComponent */ onChange(option: CheckboxOption, checked: boolean): void; /** * Allows Angular to detect the specific checkbox option that needs to change or be added instead of rebuilding the whole checkbox options in DOM by tracking option unique Id. * @param {number} index * @return {number} * @memberof CheckboxComponent */ trackById(index: number, option: CheckboxOption | IconButton): number | string; /** * Emits ctaButtonClick event along with clicked button information. * @param {IconButton} event * @memberof CheckboxComponent */ onCheckboxCTAButtonClick(event: IconButton): void; /** * NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed. * @memberof CheckboxComponent */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }