import { Event } from "../../../common/event.js"; import { Disposable } from "../../../common/lifecycle.js"; export interface ISwitchOptions { readonly checked?: boolean; /** Accessible name. Also used as the hover title unless {@link title} is given. */ readonly ariaLabel: string; /** * Hover title. Defaults to {@link ariaLabel}. Pass `false` for no hover, for example when * the surrounding element already shows one that explains the switch. */ readonly title?: string | false; readonly disabled?: boolean; } /** * A pill switch for a setting that takes effect as soon as it is flipped, e.g. enabling * a plugin or letting a model be chosen automatically. * * Use this rather than a `Checkbox` when the control commits immediately; a checkbox * reads as part of a form that is submitted later. */ export declare class Switch extends Disposable { private readonly _onChange; /** Fires with the new state when the user flips the switch, not when it is set in code. */ readonly onChange: Event; readonly domNode: HTMLButtonElement; private _checked; private _title; constructor(options: ISwitchOptions); get checked(): boolean; /** Sets the state without firing {@link onChange}. */ set checked(checked: boolean); get disabled(): boolean; set disabled(disabled: boolean); setAriaLabel(ariaLabel: string, title?: string): void; private _applyState; }