import { ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { BooleanInput } from '@angular/cdk/coercion'; import { FocusableOption } from '@angular/cdk/a11y'; import { HasTabIndex } from '../../common/tabindex'; import { CanDisable } from '../../common/disabled'; import * as i0 from "@angular/core"; import * as i1 from "../../theme/src/theme-check.directive"; import * as i2 from "../../common/sapphire-view-encapsulation"; /** Change event object emitted by switch. */ export declare class SapphireSwitchChange { /** The new `selected` value of the switch. */ readonly selected: boolean; /** The source switch of the event. */ readonly source: SwitchComponent; constructor( /** The new `selected` value of the switch. */ selected: boolean, /** The source switch of the event. */ source: SwitchComponent); } declare const _SwitchMixinBase: import("../../common/constructor").Constructor & import("../../common/constructor").AbstractConstructor & import("../../common/constructor").Constructor & import("../../common/constructor").AbstractConstructor & { new (_elementRef: ElementRef): { _elementRef: ElementRef; }; }; /** * A switch is used to let the user toggle between two possible exclusive states. * They are commonly used for "on/off" states. */ export declare class SwitchComponent extends _SwitchMixinBase implements ControlValueAccessor, CanDisable, HasTabIndex, FocusableOption { private changeDetectorRef; /** * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will * take precedence so this may be omitted. */ ariaLabel: string; /** * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element */ ariaLabelledby: string | null; /** The 'aria-describedby' attribute is read after the element's label and field type. */ ariaDescribedby: string; /** Name value will be applied to the input element if present */ name: string | null; /** @default "lg" */ size?: 'lg' | 'md' | 'sm'; /** A unique id for the switch input. If none is supplied, it will be auto-generated. */ id: string; /** Returns the unique id for the visual hidden input. */ get inputId(): string; /** Event emitted when the switch's `selected` value changes. */ readonly change: EventEmitter; /** The value attribute of the native input element */ value: string | undefined; /** Whether the switch is required. */ required: BooleanInput; /** Whether the switch is selected. */ get selected(): boolean; set selected(value: BooleanInput); private _selected; /** * Whether the switch is disabled. This fully overrides the implementation provided by * mixinDisabled, but the mixin is still required because mixinTabIndex requires it. */ get disabled(): boolean; set disabled(value: BooleanInput); private _disabled; /** * Whether the switch is readonly. */ readonly: BooleanInput; /** * Called when the switch is blurred. Needed to properly implement ControlValueAccessor. * @docs-private */ private onTouched; private controlValueAccessorChangeFn; /** The native `` element */ _inputElement: ElementRef; /** Optional note text to display below the checkbox label. */ note?: string; constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, tabIndex: string); writeValue(value: any): void; registerOnChange(fn: (value: any) => void): void; registerOnTouched(fn: any): void; setDisabledState(disabled: boolean): void; /** Toggles the `selected` state of the switch. */ toggle(): void; focus(): void; _onInputClick($event: Event): void; _onInteractionEvent(event: Event): void; _onBlur(): void; private emitChangeEvent; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {};