import { PropertyValues, TemplateResult } from "lit-element"; import { AriaRole } from "../../util/aria"; import { FormElementBehavior, IFormElementBehaviorProperties } from "../form-element/index"; /** * Events the switch can dispatch. */ export declare enum SwitchBehaviorEvent { CHANGE = "change" } /** * Properties of the switch behavior. */ export interface ISwitchBehaviorProperties extends IFormElementBehaviorProperties { checked: boolean; ariaChecked: string; } /** * Provides switch behavior. * @event change - Dispatched when the checked property changes due to a user interaction. */ export declare abstract class SwitchBehavior extends FormElementBehavior implements ISwitchBehaviorProperties { static styles: import("lit-element").CSSResult[]; /** * Checks the switch. * @attr */ checked: boolean; /** * Aria checked attribute. * @attr aria-checked */ ariaChecked: string; /** * Role of the switch. * @attr */ role: AriaRole; /** * Type of the form element. */ protected formElementType: string; /** * Hooks up the element. * @param props */ protected firstUpdated(props: Map): void; /** * Reacts to properties when they change. * @param props */ protected updated(props: Map): void; /** * Updates the aria attributes. */ protected updateAria(props: PropertyValues): void; /** * Attaches the keydown and click listeners. */ protected attachListeners(): void; /** * Handles that the switch was clicked. * @param e */ protected onClick(e: MouseEvent): void; /** * Checks and unchecks the component. */ protected toggle(): void; /** * Dispatch that the switch was toggled. */ protected dispatchChangeEvent(): void; /** * Handles the key down event. * @param e */ protected onKeyDown(e: KeyboardEvent): void; /** * Returns the template for the form element */ protected renderFormElement(): TemplateResult; }