import { FocusMonitor } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import { UniqueSelectionDispatcher } from '@angular/cdk/collections'; import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { HasTabIndexCtor, TypeRef } from '@sbb-esta/angular-core/common-behaviors'; import type { SbbRadioGroup } from './radio-group.directive'; /** Change event object emitted by RadioButtonComponent. */ export declare class SbbRadioChange { /** The RadioButtonComponent that emits the change event. */ source: SbbRadioButton; /** The value of the RadioButtonComponent. */ value: any; constructor( /** The RadioButtonComponent that emits the change event. */ source: SbbRadioButton, /** The value of the RadioButtonComponent. */ value: any); } /** @docs-private */ declare abstract class RadioButtonBase { abstract disabled: boolean; } declare const _RadioButtonMixinBase: HasTabIndexCtor & typeof RadioButtonBase; export declare abstract class SbbRadioButton extends _RadioButtonMixinBase implements OnInit, AfterViewInit, OnDestroy { readonly radioGroup: TypeRef; protected readonly _changeDetector: ChangeDetectorRef; private _elementRef; private _focusMonitor; private _radioDispatcher; private _uniqueId; /** The id of this component. */ id: string; /** Id for the inner input field. */ get inputId(): string; /** Analog to HTML 'name' attribute used to group radios for unique selection. */ name: string; /** Used to set the 'aria-label' attribute on the underlying input element. */ ariaLabel: string; /** @docs-private */ _ariaLabelAttr: null; /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */ ariaLabelledby: string; /** @docs-private */ _arialabelledbyAttr: null; /** The 'aria-describedby' attribute is read after the element's label and field type. */ ariaDescribedby: string; /** @docs-private */ _ariadescribedbyAttr: null; /** * Needs to be -1 so the `focus` event still fires. * @docs-private */ _tabIndexAttr: number; /** Whether this radio button is checked. */ get checked(): boolean; set checked(value: boolean); /** The value of this radio button. */ get value(): any; set value(value: any); /** Whether the radio button is disabled. */ get disabled(): boolean; set disabled(value: boolean); /** Whether the radio button is required. */ get required(): boolean; set required(value: boolean); /** * Event emitted when the checked state of this radio button changes. * Change events are only emitted when the value changes due to user interaction with * the radio button (the same behavior as ``). */ readonly change: EventEmitter; /** The native `` element */ _inputElement: ElementRef; private _disabled; private _required; private _checked; private _value; /** Unregister function for _radioDispatcher */ private _removeUniqueSelectionListener; constructor(radioGroup: TypeRef, _changeDetector: ChangeDetectorRef, _elementRef: ElementRef, _focusMonitor: FocusMonitor, _radioDispatcher: UniqueSelectionDispatcher); /** Focuses the radio button. */ focus(options?: FocusOptions): void; /** * Note: under normal conditions focus shouldn't land on this element, however it may be * programmatically set, for example inside of a focus trap, in this case we want to forward * the focus to the native element. * @docs-private */ _forwardFocus(): void; /** * Marks the radio button as needing checking for change detection. * This method is exposed because the parent radio group will directly * update bound properties of the radio button. * @docs-private */ _markForCheck(): void; ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** @docs-private */ _onInputClick(event: Event): void; /** * Triggered when the radio button received a click or the input recognized any change. * Clicking on a label element, will trigger a change event on the associated input. * @docs-private */ _onInputChange(event?: Event): void; /** Dispatch change event with current value. */ private _emitChangeEvent; static ngAcceptInputType_checked: BooleanInput; static ngAcceptInputType_disabled: BooleanInput; static ngAcceptInputType_required: BooleanInput; } export {};