import { AfterContentInit, ElementRef, EventEmitter, OnChanges, OnDestroy } from '@angular/core';
import { GraniteChipListComponent } from './chip-list.component';
import * as i0 from "@angular/core";
export interface GraniteChipTextControl {
/** Unique identifier for the text control. */
id: string;
/** The text control's placeholder text. */
placeholder: string;
/** Whether the text control has browser focus. */
focused: boolean;
/** Whether the text control is empty. */
empty: boolean;
/** Focuses the text control. */
setFocus(options?: FocusOptions): void;
}
/** Represents an input event on a `graniteChipInput`. */
export interface GraniteChipInputEvent {
/** The native `` element that the event is being fired for. */
input: HTMLInputElement;
/** The value of the input. */
value: string;
/** Reference to the chip input that emitted the event. */
chipInput: GraniteChipInputDirective;
}
export declare class GraniteChipInputDirective implements GraniteChipTextControl, OnChanges, OnDestroy, AfterContentInit {
protected _elementRef: ElementRef;
/** Unique id for the input. */
id: string;
/** The input's placeholder text. */
placeholder: string;
/** Emitted when a chip is to be added. */
readonly graniteChipInputTokenEnd: EventEmitter;
/** Register input for chip list */
set graniteChipInputFor(value: GraniteChipListComponent);
/**
* The list of key codes that will trigger a chipEnd event.
*
* Defaults to `[ENTER]`.
*/
graniteChipInputSeparatorKeyCodes: readonly number[] | ReadonlySet;
/**
* Whether or not the chipEnd event will be emitted when the input is blurred.
*/
get graniteChipInputAddOnBlur(): boolean;
set graniteChipInputAddOnBlur(value: boolean);
_addOnBlur: boolean;
/**
* Whether this is a required field, currently we use it only for setting aria-required.
*/
get required(): boolean;
set required(value: boolean);
/** The native input element to which this directive is attached. */
readonly inputElement: HTMLInputElement;
_chipList: GraniteChipListComponent;
focused: boolean;
protected _required: boolean | undefined;
/** Whether the input is disabled. */
get disabled(): boolean;
set disabled(value: boolean);
/** Whether the input is empty. */
get empty(): boolean;
private _disabled;
/** Used to prevent focus moving to chips while user is holding backspace */
private _focusLastChipOnBackspace;
constructor(_elementRef: ElementRef);
ngOnChanges(): void;
ngOnDestroy(): void;
ngAfterContentInit(): void;
/** Utility method to make host definition/tests more clear. */
_keydown(event?: KeyboardEvent): void;
/**
* Pass events to the keyboard manager. Available here for tests.
*/
_keyup(event: KeyboardEvent): void;
/** Checks to see if the blur should emit the (chipEnd) event. */
_blur(): void;
_focus(): void;
/** Checks to see if the (chipEnd) event needs to be emitted. */
_emitChipEnd(event?: KeyboardEvent): void;
_onInput(): void;
/** Focuses the input (called from parent level). */
setFocus(options?: FocusOptions): void;
/** Clears the input */
clear(): void;
/** Checks whether a keycode is one of the configured separators. */
private _isSeparatorKey;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵdir: i0.ɵɵDirectiveDeclaration;
}