import * as _angular_core from '@angular/core';
import { OnInit, Signal } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { SiFormItemControl } from '@siemens/element-ng/form';
import { TranslatableString } from '@siemens/element-translate-ng/translate';

declare class SiPillsInputComponent implements OnInit, ControlValueAccessor, SiFormItemControl {
    private static idCounter;
    /**
     * The identifier of the pills-input. Will be generated if not provided.
     *
     * @defaultValue
     * ```
     * `__si-pills-input-${SiPillsInputComponent.idCounter++}`
     * ```
     */
    readonly id: _angular_core.InputSignal<string>;
    /**
     * The aria-label for the inner input where users enter new items.
     *
     * @defaultValue
     * ```
     * t(() => $localize`:@@SI_PILLS_INPUT.INPUT_ELEMENT_ARIA_LABEL:Create item`)
     * ```
     */
    readonly inputElementAriaLabel: _angular_core.InputSignal<TranslatableString>;
    /**
     * Whether the pills-input is disabled.
     *
     * @defaultValue false
     */
    readonly disabledInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /**
     * Whether the pills-input is readonly
     *
     * @defaultValue false
     */
    readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** The placeholder to be shown if no value is currently present. */
    readonly placeholder: _angular_core.InputSignal<TranslatableString | undefined>;
    /**
     * @defaultValue
     * ```
     * `${this.id()}-label`
     * ```
     */
    readonly labelledby: _angular_core.InputSignal<string>;
    /**
     * This ID will be bound to the `aria-describedby` attribute of the pills-input.
     * Use this to reference the element containing the error message(s) for the pills-input.
     * It will be picked by the {@link SiFormItemComponent} if the pills-input is used inside a form item.
     *
     * @defaultValue
     * ```
     * `${this.id()}-errormessage`
     * ```
     */
    readonly errormessageId: _angular_core.InputSignal<string>;
    protected inputValue: string;
    protected onTouched: () => void;
    protected onChange: (val: any) => void;
    protected readonly pills: _angular_core.WritableSignal<string[]>;
    protected readonly activePillIndex: _angular_core.WritableSignal<number | undefined>;
    protected readonly inputId: _angular_core.Signal<string>;
    protected readonly disabled: _angular_core.Signal<boolean>;
    protected readonly activeDescendant: _angular_core.Signal<string | null>;
    protected readonly tabindex: _angular_core.Signal<0 | -1 | undefined>;
    private readonly inputElement;
    private readonly disabledNgControl;
    private siPillsInputValueHandlerDirective;
    private readonly cdRef;
    private readonly elementRef;
    ngOnInit(): void;
    protected input(): void;
    protected click(): void;
    protected blur(): void;
    protected keydownEnter(event: Event): void;
    protected keydownBackspace(event: Event): void;
    protected remove(index: number, focus?: boolean): void;
    private rebuildValue;
    protected arrowLeft(): void;
    protected arrowRight(): void;
    protected delete(): void;
    /** @internal */
    registerOnChange(fn: any): void;
    /** @internal */
    registerOnTouched(fn: () => void): void;
    /** @internal */
    setDisabledState(isDisabled: boolean): void;
    /** @internal */
    writeValue(value?: string[] | null): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiPillsInputComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiPillsInputComponent, "si-pills-input", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "inputElementAriaLabel": { "alias": "inputElementAriaLabel"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "labelledby": { "alias": "labelledby"; "required": false; "isSignal": true; }; "errormessageId": { "alias": "errormessageId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

interface SiPillsInputValueParseResult {
    newValue: string;
    newPills: string[];
}
type SiPillsInputValueHandlerTrigger = 'input' | 'keydown.enter' | 'blur';
declare abstract class SiPillsInputValueHandlerDirective {
    /** @internal */
    abstract handle(value: string, trigger: SiPillsInputValueHandlerTrigger): SiPillsInputValueParseResult | undefined;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiPillsInputValueHandlerDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiPillsInputValueHandlerDirective, never, never, {}, {}, never, never, true, never>;
}

declare abstract class SiPillsInputPatternBase {
    /**
     * Regex to split the input value into segments.
     *
     * @defaultValue SEPARATOR_REGEX
     */
    readonly separatorRegex: _angular_core.WritableSignal<RegExp>;
    /** Regex to validate an input string item. */
    readonly validationRegex?: Signal<RegExp | undefined>;
    /** @internal */
    handle(value: string, trigger: SiPillsInputValueHandlerTrigger): SiPillsInputValueParseResult | undefined;
}

declare class SiPillsInputCsvDirective extends SiPillsInputPatternBase {
    /** @defaultValue undefined */
    readonly validationRegex: _angular_core.InputSignal<RegExp | undefined>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiPillsInputCsvDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiPillsInputCsvDirective, "[siPillsInputCsv]", never, { "validationRegex": { "alias": "pillsInputCsvItemRegex"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class SiPillsInputEmailDirective extends SiPillsInputPatternBase {
    /**
     * @defaultValue signal(EMAIL_REGEX).asReadonly()
     */
    readonly validationRegex: _angular_core.Signal<RegExp>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiPillsInputEmailDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiPillsInputEmailDirective, "[siPillsInputEmail]", never, {}, {}, never, never, true, never>;
}

declare class SiPillsInputModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiPillsInputModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<SiPillsInputModule, never, [typeof SiPillsInputComponent, typeof SiPillsInputCsvDirective, typeof SiPillsInputEmailDirective], [typeof SiPillsInputComponent, typeof SiPillsInputCsvDirective, typeof SiPillsInputEmailDirective]>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<SiPillsInputModule>;
}

export { SiPillsInputComponent, SiPillsInputCsvDirective, SiPillsInputEmailDirective, SiPillsInputModule, SiPillsInputValueHandlerDirective };
export type { SiPillsInputValueHandlerTrigger, SiPillsInputValueParseResult };
