import type { CSSResultGroup } from 'lit'; import { InputBase } from '../../internal/components/input-base/input-base'; import type { ShoelaceFormControl } from '../../internal/shoelace-element'; /** * @summary The OTP input is used for MFA procedure of authenticating users by a one-time password. * * @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/input-champ-de-saisie/input-otp-code-mfa/web-p6oWJZn2 * * @dependency dsa-error-text * @dependency dsa-success-text * * @slot label - The input's label. Alternatively, you can use the `label` attribute. * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute. * @slot tooltip - The tooltip slot allows additional information to be passed along the label. * * @event dsa-blur - Emitted when the control loses focus. * @event dsa-change - Emitted when an alteration to the control's value is committed by the user. * @event dsa-focus - Emitted when the control gains focus. * @event dsa-input - Emitted when the control receives input. * @event dsa-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied. */ export default class DSAInputOTP extends InputBase implements ShoelaceFormControl { static styles: CSSResultGroup; input: HTMLInputElement; private currentIndex; private patternRegexp; /** The length of input that will be considered valid. */ length: number; protected handleFocus(): void; protected handleInput(event: InputEvent): void; private handleSelect; protected handleKeyDown(event: KeyboardEvent): void; private handleSingleFieldClick; private getLastIndex; handleCurrentIndexChange(): void; handlePatterChange(): void; getUpdateComplete(): Promise; private renderSingleField; renderInput(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'dsa-input-otp': DSAInputOTP; } }