import * as _angular_core from '@angular/core'; import { BooleanInput, NumberInput } from '@angular/cdk/coercion'; import { ControlValueAccessor } from '@angular/forms'; import { ChangeFn, TouchFn } from '@spartan-ng/brain/forms'; import * as _spartan_ng_brain_input_otp from '@spartan-ng/brain/input-otp'; import * as i1 from '@spartan-ng/brain/field'; type InputMode = 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'; declare class BrnInputOtpInput { private readonly _destroyRef; private readonly _elementRef; protected readonly _otp: _spartan_ng_brain_input_otp.BrnInputOtp; /** Custom autocomplete attribute applied to the input element */ readonly autocomplete: _angular_core.InputSignal<"one-time-code" | "off">; /** Virtual keyboard appearance on mobile */ readonly inputMode: _angular_core.InputSignal; /** Styles applied to the input element to make it invisible and clickable. */ readonly inputStyles: _angular_core.InputSignal; protected readonly _inputStyles: _angular_core.Signal; constructor(); /** Focus the underlying input element. */ focus(): void; protected onInputChange(): void; protected onPaste(event: ClipboardEvent): void; private setSelectionRange; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare const BRN_INPUT_OTP_VALUE_ACCESSOR: { provide: _angular_core.InjectionToken; useExisting: _angular_core.Type; multi: boolean; }; declare class BrnInputOtp implements ControlValueAccessor { private static _id; private readonly _fieldControl; readonly invalid: _angular_core.Signal | undefined; readonly touched: _angular_core.Signal | undefined; readonly dirty: _angular_core.Signal | undefined; readonly spartanInvalid: _angular_core.Signal | undefined; /** Whether the input has focus. */ protected readonly _focused: _angular_core.WritableSignal; /** Styles applied to the host element. */ readonly hostStyles: _angular_core.InputSignal; /** Custom id applied to the input element */ readonly inputId: _angular_core.InputSignal; readonly labelableId: _angular_core.InputSignal; /** Determine if the input is disabled. */ readonly disabled: _angular_core.InputSignalWithTransform; protected readonly _disabled: _angular_core.WritableSignal; /** @internal The disabled state as a readonly signal */ readonly disabledState: _angular_core.Signal; /** The number of slots. */ readonly length: _angular_core.InputSignalWithTransform; /** * Optional per-character pattern. Each typed or pasted character must match this * pattern. Strings are treated as a single-character regular expression. * * Examples: '[0-9]', '[A-Za-z0-9]' */ readonly slotPattern: _angular_core.InputSignal; /** Whether entered characters should be visually masked. */ readonly mask: _angular_core.InputSignalWithTransform; /** The character used to mask entered characters. */ readonly maskChar: _angular_core.InputSignal; /** If true, the element is focused automatically on init **/ readonly autofocus: _angular_core.InputSignalWithTransform; /** * Defines how the pasted text should be transformed before saving to model/form. * Allows pasting text which contains extra characters like spaces, dashes, etc. and are longer than the length. * * "XXX-XXX": (pastedText) => pastedText.replaceAll('-', '') * "XXX XXX": (pastedText) => pastedText.replaceAll(/\s+/g, '') */ readonly transformPaste: _angular_core.InputSignal<(pastedText: string, length: number) => string>; /** The value controlling the input */ readonly valueInput: _angular_core.InputSignal; readonly value: _angular_core.WritableSignal; /** Emits when the value changes. */ readonly valueChange: _angular_core.OutputEmitterRef; readonly context: _angular_core.Signal<{ char: string | null; displayChar: string | null; isActive: boolean; hasFakeCaret: boolean; }[]>; /** Emitted when the input is complete, triggered through input or paste. */ readonly completed: _angular_core.OutputEmitterRef; protected _onChange?: ChangeFn; protected _onTouched?: TouchFn; /** The registered hidden input element. */ private readonly _input; constructor(); /** @internal */ sanitizeValue(value: string | null | undefined, clamp?: boolean): string; /** Focus the underlying input element. */ focus(): void; /** @internal */ registerInput(input: BrnInputOtpInput): void; /** @internal */ unregisterInput(input: BrnInputOtpInput): void; /** @internal */ onFocus(): void; /** @internal */ onBlur(): void; /** CONTROL VALUE ACCESSOR */ writeValue(value: string | null): void; registerOnChange(fn: ChangeFn): void; registerOnTouched(fn: TouchFn): void; setDisabledState(isDisabled: boolean): void; private isCompleted; /** @internal */ updateValue(newValue: string): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class BrnInputOtpSlot { /** Access the input-otp component */ protected readonly _inputOtp: _spartan_ng_brain_input_otp.BrnInputOtp; /** The index of the slot to render the char or a fake caret */ readonly index: _angular_core.InputSignalWithTransform; /** Whether to force the input into an invalid state. */ readonly forceInvalid: _angular_core.InputSignalWithTransform; protected readonly _slot: _angular_core.Signal<{ char: string | null; displayChar: string | null; isActive: boolean; hasFakeCaret: boolean; }>; protected readonly _ariaInvalid: _angular_core.Signal | undefined; protected readonly _touched: _angular_core.Signal | undefined; protected readonly _dirty: _angular_core.Signal | undefined; protected readonly _spartanInvalid: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare const BrnInputOtpImports: readonly [typeof BrnInputOtp, typeof BrnInputOtpInput, typeof BrnInputOtpSlot]; export { BRN_INPUT_OTP_VALUE_ACCESSOR, BrnInputOtp, BrnInputOtpImports, BrnInputOtpInput, BrnInputOtpSlot }; export type { InputMode };