import { QueryList, ElementRef, AfterViewChecked } from "@angular/core";
import { ControlValueAccessor } from "@angular/forms";
export interface RadioGroupItem {
/** The label or text to be displayed in the list */
label?: string;
/**
* A Custom template as html string to be used instead of label and description.
*
* Example: "Hello"
*/
customTemplate?: string;
/** optional description to be displayed next to the label */
description?: string;
/** any value which should be tied to the item */
value: any;
/** optional disabled flag. Will show the item grayed out and disabled */
disabled?: boolean;
}
interface UniqueItem {
id: string;
optionItem: RadioGroupItem;
selected: boolean;
}
interface DisplayItem extends UniqueItem {
className: string;
}
/** Use radio buttons when users must select one option in a list with exclusive options out of a set of two or more options. Radio buttons are common to use in forms, i.e when you apply for a loan and need to enter "Yes" or "No". */
export declare class RadioGroupComponent implements ControlValueAccessor, AfterViewChecked {
/** List of radio group items */
set list(value: RadioGroupItem[]);
get list(): RadioGroupItem[];
private _list;
/** Element name */
name?: string;
/** Element label */
label?: string;
/** Element class name */
className?: string;
/** Property sets whether radio group is disabled */
disabled?: boolean;
/** Property sets whether radio group is condensed */
condensed?: boolean;
/** Property sets whether radio group is inline */
inline?: boolean;
private onTouchedCallback;
private onChangeCallback;
private _selectedValue;
set selectedValue(state: RadioGroupItem);
get selectedValue(): RadioGroupItem;
radioRefs: QueryList;
/** has the currently selected element been focused already */
private didFocus;
ngAfterViewChecked(): void;
/**
* FOCUS CURRENT ITEM:
* Find which of the radio buttons is currently selected (if any) and sets it to focus
*/
focusCurrentItem(): void;
/** array of radio-group item elements with a unique id, the original optionItem and calculated selected property */
uniqueList: Array;
/** Array of radio-group item elements which should be displayed in the current render cycle */
displayList: Array;
/** Array of all radio-group item which are currently selected */
selectedList: Array;
/** internal generate helper array function. Should be run on every change where the helper arrays need to be regenerated */
private _generateHelperArrays;
/** Function which handles the logic of setting the non-native onChange prop (and sets the internal selected value as well) */
handleOnChange(value: RadioGroupItem): void;
/** Function containing the select radio-group item logic */
optionItemSelected(item: RadioGroupItem): void;
handleItemOnClick(item: DisplayItem): void;
writeValue(value: any): void;
registerOnChange(fn: any): void;
registerOnTouched(fn: any): void;
}
export {};