import { EventEmitter } from '../../stencil-public-runtime'; import { type LabelPlacement } from '../../utils/constants'; /** * @slot label - Content to be placed as the label, will override the label prop. * @slot description - Content to be placed as the description, will override the description prop. */ export declare class NvToggle { el: HTMLNvToggleElement; /****************************************************************************/ /** * Sets the ID for the radio button’s input element and the for attribute of * the associated label. If no ID is provided, a random one will be * automatically generated to ensure unique identification, facilitating * proper label association and accessibility. */ readonly inputId: string; /** * The name attribute for the toggle input, used to reference the form data * after submission. */ readonly name?: string; /** * The value attribute of the toggle input, representing the value sent on * form submission when the toggle is checked. */ readonly value?: string; /** The label displayed next to the toggle.*/ readonly label?: string; /** * Determines the position of the label relative to the toggle, either * 'start' (before) or 'end' (after). */ readonly labelPlacement: `${LabelPlacement}`; /** * Hides the label visually while still keeping it available for screen * readers. */ readonly hideLabel: boolean; /** * A description providing additional context or information about the * toggle. */ readonly description?: string; /** * Changes the toggle appearance to indicate an error. */ readonly error: boolean; /** * Changes the toggle appearance to indicate successful input or validation. */ readonly success: boolean; /** Indicates whether the toggle is checked or not. */ checked: boolean; /** Disables the toggle, preventing user interaction. */ readonly disabled: boolean; /** * Sets the toggle to read-only, preventing user changes but still allowing * focus and selection of text. */ readonly readonly: boolean; /****************************************************************************/ /** * Emits when the checked state changes. * @bind checked */ checkedChanged: EventEmitter; /****************************************************************************/ /** * Listens for the change event on the toggle input element, updates the * checked state and reports it. * * The event is emitted here and not from a `@Watch` on `checked`. A watcher * fires on every change to the property, including one the consumer makes, * so it reported a consumer's own write back to it. `checkedChanged` is the * `@bind checked` event, which is what turns that echo into a loop: the * consumer writes `checked`, hears a change and writes again. Here the user * is the one who changed it, which is what the event name says. * @param {Event} event - The change event. */ handleChange(event: Event): void; /****************************************************************************/ render(): any; }