import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
/**
* Change event object emitted by a {@link TsToggleComponent}
*/
export declare class TsSlideToggleChange {
source: TsToggleComponent;
checked: boolean;
constructor(source: TsToggleComponent, checked: boolean);
}
/**
* The value accessor provider for {@link TsToggleComponent}
*
* @internal
*/
export declare const TS_TOGGLE_VALUE_ACCESSOR: any;
/**
* The is a toggle component
*
* @example
* My Toggle!
*
* https://release--5f0ca4e61af3790022cad2fe.chromatic.com/?path=/story/components-data-entry-toggle
*/
export declare class TsToggleComponent implements AfterContentInit, OnDestroy {
private focusMonitor;
private changeDetectorRef;
elementRef: ElementRef;
/**
* Implemented as part of ControlValueAccessor
*
* @param _
*/
private onChange;
/**
* Implemented as part of ControlValueAccessor
*/
private onTouched;
/**
* Define the default component ID
*/
protected uid: string;
/**
* Define the ID for the input element (needed for a11y)
*/
inputId: string;
/** Reference to the underlying input element. */
inputElement: ElementRef;
/**
* Used to set the aria-label attribute on the underlying input element
*/
ariaLabel: string | null;
/**
* Used to set the aria-labelledby attribute on the underlying input element
*/
ariaLabelledby: string | null;
/**
* Define the ID
*/
set id(value: string);
get id(): string;
protected _id: string;
/**
* Allow the checked state to be set
*
* @param value
*/
set isChecked(value: boolean);
get isChecked(): boolean;
private _isChecked;
/**
* Define if the toggle should be disabled
*/
isDisabled: boolean;
/**
* Define if the toggle is required
*/
isRequired: boolean;
/**
* Define the position of the label
*/
labelPosition: 'before' | 'after';
/**
* Define the input name for the toggle
*/
name: string;
/**
* Define the tab index
*/
tabIndex: number | undefined;
/**
* Emit an event each time the toggle value changes
*/
readonly selectionChange: EventEmitter;
constructor(focusMonitor: FocusMonitor, changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef, tabIndex: string);
/**
* Begin monitoring focus
*/
ngAfterContentInit(): void;
/**
* Stop monitoring focus
*/
ngOnDestroy(): void;
/**
* Method being called whenever the underlying input emits a change event
*
* @param event - The event object
*/
onChangeEvent(event: Event): void;
/**
* Method being called whenever the slide-toggle has been clicked
*
* @param event - The event object
*/
onInputClick(event: Event): void;
/**
* Implemented as part of ControlValueAccessor.
*
* @param value
*/
writeValue(value: any): void;
/**
* Implemented as part of ControlValueAccessor.
*
* @param fn
*/
registerOnChange(fn: any): void;
/**
* Implemented as part of ControlValueAccessor
*
* @param fn
*/
registerOnTouched(fn: any): void;
/**
* Implemented as a part of ControlValueAccessor
*
* @param isDisabled
*/
setDisabledState(isDisabled: boolean): void;
/**
* Focuses the toggle input
*
* @param options
* @param origin
*/
focus(options?: FocusOptions, origin?: FocusOrigin): void;
/**
* Toggles the checked state
*/
toggle(): void;
/**
* Emits a change event on the `change` output. Also notifies the FormControl about the change.
*/
private emitChangeEvent;
}