import { nothing, PropertyValues, TemplateResult } from 'lit';
import { SupportedAutocapitalize, SupportedAutocomplete, SupportedInputTypes } from '../../types/input.js';
import { ARIAAutoComplete, ARIAExpanded, ARIARole } from '../../types/role.js';
import { UiElement } from '../UiElement.js';
import '../icon-button/ui-icon-button.js';
import '../icons/ui-icon.js';
/**
 * @slot prefix - A slot in which to render prefixes of the input
 * @slot suffix - A slot in which to render suffixes of the input
 */
export default abstract class Input extends UiElement {
    #private;
    static shadowRootOptions: {
        delegatesFocus: boolean;
        clonable?: boolean;
        customElementRegistry?: CustomElementRegistry;
        mode: ShadowRootMode;
        serializable?: boolean;
        slotAssignment?: SlotAssignmentMode;
        customElements?: CustomElementRegistry;
        registry?: CustomElementRegistry;
    };
    static readonly formAssociated = true;
    get form(): HTMLFormElement | null;
    /**
     * @attribute
     */
    accessor type: SupportedInputTypes;
    get disabled(): boolean;
    /**
     * When set, the input is a disabled state.
     * @attribute
     */
    set disabled(value: boolean);
    /**
     * The name of the form control, submitted as a pair with the control's value as part of the form data.
     * @attribute
     */
    accessor name: string | undefined;
    /**
     * When a form is submitted, only checkboxes which are currently checked are submitted to the server,
     * and the reported value is the `value` of the value attribute.
     * If the `value` is not otherwise specified, it is the string `on` by default.
     * @attribute
     */
    accessor value: string;
    /**
     * Set to true to mark the input element as required.
     * @attribute
     */
    accessor required: boolean | undefined;
    /**
     * While the element can be easily styled with the `:valid` and `:invalid` pseudo classes
     * it also exposes an attribute to style the element as invalid. This attribute changes
     * when the element validation is performed.
     *
     * Calling `reportValidity()` will automatically update `invalid`.
     * @attribute
     */
    accessor invalid: boolean | undefined;
    /**
     * The error message that replaces supporting text when `error` is true. If
     * `errorText` is an empty string, then the supporting text will continue to
     * show.
     *
     * Calling `reportValidity()` will automatically update `errorText` to the
     * native `validationMessage`.
     * @attribute
     */
    accessor invalidText: string;
    /**
     * The label to be rendered with the input.
     * @attribute
     */
    accessor label: string | undefined;
    /**
     * Whether or not the text field has a leading icon. Used for SSR.
     * @attribute
     */
    accessor hasPrefix: boolean;
    /**
     * Whether or not the text field has a trailing icon. Used for SSR.
     * @attribute
     */
    accessor hasSuffix: boolean;
    /**
     * Conveys additional information below the text field, such as how it should
     * be used.
     * @attribute
     */
    accessor supportingText: string;
    /**
     * Override the input text CSS `direction`. Useful for RTL languages that use
     * LTR notation for fractions.
     * @attribute
     */
    accessor textDirection: string;
    /**
     * When set the label of the input disappears after input rather than float over the input.
     * @attribute
     */
    accessor noFloating: boolean | undefined;
    /**
     * Defines the greatest value in the range of permitted values.
     *
     * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max
     * @attribute
     */
    accessor max: number | string;
    /**
     * The maximum number of characters a user can enter into the text field. Set
     * to -1 for none.
     *
     * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
     * @attribute
     */
    accessor maxLength: number;
    /**
     * Defines the most negative value in the range of permitted values.
     *
     * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min
     * @attribute
     */
    accessor min: number | string;
    /**
     * The minimum number of characters a user can enter into the text field. Set
     * to -1 for none.
     *
     * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
     * @attribute
     */
    accessor minLength: number | undefined;
    /**
     * A regular expression that the text field's value must match to pass
     * constraint validation.
     *
     * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern
     * @attribute
     */
    accessor pattern: string;
    /**
     * @attribute
     */
    accessor placeholder: string;
    /**
     * Indicates whether or not a user should be able to edit the text field's
     * value.
     *
     * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#readonly
     *
     * @attribute
     */
    accessor readOnly: boolean;
    /**
     * Bind the `<input>`'s `autocomplete` property.
     * @default off
     * @attribute
     */
    accessor autocomplete: SupportedAutocomplete;
    /**
     * Binds this to the `<input>`'s `inputMode` property.
     * @attribute
     */
    accessor inputMode: string;
    /**
     * Binds this to the `<input>`'s `autocapitalize` property.
     *
     * Possible values are:
     *
     * - `off` or `none`: No auto-capitalization is applied (all letters default to lowercase)
     * - `on` or `sentences`: The first letter of each sentence defaults to a capital letter;
     *  all other letters default to lowercase
     * - `words`: The first letter of each word defaults to a capital letter; all other letters default to lowercase
     * - `characters`: All letters should default to uppercase
     *
     * @default off
     * @attr
     */
    autocapitalize: SupportedAutocapitalize;
    /**
     * Binds this to the `<input>`'s `accept` property,
     * used with type=file.
     * @attribute
     */
    accessor accept: string | undefined;
    /**
     * Binds this to the`<input>`'s `multiple` property,
     * used with type=file.
     * @attribute
     */
    accessor multiple: boolean | undefined;
    /**
     * Binds this to the `<input>`'s `size` property.
     * @attribute
     */
    accessor size: number | undefined;
    protected pendingSetters: Map<keyof HTMLInputElement, unknown>;
    private setNativeValue;
    private getNativeValue;
    /**
     * Gets or sets the direction in which selection occurred.
     */
    get selectionDirection(): 'forward' | 'backward' | 'none' | null;
    set selectionDirection(value: 'forward' | 'backward' | 'none' | null);
    /**
     * Gets or sets the end position or offset of a text selection.
     */
    get selectionEnd(): number | null;
    set selectionEnd(value: number | null);
    /**
     * Gets or sets the starting position or offset of a text selection.
     */
    get selectionStart(): number | null;
    set selectionStart(value: number | null);
    /**
     * Returns or sets the element's step attribute, which works with min and max
     * to limit the increments at which a numeric or date-time value can be set.
     *
     * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step
     * @attribute
     */
    accessor step: number;
    /**
     * Returns the native validation error message that would be displayed upon
     * calling `reportValidity()`.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validationMessage
     */
    get validationMessage(): string;
    /**
     * Returns a ValidityState object that represents the validity states of the
     * text field.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validity
     */
    get validity(): ValidityState;
    /**
     * The text field's value as a number.
     */
    get valueAsNumber(): number;
    set valueAsNumber(value: number);
    /**
     * The text field's value as a Date.
     */
    get valueAsDate(): Date | null;
    set valueAsDate(value: Date | null);
    /**
     * Returns whether an element will successfully validate based on forms
     * validation rules and constraints.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/willValidate
     */
    get willValidate(): boolean;
    /**
     * Returns true when the text field has been interacted with. Native
     * validation errors only display in response to user interactions.
     */
    protected accessor dirty: boolean;
    protected accessor focused: boolean;
    get input(): HTMLInputElement | null;
    private accessor prefixes;
    private accessor suffixes;
    /**
     * The validation message displayed from a native error via
     * `reportValidity()`.
     */
    protected accessor nativeErrorText: string;
    /**
     * Whether or not a native error has been reported via `reportValidity()`.
     */
    protected accessor nativeError: boolean;
    private readonly counterId;
    private readonly supportingTextId;
    private readonly labelId;
    accessor ariaAutoComplete: ARIAAutoComplete | null;
    accessor ariaControls: string | null;
    accessor ariaActiveDescendant: string | null;
    accessor ariaExpanded: ARIAExpanded | null;
    /**
     * The `aria-label` of the text field's input.
     */
    accessor ariaLabel: string;
    /**
     * The `aria-labelledby` of the text field's input.
     *
     * Note: currently only usable in SSR light DOM.
     */
    accessor ariaLabelledBy: string;
    accessor dataRole: ARIARole | null;
    /**
     * When set to true, the error text's `role="alert"` will be removed, then
     * re-added after an animation frame. This will re-announce an error message
     * to screen readers.
     */
    protected accessor refreshErrorAlert: boolean;
    get files(): FileList | null;
    /**
     * When set it adds a `<datalist>` element to the input.
     */
    accessor list: string[] | undefined;
    constructor();
    connectedCallback(): void;
    /**
     * When form-associated custom elements are supported in the browser it
     * is called when the form has been reset
     */
    formResetCallback(): void;
    /**
     * When form-associated custom elements are supported in the browser it
     * is called when the form state has been restored
     *
     * @param formState Restored value
     */
    formStateRestoreCallback(formState?: string): void;
    protected willUpdate(cp: PropertyValues<this>): void;
    protected updated(changedProperties: PropertyValues): void;
    protected _updateFormValue(): void;
    protected _updateValidationState(): void;
    protected invalidHandler(e: Event): void;
    protected handleSlotChange(): void;
    protected getInputValue(): string;
    /**
     * Checks the text field's native validation and returns whether or not the
     * element is valid.
     *
     * If invalid, this method will dispatch the `invalid` event.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity
     *
     * @return true if the text field is valid, or false if not.
     */
    checkValidity(): boolean;
    /**
     * Focuses the text field's input text.
     */
    focus(): void;
    /**
     * Un-focuses the text field.
     */
    blur(): void;
    /**
     * Checks the text field's native validation and returns whether or not the
     * element is valid.
     *
     * If invalid, this method will dispatch the `invalid` event.
     *
     * This method will display or clear an error text message equal to the text
     * field's `validationMessage`, unless the invalid event is canceled.
     *
     * Use `setCustomValidity()` to customize the `validationMessage`.
     *
     * This method can also be used to re-announce error messages to screen
     * readers.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/reportValidity
     *
     * @return true if the text field is valid, or false if not.
     */
    reportValidity(): boolean;
    protected shouldErrorAnnounce(): boolean;
    protected getErrorText(): string;
    /**
     * Selects all the text in the text field.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select
     */
    select(): void;
    /**
     * Sets the text field's native validation error message. This is used to
     * customize `validationMessage`.
     *
     * When the error is not an empty string, the text field is considered invalid
     * and `validity.customError` will be true.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setCustomValidity
     *
     * @param error The error message to display.
     */
    setCustomValidity(error: string): void;
    /**
     * Replaces a range of text with a new string.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setRangeText
     */
    setRangeText(replacement: string): void;
    setRangeText(replacement: string, start: number, end: number, selectionMode?: SelectionMode): void;
    /**
     * Sets the start and end positions of a selection in the text field.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
     *
     * @param start The offset into the text field for the start of the selection.
     * @param end The offset into the text field for the end of the selection.
     * @param direction The direction in which the selection is performed.
     */
    setSelectionRange(start: number | null, end: number | null, direction?: 'forward' | 'backward' | 'none'): void;
    /**
     * Decrements the value of a numeric type text field by `step` or `n` `step`
     * number of times.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepDown
     *
     * @param stepDecrement The number of steps to decrement, defaults to 1.
     */
    stepDown(stepDecrement?: number): void;
    /**
     * Increments the value of a numeric type text field by `step` or `n` `step`
     * number of times.
     *
     * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepUp
     *
     * @param stepIncrement The number of steps to increment, defaults to 1.
     */
    stepUp(stepIncrement?: number): void;
    /**
     * Reset the text field to its default value.
     */
    reset(): void;
    handleClick(): void;
    protected handleFocus(): void;
    protected handleBlur(): void;
    private checkValidityAndDispatch;
    /**
     * @returns `true` when the label is in resting state.
     */
    protected labelResting(): boolean;
    /**
     * @returns `true` when the label should be hidden
     */
    protected labelHidden(): boolean;
    protected renderLabelText(): string;
    protected getSupportingText(): string;
    protected getError(): boolean;
    protected retargetEvent(event: Event): boolean;
    protected handleInput(event: InputEvent): void;
    protected hasCounter(): boolean;
    protected getCounterText(): string;
    protected getAriaDescribedBy(): string;
    protected get effectiveType(): SupportedInputTypes;
    protected render(): TemplateResult;
    protected renderPrefix(): TemplateResult;
    protected renderSuffix(): TemplateResult;
    protected renderBody(): TemplateResult;
    protected renderLabel(): TemplateResult;
    protected renderHighlight(): TemplateResult;
    protected abstract renderInput(): TemplateResult;
    protected renderSupportingText(): TemplateResult;
    protected renderSupportingTextValue(): TemplateResult | typeof nothing;
    protected renderCounter(): TemplateResult;
    protected renderPasswordControl(): TemplateResult | typeof nothing;
    protected renderDataList(): TemplateResult | typeof nothing;
}
//# sourceMappingURL=Input.d.ts.map