import { FocusMonitor } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import * as i0 from '@angular/core'; import { DoCheck, OnInit, AfterViewInit, OnDestroy, ElementRef, QueryList, EventEmitter, ChangeDetectorRef } from '@angular/core'; import { ControlValueAccessor, Validator, NgControl, NgForm, FormGroupDirective, AbstractControl, ValidationErrors } from '@angular/forms'; import { NxErrorComponent } from '@aposin/ng-aquila/base'; import { NxAbstractControl } from '@aposin/ng-aquila/shared'; import { ErrorStateMatcher } from '@aposin/ng-aquila/utils'; import * as i1 from '@angular/common'; import * as i2 from '@aposin/ng-aquila/icon'; import * as i3 from '@angular/cdk/observers'; /** Options for placement of the label */ type POSITION = 'left' | 'right'; /** Options for sizing of the label */ type LABEL_SIZE = 'small' | 'large'; declare class NxSwitcherComponent implements ControlValueAccessor, DoCheck, OnInit, AfterViewInit, OnDestroy, Validator, NxAbstractControl { private readonly _cdr; private readonly _errorStateMatcher; private readonly _parentForm; private readonly _parentFormGroup; private readonly _focusMonitor; /** @docs-private */ errorState: boolean; /** @docs-private */ _switcherLabelWrapper: ElementRef; _errorChildren: QueryList; _nativeInput: ElementRef; ariaLabel: string | null; ariaLabelledBy: string | null; set ariaDescribedBy(value: string | null); get ariaDescribedBy(): string | null; private _ariaDescribedBy; /** Sets the id of the switcher */ set id(value: string); get id(): string; private _id; /** Specifies the placement of the label */ set labelPosition(value: POSITION); get labelPosition(): POSITION; private _labelPosition; /** Sets the label text of the switcher */ set name(value: string); get name(): string; private _name; /** Whether the switcher is checked (on) or unchecked (off) */ set checked(value: boolean); get checked(): boolean; private _checked; /** Whether the big switcher is used */ set big(value: BooleanInput); get big(): boolean; private _big; /** Sets the size of the label */ set labelSize(value: LABEL_SIZE); get labelSize(): LABEL_SIZE; private _labelSize; /** Whether the style for a dark background is used */ set negative(value: BooleanInput); get negative(): boolean; private _negative; /** Whether the switcher is in the disabled state */ set disabled(value: BooleanInput); get disabled(): boolean; private _disabled; /** An event is dispatched each time the switcher value is changed */ readonly checkedChange: EventEmitter; private onChangeCallback; private onTouchedCallback; private readonly _destroyed; set required(value: boolean); get required(): boolean; protected _required: boolean | undefined; ngControl: NgControl | null; constructor(_cdr: ChangeDetectorRef, _errorStateMatcher: ErrorStateMatcher, _parentForm: NgForm | null, _parentFormGroup: FormGroupDirective | null, _focusMonitor: FocusMonitor); validate(control: AbstractControl): ValidationErrors | null; private injector; ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** Allows to toggle between the states */ toggle(event: Event): void; writeValue(value: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; ngDoCheck(): void; setDisabledState(isDisabled: boolean): void; /** @docs-private */ touch(): void; /** @docs-private */ updateErrorState(): void; /** @docs-private */ get labelHasContent(): boolean; /** * Callback for when the content of the label has changed. * @docs-private */ labelContentChanged(): void; /** Forward focus from host to hidden input field */ _forwardFocusToInput(): void; private _syncDescribedByIds; /** Sets switcher to readonly. */ readonly: boolean; setReadonly(value: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_required: unknown; static ngAcceptInputType_readonly: unknown; } declare class NxSwitcherModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { NxSwitcherComponent, NxSwitcherModule }; export type { LABEL_SIZE, POSITION };