import { ElementRef, EventEmitter, OnChanges } from '@angular/core';
import { NgControl } from '@angular/forms';
import { KbqAutocompleteTrigger } from '@koobiq/components/autocomplete';
import { KbqTrim } from '@koobiq/components/form-field';
import { KbqTagsDefaultOptions } from './tag-default-options';
import { KbqTagList } from './tag-list.component';
import { KbqTagTextControl } from './tag-text-control';
import * as i0 from "@angular/core";
import * as i1 from "@koobiq/components/core";
/** Represents an input event on a `kbqTagInput`. */
export interface KbqTagInputEvent {
/** The native `` element that the event is being fired for. */
input: HTMLInputElement;
/** The value of the input. */
value: string;
}
export interface KbqTagSeparator {
symbol: RegExp;
key: string;
}
/**
* Directive that adds tag-specific behaviors to an input element inside ``.
* May be placed inside or outside of an ``.
*/
export declare class KbqTagInput implements KbqTagTextControl, OnChanges {
private elementRef;
private defaultOptions;
private trimDirective;
ngControl: NgControl;
autocompleteTrigger?: KbqAutocompleteTrigger | undefined;
/** Whether the control is focused. */
focused: boolean;
/**
* The list of key codes that will trigger a tagEnd event.
*
* Defaults to `[ENTER]`.
*/
set separatorKeyCodes(value: number[]);
private _separatorKeyCodes;
/** @docs-private */
get separators(): KbqTagSeparator[];
private _separators;
/** Emitted when a tag is to be added. */
readonly tagEnd: EventEmitter;
/** A value indicating whether allow/prevent tags duplication */
distinct: boolean;
/** The input's placeholder text. */
placeholder: string;
/** Unique id for the input. */
id: string;
/** Register input for tag list */
set tagList(value: KbqTagList);
private _tagList;
/**
* Whether or not the tagEnd event will be emitted when the input is blurred.
*/
get addOnBlur(): boolean;
set addOnBlur(value: boolean);
private _addOnBlur;
/**
* Whether the tagEnd event will be emitted when the text pasted.
* @default true
*/
addOnPaste: boolean;
/** Whether the input is disabled. */
get disabled(): boolean;
set disabled(value: boolean);
private _disabled;
/** Whether the input is empty. */
get empty(): boolean;
/**
* @docs-private
*
* @deprecated Unused. Will be removed in next major release.
*/
countOfSymbolsForUpdateWidth: number;
/** The native input element to which this directive is attached. */
private inputElement;
constructor(elementRef: ElementRef, defaultOptions: KbqTagsDefaultOptions, trimDirective: KbqTrim, ngControl: NgControl, autocompleteTrigger?: KbqAutocompleteTrigger | undefined);
ngOnChanges(): void;
/** @docs-private */
onKeydown(event: KeyboardEvent): void;
/** Checks to see if the blur should emit the (tagEnd) event. */
blur(event: FocusEvent): void;
triggerValidation(): void;
/** Checks to see if the (tagEnd) event needs to be emitted. */
emitTagEnd(): void;
get hasDuplicates(): boolean;
onInput(): void;
onPaste($event: ClipboardEvent): void;
/**
* @docs-private
*
* @deprecated Unused. Will be removed in next major release.
*/
updateInputWidth(): void;
/** @docs-private */
onFocus(): void;
/** Focuses the input. */
focus(): void;
private getSeparatorsForString;
private trimValue;
private getSeparatorByKeyCode;
private hasControl;
/** Checks whether a keycode is one of the configured separators. */
private isSeparatorKey;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵdir: i0.ɵɵDirectiveDeclaration;
static ngAcceptInputType_addOnPaste: unknown;
}