import type { EventEmitter } from '../../stencil-public-runtime';
import type { InputChangeDetail, InputSize, InputType, InputVariant } from './mud-text-input.types';
import type { LocaleProp } from '../../utils/locale';
/**
* Input — single-line text-entry control.
*
* Pattern B (atom-interactive, form-associated): renders its own ``
* inside shadow DOM. Form participation works via `formAssociated` +
* `ElementInternals`. The component is the canonical text-input primitive;
* specialised inputs (date, search, phone, etc.) compose around it.
*
* @element mud-text-input
*
* @slot label - Rich label content, replaces the `label` prop when present.
* @slot helper - Rich helper / hint content, replaces the `helper-text` prop. Hidden when invalid + error-text is shown.
* @slot icon-start - Leading `mud-icon` rendered inside the input control.
* @slot icon-end - Trailing `mud-icon` rendered inside the input control.
*/
export declare class MudTextInput {
/**
* Color treatment. `destructive` is forced when `invalid` is set.
* @default 'default'
*/
variant: InputVariant;
/**
* Loading state. When true the control becomes uninteractive and a
* trailing spinner replaces the `icon-end` slot. The host carries
* `aria-busy="true"` for assistive technologies.
* @default false
*/
loading: boolean;
/**
* Visual size rung.
* @default 'md'
*/
size: InputSize;
/**
* Native input `type`.
* @default 'text'
*/
type: InputType;
/**
* Disables interactivity. The internal control receives `aria-disabled` and
* the native `disabled` attribute.
* @default false
*/
disabled: boolean;
/**
* Marks the field as mandatory. Adds a red asterisk to the label and sets
* `aria-required` on the internal control.
* @default false
*/
required: boolean;
/**
* Renders the field read-only. The control remains focusable and copyable.
* @default false
*/
readonly: boolean;
/**
* Shows a trailing clear (×) button while the control holds a value. Clearing
* empties the field, emits `mudInput` + `mudChange`, and returns focus to the
* input. Suppressed when disabled, read-only, or loading.
* @default false
*/
clearable: boolean;
/**
* Forces destructive visuals regardless of `variant`. Sets `aria-invalid`.
* Use together with `errorText` to surface the message.
* @default false
*/
invalid: boolean;
/**
* Current value of the control. Reflects to the host attribute.
* @default ''
*/
value: string;
/** Form-control `name`. Used during form submission. */
name?: string;
/** Placeholder shown when the control is empty. */
placeholder?: string;
/**
* Language of the built-in copy. Unset, the component follows the closest ancestor `lang`
* (`` included), else `ro-MD`.
*/
locale?: LocaleProp;
/**
* Accessible label for the clear (×) button. Only used when `clearable` is set. Overrides
* the `locale`'s copy when set to a non-empty string.
* @default 'Golește câmpul' (ro-MD)
*/
clearLabel?: string;
/**
* Validation message reported when the field is `required` and empty, and `errorText` is
* unset. Overrides the `locale`'s copy when set to a non-empty string.
* @default 'Acest câmp este obligatoriu.' (ro-MD)
*/
requiredMessage?: string;
/**
* Validation message reported when the value does not match `pattern`, and `errorText` is
* unset. Overrides the `locale`'s copy when set to a non-empty string.
* @default 'Valoarea nu respectă formatul cerut.' (ro-MD)
*/
patternMismatchMessage?: string;
/**
* Validation message reported when the value is shorter than `minlength`, and `errorText` is
* unset. `{min}` is replaced by the limit. Overrides the `locale`'s copy when set to a
* non-empty string.
* @default 'Introduceți cel puțin {min} caractere.' (ro-MD)
*/
tooShortMessage?: string;
/**
* Validation message reported when the value is longer than `maxlength`, and `errorText` is
* unset. `{max}` is replaced by the limit. Overrides the `locale`'s copy when set to a
* non-empty string.
* @default 'Introduceți cel mult {max} caractere.' (ro-MD)
*/
tooLongMessage?: string;
/**
* Validation message reported when a `type="email"` value is not an email address, and
* `errorText` is unset. Overrides the `locale`'s copy when set to a non-empty string.
* @default 'Introduceți o adresă de e-mail validă.' (ro-MD)
*/
typeMismatchEmailMessage?: string;
/**
* Validation message reported when a `type="url"` value is not a URL, and `errorText` is
* unset. Overrides the `locale`'s copy when set to a non-empty string.
* @default 'Introduceți o adresă URL validă.' (ro-MD)
*/
typeMismatchUrlMessage?: string;
/** Plain-text label. Use the `label` slot for richer content. */
label?: string;
/** Plain-text helper / hint shown below the control. */
helperText?: string;
/**
* Plain-text error message shown below the control when `invalid` is set.
* When present it replaces `helperText` and pairs with the error icon.
*/
errorText?: string;
/** Native `autocomplete` attribute forwarded to the internal control. */
autocomplete?: string;
/** Native `maxlength` constraint. */
maxLength?: number;
/** Native `minlength` constraint. */
minLength?: number;
/** Native `inputmode` hint forwarded to the internal control. */
inputmode?: string;
/** Native `pattern` regex forwarded to the internal control. */
pattern?: string;
private hasLabelSlot;
private hasHelperSlot;
private hasIconStart;
private hasIconEnd;
private isFocused;
private fieldsetDisabled;
/**
* The host's `aria-label` (attribute or native `ariaLabel` property), moved onto the
* internal control when no visible label is present.
*/
private resolvedAriaLabel?;
host: HTMLMudTextInputElement;
internals: ElementInternals;
/** Fires on every keystroke. `detail.value` is the current control value. */
mudInput: EventEmitter;
/** Fires when the value is committed (typically on `blur` or `Enter`). `detail.value` is the committed value. */
mudChange: EventEmitter;
/** Fires when the internal control gains focus. The native `FocusEvent` is forwarded as-is. */
mudFocus: EventEmitter;
/** Fires when the internal control loses focus. The native `FocusEvent` is forwarded as-is. */
mudBlur: EventEmitter;
private readonly instanceId;
private readonly labelId;
private readonly helperId;
private readonly errorId;
private nativeInput?;
private initialValue;
private stopAriaLabel?;
private stopLang?;
connectedCallback(): void;
disconnectedCallback(): void;
/** Built-in strings in the resolved locale, with the override props on top. */
private messages;
/** The message for the first native constraint the control reports, in the component's locale. */
private nativeMessage;
componentWillLoad(): void;
onRequiredChange(): void;
onLocaleChange(): void;
private syncValidity;
validateVariant(next: InputVariant): void;
validateSize(next: InputSize): void;
handleValueChange(next: string): void;
/** Mirrors `disabled` from an ancestor `