import * as i0 from '@angular/core';
import { OnDestroy, ChangeDetectorRef, Injector, InjectionToken, TemplateRef, ElementRef, QueryList, OnInit, DoCheck, AfterViewInit, DestroyRef, PipeTransform, EventEmitter } from '@angular/core';
import { Subscription, Observable, BehaviorSubject, Subject } from 'rxjs';
import { Nullable, ContentDensity, HasElementRef } from '@fundamental-ngx/cdk/utils';
import { BooleanInput } from '@angular/cdk/coercion';
import { NgControl, FormGroup, AbstractControl, FormControl, ControlValueAccessor, ControlContainer, NgForm } from '@angular/forms';
import { FormStates, FormFieldControl, FormField, FormFieldAdvancedStateMessage } from '@fundamental-ngx/cdk/forms';
import { FormInputMessageGroupComponent, InlineHelpFormPlacement } from '@fundamental-ngx/core/form';
import { TriggerConfig } from '@fundamental-ngx/core/popover';
import { BreakpointObserver } from '@angular/cdk/layout';
import { ModifierKeys } from '@angular/cdk/testing';

/**
 * This class contains common properties used across components.
 * this can be extended to reduce the code duplication across components.
 * @hidden for form related Base , see BaseInput.
 */
declare abstract class BaseComponent implements OnDestroy {
    /** Sets the `aria-label` attribute to the element. */
    ariaLabel: Nullable<string>;
    /** Sets the `aria-labelledby` attribute to the element. */
    ariaLabelledBy: Nullable<string>;
    /**
     * @deprecated
     * Use `ariaLabelledBy` instead.
     */
    set ariaLabelledby(value: Nullable<string>);
    /** Sets the `aria-describedby` attribute to the element. */
    ariaDescribedBy: Nullable<string>;
    /** id for the Element */
    id: string;
    /** name for the element */
    name: string;
    /** width of the element */
    width: string;
    /** disabled status of the element */
    set disabled(disabled: boolean);
    get disabled(): boolean;
    /** @hidden */
    protected _disabled: boolean;
    /** @hidden */
    protected _subscriptions: Subscription;
    /**
     * @hidden
     * Change detector ref.
     */
    protected readonly _cdr: ChangeDetectorRef;
    /** @hidden */
    ngOnDestroy(): void;
    /**
     * @hidden
     * For internal usage only
     *
     * Since all components use OnPush strategy in the fundamental lib
     * it's tricky to update a child input directly from a parent component class
     *
     */
    markForCheck(): void;
    /**
     * @hidden
     * For internal usage only
     *
     * Since all components use OnPush strategy in the fundamental lib
     * it's tricky to update a child input directly from a parent component class
     *
     */
    detectChanges(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponent, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<BaseComponent, never, never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; }; "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "width": { "alias": "width"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
}

/**
 * Platform lib Config
 */
declare class PlatformConfig {
    /** @hidden */
    private static injector;
    /**
     * Content Density of element. 'cozy' | 'compact' | 'condensed'
     */
    contentDensity: ContentDensity;
    /** @hidden */
    static setInjector(injector: Injector): void;
    /** @hidden */
    static getInjector(): Injector | null;
    static ɵfac: i0.ɵɵFactoryDeclaration<PlatformConfig, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<PlatformConfig>;
}

/**
 *
 * When working with large set of data using components such as:
 *  - Datatables
 *  - InputSearch
 *  - ComboBox (Autocomplete)
 *  - Tree
 *  - List
 *  - etc..
 *  and for these we need to unify the way we access a data. Currently we leave most of the complex
 *  data access or data manipulation on application developer which leads to different
 *  implementation approaches and allot of code duplication.
 *
 *  It is common practice when working with different data input sources we try to apply some
 *  Design patterns e.g. Adapter Pattern that provides us with guidelines how different interfaces
 *  can talk to each other and from here we can derive another pattern so called Datasource pattern
 *  which is high-level architectural pattern to abstract data and internal resources
 *  access (DB calls, Rest calls, domain objects) with a mininal amount a code.
 *
 * What we want to achieve is to define abstract layer where each specific resource type needs to
 * implement and move all the related logic into reusable DataSources. (TableDataSource,
 * ComboBoxDataSource, ... )
 *
 * Observable<T[]> is a reactive stream, that changes its content based on what it pushed
 * into it using .next().
 *
 * Each type of data component such Autocomplete, DataTable, List,.. needs to provide its own
 * specific implementation to handle specific use-case.
 *
 * ```
 *  export abstract class DataTableDataSource<T> implements DataSource<T> {
 *    data: T[];
 *    filterTerm: string;
 *    paginator: Paginator | null
 *
 *    filterPredicate: ((data: T, filter: string) => boolean;
 *
 *    sortData: ((data: T[], sort: Sort) => T[]);
 *
 *    //
 *    create (t: T): T;
 *    update (t: T): T;
 *    remove (t: T): T;
 *
 *  }
 * ```
 *
 * After we define a format we can start creating concrete implementations based on the usage or
 * resource .e.g:
 *
 *
 * ```
 * export abstract class RestAutoCompleteDataSource<T> extend DataChooserDataSource <T> {
 *   // We can use a registry that is able to map a Entity Type = Endpoint
 *   // have identical way how to fetch , search ,...
 * }
 * ```
 *
 * Probably when working with data only locally, it can be:
 *
 * ```
 * export abstract class LocalArrayAutoCompleteDataSource<T> extend DataChooserDataSource <T> {
 * }
 * ```
 *
 *
 */

declare enum MatchingStrategy {
    STARTS_WITH_PER_TERM = "starts with per term",
    STARTS_WITH = "starts with",
    CONTAINS = "contains"
}
declare const DATA_PROVIDERS: InjectionToken<Map<string, DataProvider<any>>>;
interface DataSource<T, P = T[], L = boolean> {
    isDataLoading: L;
    open(): Observable<P>;
    close(): void;
    onDataRequested(): Observable<void>;
    onDataReceived(): Observable<void>;
}
type MatchBy = (item: any) => any;
interface MatchingBy {
    firstBy: MatchBy;
    secondaryBy?: MatchBy;
}
/** Matching Strategy: StartsWithPerTerm - Reqexp */
declare function getMatchingStrategyStartsWithPerTermReqexp(value: string): RegExp;
/** @hidden */
declare function isDataSource<T = any>(value: any): value is DataSource<T>;
type ProviderParams = ReadonlyMap<string, any>;
/**
 * Provider is a data driver that can access data and retrieve them. It knows how to get 1
 * or more records, maybe do paging and some other things.
 *
 */
declare abstract class DataProvider<T> {
    abstract fetch(params: ProviderParams, start?: number, end?: number): Observable<T[]>;
    /** @hidden */
    protected _keyPath: string;
    /** @hidden */
    protected _matchingStrategy: MatchingStrategy;
    /** @hidden */
    protected _matchingBy: MatchingBy | null;
    /** @hidden */
    getTotalItems?(): Observable<number>;
    /**
     * Tells if this DataProvider supports INSERT, REMOVE
     *
     */
    canCRUD(): boolean;
    /** @hidden */
    getOne(params: ProviderParams): Observable<T>;
    /** @hidden */
    insert(payload: any, params?: ProviderParams): Observable<T>;
    /** @hidden */
    remove(params: ProviderParams): Observable<boolean>;
    /** @hidden */
    update(payload: any, params?: ProviderParams): Observable<T>;
    /** @hidden */
    setLookupKey(key: string): void;
    /** @hidden */
    setMatchingBy(matchingBy: MatchingBy): void;
    /** @hidden */
    setMatchingStrategy(strategy: MatchingStrategy): void;
}
declare class ComboBoxDataSource<T> implements DataSource<T> {
    dataProvider: DataProvider<any>;
    /** @hidden */
    static readonly MaxLimit = 5;
    /** @hidden */
    limitless: boolean;
    /** @hidden */
    protected readonly _dataChanges: BehaviorSubject<T[]>;
    /** @hidden */
    protected readonly _onDataRequested$: Subject<void>;
    /** @hidden */
    protected readonly _onDataReceived$: Subject<void>;
    /** @hidden */
    protected readonly _onDestroy$: Subject<void>;
    /** @hidden */
    protected _dataLoading: boolean;
    /** @hidden */
    get isDataLoading(): boolean;
    /** @hidden */
    constructor(dataProvider: DataProvider<any>);
    /** @hidden */
    match(predicate?: string | Map<string, string>, start?: number, end?: number): void;
    /** @hidden */
    open(): Observable<T[]>;
    /** @hidden */
    close(): void;
    /** @hidden */
    onDataRequested(): Observable<void>;
    /** @hidden */
    onDataReceived(): Observable<void>;
}
declare class MultiComboBoxDataSource<T> extends ComboBoxDataSource<T> {
    dataProvider: DataProvider<any>;
    /** @hidden */
    constructor(dataProvider: DataProvider<any>);
}
declare class SearchFieldDataSource<T> extends ComboBoxDataSource<T> {
    dataProvider: DataProvider<any>;
    /** @hidden */
    constructor(dataProvider: DataProvider<any>);
}
declare class ListDataSource<T> extends ComboBoxDataSource<T> {
    dataProvider: DataProvider<any>;
    /** @hidden */
    limitless: boolean;
    /** @hidden */
    constructor(dataProvider: DataProvider<any>);
}
declare class MultiInputDataSource<T> extends ComboBoxDataSource<T> {
    dataProvider: DataProvider<any>;
    /** @hidden */
    constructor(dataProvider: DataProvider<any>);
}
declare class ApprovalFlowUserDataSource<T> extends ComboBoxDataSource<T> {
    dataProvider: DataProvider<T>;
    /** @hidden */
    constructor(dataProvider: DataProvider<T>);
}
declare class ApprovalFlowTeamDataSource<T> extends ComboBoxDataSource<T> {
    dataProvider: DataProvider<T>;
    /** @hidden */
    constructor(dataProvider: DataProvider<T>);
}

declare class ArrayComboBoxDataSource<T> extends ComboBoxDataSource<T> {
    private data;
    /** @hidden */
    constructor(data: T[]);
}
declare class ArrayMultiComboBoxDataSource<T> extends MultiComboBoxDataSource<T> {
    private data;
    /** @hidden */
    constructor(data: T[]);
}
declare class ArrayListDataSource<T> extends ListDataSource<T> {
    private data;
    /** @hidden */
    constructor(data: T[]);
}
declare class ArrayMultiInputDataSource<T> extends MultiInputDataSource<T> {
    private data;
    /** @hidden */
    constructor(data: T[]);
}

/**
 * Default implementation for Observable Arrays and Arrays.
 */

/**
 * In Memory implementation of DataProvider that supports fulltext search
 */
declare class BaseDataProvider<T> extends DataProvider<T> {
    protected values: Observable<T[]> | T[];
    /** @hidden */
    constructor(values: Observable<T[]> | T[]);
    /** @hidden */
    fetch(params: Map<string, any>): Observable<T[]>;
    /**
     * Warning: If you dont supply search Key and you want fulltext search and you use this
     * default implementation be aware that it can  perform poorly as it is naive implementation
     * that does not do deep compare.
     */
    matches(item: T, pattern: string): boolean;
    /** @hidden */
    matchesBy(item: any, pattern: string, matchingBy: MatchBy): boolean;
    /** @hidden */
    protected hasObjectValue(obj: any, pattern: string): boolean;
    /** @hidden */
    private withLimit;
}

/**
 * Interface SelectItem is used to deal with complex object in order to be able to format
 * custom label that is shown in the options.
 *
 * Used in various controls: Select, RadioGroup, CheckboxGroup, Combobox
 */
interface SelectItem<T = any> {
    /**
     * Item text shown in the popup
     */
    label: string;
    /**
     * References to the object instance
     */
    value: T;
    disabled?: boolean;
    icon?: string;
    /**
     * Trigger values is a text for selected item
     */
    triggerValue?: string;
    isGroup?: boolean;
    secondaryText?: string;
    children?: SelectItem[];
    /**
     * @hidden
     * Used in settings generator only.
     */
    description?: string;
    /**
     * @hidden
     * Used in settings generator only.
     */
    template?: TemplateRef<any>;
}
interface OptionItem {
    /** Item text */
    label: string;
    /**
     * References to the object instance
     */
    value: any;
    id?: string;
    isGroup?: boolean;
    secondaryText?: string;
    children?: OptionItem[];
}
interface SelectableOptionItem extends OptionItem {
    selected?: boolean;
    children?: SelectableOptionItem[];
}
/** @hidden */
declare function isSelectableItem(item: SelectItem): item is SelectItem;
/** @hidden */
declare function isSelectItem(item: SelectItem): item is SelectItem;
interface MultiInputOption {
    /** Item text */
    label: string;
    /**
     * References to the object instance
     */
    value: any;
    /**
     * Item Avatar
     */
    avatarSrc?: string;
    isGroup?: boolean;
    description?: string;
    children?: MultiInputOption[];
}
declare const isOptionItem: typeof isSelectItem;
declare const isSelectableOptionItem: typeof isSelectableItem;
/**
 * Wraps the provided value in an array, unless it is an array already.
 * If `null` or `undefined` is received, will return an empty array.
 */
declare function coerceArraySafe<T>(value: T | T[]): T[];

/**
 * Default implementation for Observable Arrays.
 */

declare class ObservableComboBoxDataSource<T> extends ComboBoxDataSource<T> {
    private data;
    /** @hidden */
    constructor(data: Observable<T[]>);
}
declare class ObservableMultiComboBoxDataSource<T> extends MultiComboBoxDataSource<T> {
    private data;
    /** @hidden */
    constructor(data: Observable<T[]>);
}
declare class ObservableListDataSource<T> extends ListDataSource<T> {
    private data;
    /** @hidden */
    constructor(data: Observable<T[]>);
}
declare class ObservableMultiInputDataSource<T> extends MultiInputDataSource<T> {
    private data;
    /** @hidden */
    constructor(data: Observable<T[]>);
}

interface FormFieldErrorContext<T> {
    label: string;
    $implicit: T;
}
interface FormError<T = any> {
    detectChanges$: Subject<void>;
    fdpFormFieldErrorAs: T;
    type: FormStates;
    error: string;
    _headingTemplateRef: TemplateRef<FormFieldErrorContext<T>>;
    _descriptionTemplateRef: TemplateRef<FormFieldErrorContext<T>> | null;
    templateRef: TemplateRef<FormFieldErrorContext<T>>;
    registerHeading: (heading: FormErrorHeading) => void;
    registerDescription: (description: FormErrorDescription) => void;
}
interface FormErrorHeading<T = any> {
    fdpFormFieldErrorHeadingAs: T;
    fdpFormFieldErrorHeadingType?: FormStates;
    templateRef: TemplateRef<FormFieldErrorContext<T>>;
}
interface FormErrorDescription<T = any> {
    fdpFormFieldErrorDescriptionAs: T;
    templateRef: TemplateRef<FormFieldErrorContext<T>>;
}
interface FormFieldErrorDirectiveContext {
    directive: FormError;
    error: any;
}

type LabelLayout = 'horizontal' | 'vertical';
type HintPlacement = 'left' | 'right';
type FormZone = 'zTop' | 'zBottom' | 'zLeft' | 'zRight';
type Column = 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
interface ColumnLayout {
    XL?: number;
    L?: number;
    M?: number;
    S?: number;
}
declare enum ColumnLayoutGridClass {
    XL = "xl",
    L = "lg",
    M = "md",
    S = "sm"
}

/**
 * FormField base class.
 *
 * This class is used to create form field components.
 *
 */
declare abstract class PlatformFormField extends FormField {
    /**
     * Form field id
     */
    id: string;
    /**
     * Rank is used for ordering.
     * Than lower number then higher priority
     */
    rank: number;
    /**
     * Form field template reference
     */
    renderer: TemplateRef<any>;
    /**
     * Form field custom width in columns must be between 1 - 12
     */
    columns: Column;
    /**
     * Define form field column belongs
     */
    column: number;
    /**
     * Translations template reference
     */
    i18Strings: TemplateRef<any>;
    /**
     * Indicates if field is editable
     */
    editable: boolean;
    /**
     * Indicates when form field label should not be displayed
     */
    noLabelLayout: boolean;
    /**
     * A reference to the underlying FormFieldControl.
     */
    control: PlatformFormFieldControl | null;
    /**
     * Set when form field is a mandatory one.
     */
    required: boolean;
    /** Form field label */
    label?: string;
    /** Form fields's group. */
    formFieldGroup: Nullable<FormFieldGroup>;
    /** Frm field's Form Container. */
    formGroupContainer: Nullable<FormGroupContainer>;
    /** Grouped errors. */
    groupedErrors: FormFieldErrorDirectiveContext[];
    /** Combined Error directives. */
    errorDirectives: FormError[];
    /** Form control */
    ngControl?: NgControl;
    /** @hidden */
    formControl?: FormControl;
    /** Event emitted when errors being changed. */
    errorsChange$: Subject<void>;
    /** @hidden */
    innerErrorRenderers?: TemplateRef<any>;
    /** Whether form field has validation errors. */
    hasErrors: () => boolean;
}
declare abstract class FormFieldGroup {
    /** Group header*/
    label: string;
    /** Group's form name */
    formName: string;
    /** Group fields */
    fields: QueryList<PlatformFormField>;
    /**
     * Defines label's column layout.
     */
    labelColumnLayout: ColumnLayout;
    /**
     * Defines field's column layout.
     */
    fieldColumnLayout: ColumnLayout;
    /**
     * Defines gap column layout.
     */
    gapColumnLayout: ColumnLayout;
}
type FdpFormFieldControl<T = any> = FormFieldControl<T>;
declare abstract class PlatformFormFieldControl<T = any> implements FormFieldControl<T> {
    /**
     * To allow user to determine what event he wants to trigger the messages to show
     * Accepts any [HTML DOM Events](https://www.w3schools.com/jsref/dom_obj_event.asp).
     */
    abstract triggers: (string | TriggerConfig)[];
    /** State message configuration. Used for components that can render form message inside its template. */
    abstract stateMessageConfig: Nullable<TemplateRef<any>>;
    /** Method for focusing on the element */
    abstract focus(event?: MouseEvent): void;
    /**
     * Handles even when we click on parent container which is the FormField Wrapping this
     * control
     */
    abstract onContainerClick(event: MouseEvent): void;
    /** @hidden */
    formMessage: Nullable<FormInputMessageGroupComponent>;
    /**
     * Each input control has always a value. Need to make sure we keep a convention for
     * input fields
     */
    value: T | null;
    /**
     * Need to have a way to set placeholder to the input
     */
    placeholder: string;
    /**
     * Need to have a way to set Mandatory to the input field
     */
    required: boolean;
    /**
     * Sets id from FF to Input
     */
    id: string;
    /**
     * This should be coming from Parent.
     */
    editable: boolean;
    /**
     * The height of the extra content at the bottom of the form control,
     * which should not affect the alignment of form control and it's label
     */
    extraContentHeightPx?: number;
    /**
     *
     * Form Field listen for all the changes happening inside the input
     */
    readonly stateChanges: Observable<void>;
    /**
     *  Each input should inject its own ngControl and we should retrieve it
     */
    readonly ngControl: NgControl | null;
    /** Whether the control is disabled. */
    readonly disabled: boolean;
    /**
     * Keeps track if the form element is in focus
     */
    readonly focused: boolean;
    /** Whether control has errors */
    readonly controlInvalid: boolean;
    /** Corresponding element reference. */
    readonly elementRef: ElementRef;
    /** Form field instance. */
    formField: Nullable<PlatformFormField>;
}
/**
 * FormGroup base class.
 *
 * This class is used to create form group components.
 *
 */
declare abstract class FormGroupContainer {
    /**
     * Angular FormGroup where all underlying controls will be attached to.
     */
    formGroup: FormGroup;
    /**
     * Translations template reference.
     */
    i18Strings: TemplateRef<any>;
    /**
     * Indicates when form is editable.
     */
    editable: boolean;
    /**
     * Indicates when labels should not be displayed.
     */
    noLabelLayout: boolean;
    /**
     * Defines label's column layout.
     */
    labelColumnLayout: ColumnLayout;
    /**
     * Defines field's column layout.
     */
    fieldColumnLayout: ColumnLayout;
    /**
     * Defines gap column layout.
     */
    gapColumnLayout: ColumnLayout;
    /**
     * Form's main title.
     */
    mainTitle?: Nullable<string>;
    /**
     * Attach underlying form field.
     */
    addFormField: (formField: PlatformFormField) => void;
    /**
     * Detach underlying form field.
     */
    removeFormField: (formField: PlatformFormField) => void;
    /**
     * Attach formControl.
     */
    addFormControl: (name: string, control: AbstractControl) => void;
    /**
     * Detach form formControl.
     */
    removeFormControl: (name: string) => void;
    /**
     * Attach underlying form field group.
     */
    addFormFieldGroup: (formFieldGroup: FormFieldGroup) => void;
    /**
     * Detach underlying form field group.
     */
    removeFormFieldGroup: (formFieldGroup: FormFieldGroup) => void;
}

declare const FDP_DO_CHECK: InjectionToken<Observable<void>>;
declare const FDP_FORM_SUBMIT: InjectionToken<Observable<void>>;
/**
 * All form components share the same information (value, name, placeholder,.. ) as well as
 * the same behavior given by ControlValueAccessor.
 *
 * Even this is not ideal solution there is no other way then use inheritance to reuse some of the
 * common logic. It should be possible to use some kind of compositions with Proxies but something
 * similar that exists in Aspect Oriented Programing.
 *
 * Usually try to fire stateChange only for things that can change dynamically in runtime. We don't expect
 * that e.g. placeholder will change after component is created
 */
declare abstract class BaseInput extends BaseComponent implements PlatformFormFieldControl, ControlValueAccessor, OnInit, DoCheck, AfterViewInit, OnDestroy, HasElementRef {
    /** Input placeholder */
    placeholder: string;
    /**
     * To allow user to determine what event he wants to trigger the messages to show
     * Accepts any [HTML DOM Events](https://www.w3schools.com/jsref/dom_obj_event.asp).
     */
    triggers: (string | TriggerConfig)[];
    /**
     *  The state of the form control - applies css classes.
     *  Can be 'success', 'error', 'warning', 'default', 'information'.
     *
     * @default 'default'
     */
    set state(state: FormStates | undefined);
    get state(): FormStates;
    /** Holds the message with respect to state */
    stateMessage: Nullable<string>;
    /** Advanced form message configuration. Used for components that can render form messages in its template. */
    stateMessageConfig: Nullable<TemplateRef<any>>;
    /** Whether the input is disabled */
    set disabled(value: boolean);
    get disabled(): boolean;
    /**
     * readOnly Value to Mark component read only
     */
    readonly: boolean;
    /**
     * Tell the component if we are in editing mode.
     */
    set editable(value: boolean);
    get editable(): boolean;
    /** Form control validation event strategy. */
    validationStrategy: ('touched' | 'dirty' | 'submitted')[];
    /**
     * Reference to internal Input element
     */
    protected _elementRef: ElementRef;
    /**
     * need to make  these value accessor as abstract to be implemented by subclasses. Having them
     * in superclass have issue getting reference to them with Object.getOwnPropertyDescripton
     * which we need to programmatically wraps components set/get value
     *
     */
    abstract get value(): any;
    abstract set value(value: any);
    /** @hidden */
    formMessage: Nullable<FormInputMessageGroupComponent>;
    /**
     * See @FormFieldControl
     */
    focused: boolean;
    /** set when input field is mandatory form field */
    required: boolean;
    /** @hidden */
    innerErrorsTemplate?: TemplateRef<any>;
    /** Whether control has errors */
    get controlInvalid(): boolean;
    /** @hidden */
    advancedStateMessage: Nullable<FormFieldAdvancedStateMessage>;
    /**
     * See @FormFieldControl
     */
    readonly stateChanges: Subject<any>;
    /** @hidden */
    readonly formField: PlatformFormField | null;
    /** @hidden */
    readonly _doCheck$: Observable<void> | null;
    /** Element reference. */
    readonly elementRef: ElementRef<any>;
    /** NgControl reference. */
    readonly ngControl: NgControl | null;
    /** Control container reference. */
    readonly controlContainer: ControlContainer | null;
    /** Form reference. */
    readonly ngForm: NgForm | null;
    /**
     * @hidden
     * The state of the form control - applies css classes.
     * Can be `success`, `error`, `warning`, `information` or 'default'
     */
    protected _state: FormStates | undefined;
    /** @hidden */
    protected defaultId: string;
    /** @hidden */
    protected _value: any;
    /** @hidden */
    protected _editable: boolean;
    /** @hidden */
    protected _destroyed: DestroyRef;
    /** @hidden */
    private readonly _externalSubmit;
    /** @hidden */
    private _externalFormSubmitted;
    /**
     * @hidden
     */
    private _controlInvalid;
    /** @hidden */
    constructor();
    /** @hidden */
    onChange: (value: any) => void;
    /** @hidden */
    onTouched: () => void;
    /** @hidden */
    ngOnInit(): void;
    /**
     * Re-validate and emit event to parent container on every CD cycle as they are some errors
     * that we can't subscribe to.
     */
    ngDoCheck(): void;
    /** @hidden */
    ngAfterViewInit(): void;
    /** @hidden */
    registerOnChange(fn: (_: any) => void): void;
    /** @hidden */
    registerOnTouched(fn: () => void): void;
    /** @hidden */
    ngOnDestroy(): void;
    /** @hidden */
    setDisabledState(isDisabled: BooleanInput): void;
    /**
     * Each sub class must override this method as inheritance does not work
     */
    writeValue(value: any): void;
    /**
     *
     * Keeps track of element focus
     */
    _onFocusChanged(isFocused: boolean): void;
    /**
     * Handles even when we click on parent container which is the FormField Wrapping this
     * control
     */
    onContainerClick(event: MouseEvent): void;
    /**
     * In most of the cases when working with input element directly you should be just find to assing
     * variable to this element
     *
     * ```
     * <input #inputElementRef fd-form-control ...>
     * ```
     *
     * and this default behavior used. For other cases implement focus.
     *
     */
    focus(event?: MouseEvent): void;
    /**
     *  Need re-validates errors on every CD iteration to make sure we are also
     *  covering non-control errors, errors that happens outside of this control
     */
    protected updateErrorState(): void;
    /**
     * Used to change the value of a control.
     * @param value the value to be applied
     * @param emitOnChange whether to emit "onChange" event.
     * Should be "false", if the change is made programmatically (internally) by the control, "true" otherwise
     */
    protected setValue(value: any, emitOnChange?: boolean): void;
    /** @hidden */
    protected getValue(): any;
    static ɵfac: i0.ɵɵFactoryDeclaration<BaseInput, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<BaseInput, never, never, { "placeholder": { "alias": "placeholder"; "required": false; }; "triggers": { "alias": "triggers"; "required": false; }; "state": { "alias": "state"; "required": false; }; "stateMessage": { "alias": "stateMessage"; "required": false; }; "stateMessageConfig": { "alias": "stateMessageConfig"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "validationStrategy": { "alias": "validationStrategy"; "required": false; }; }, {}, never, never, true, never>;
    static ngAcceptInputType_editable: unknown;
}

/**
 * Defines specific behavior for Input controls which deals with list of values including:
 *  - Select
 *  - RadioGroup
 *  - CheckboxGroup
 *  - ComboBox
 *  ...
 *
 */
declare abstract class CollectionBaseInput extends BaseInput {
    /**
     * List of values, it can be of type SelectItem, string or any object.
     * Generic object type is among the list of types,
     * because we allow to get labels and values using `displayKey` and `lookupKey` inputs accordingly.
     */
    set list(value: Array<SelectItem | string | object>);
    get list(): Array<SelectItem | string | object>;
    /**
     * Used in filters and any kind of comparators when we work with objects and this identify
     * unique field name based on which we are going to do the job
     */
    lookupKey: string;
    /**
     * When we deal with unknown object we can use `displayKey` to retrieve value from specific
     * property of the object to act as display value.
     *
     * @See ComboBox, Select, RadioGroup, CheckBox Group
     */
    displayKey: string;
    /** @hidden */
    private _list;
    /** @hidden */
    lookupValue(item: any): string;
    /** @hidden */
    displayValue(item: any): string;
    /** @hidden */
    objectGet(obj: any, is: string | string[] | undefined): any;
    static ɵfac: i0.ɵɵFactoryDeclaration<CollectionBaseInput, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<CollectionBaseInput, never, never, { "list": { "alias": "list"; "required": false; }; "lookupKey": { "alias": "lookupKey"; "required": false; }; "displayKey": { "alias": "displayKey"; "required": false; }; }, {}, never, never, true, never>;
}

type HintContent = string | TemplateRef<void>;
type HintInput = HintContent | HintOptions;
type FieldHintInput = HintContent | FieldHintOptions;
interface HintOptions {
    /** Text or the template of the hint */
    content: HintContent;
    /** Text position of the inline help icon, relative to label */
    position?: InlineHelpFormPlacement;
    /** Trigger events for showing and hiding help */
    trigger?: (string | TriggerConfig)[];
    /** Hint placement */
    placement?: HintPlacement;
    /** Icon name of the inline help element */
    glyph?: string;
}
interface FieldHintOptions extends HintOptions {
    /** Target where hint should be placed */
    target?: 'auto' | 'input' | 'label';
}

interface InlineLayout {
    XL?: boolean;
    L?: boolean;
    M?: boolean;
    S?: boolean;
}
declare enum RESPONSIVE_BREAKPOINTS {
    S = 600,
    M = 1024,
    L = 1440
}
declare const RESPONSIVE_BREAKPOINTS_CONFIG: InjectionToken<ResponsiveBreakPointConfig>;
declare class ResponsiveBreakPointConfig {
    /** Large screen */
    L: number;
    /** Medium screen */
    M: number;
    /** Small screen */
    S: number;
    static ɵfac: i0.ɵɵFactoryDeclaration<ResponsiveBreakPointConfig, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<ResponsiveBreakPointConfig>;
}
declare class ResponsiveBreakpointsService {
    readonly _breakpointObserver: BreakpointObserver;
    /** @hidden */
    breakpoints: Record<string, any>;
    /** @hidden */
    activeBreakpoints: string[];
    /** @hidden */
    minWidth: string;
    /** @hidden */
    maxWidth: string;
    /** @hidden */
    unit: string;
    /** @hidden */
    constructor(_breakpointObserver: BreakpointObserver);
    /** subscribe to get current screen size based on config provided */
    observeBreakpointByConfig(config: ResponsiveBreakPointConfig): Subject<any>;
    /** @hidden when screen size changes from one breakpoint to another */
    private _breakPointMeet;
    /** @hidden */
    private _getBreakpoints;
    /** @hidden */
    private _getBreakpointName;
    static ɵfac: i0.ɵɵFactoryDeclaration<ResponsiveBreakpointsService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<ResponsiveBreakpointsService>;
}
declare abstract class InLineLayoutCollectionBaseInput extends CollectionBaseInput implements OnInit {
    /** object to change isInline property based on screen size */
    set inlineLayout(layout: InlineLayout | undefined);
    get inlineLayout(): InlineLayout;
    /** @hidden */
    protected _inlineCurrentValue$: BehaviorSubject<boolean>;
    /** @hidden */
    protected readonly _responsiveBreakpointsService: ResponsiveBreakpointsService;
    /** @hidden */
    protected readonly _responsiveBreakPointConfig: ResponsiveBreakPointConfig;
    /** @hidden */
    private _inlineLayout;
    /** @hidden */
    private _xlIsInline;
    /** @hidden */
    private _lgIsInline;
    /** @hidden */
    private _mdIsInline;
    /** @hidden */
    private _sIsInline;
    /** @hidden */
    private _isInLineLayoutEnabled;
    /** @hidden */
    ngOnInit(): void;
    /** @hidden set values of inline for each screen layout */
    private _setFieldLayout;
    /** @hidden */
    private _updateLayout;
    static ɵfac: i0.ɵɵFactoryDeclaration<InLineLayoutCollectionBaseInput, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<InLineLayoutCollectionBaseInput, never, never, { "inlineLayout": { "alias": "inlineLayout"; "required": false; }; }, {}, never, never, true, never>;
}

declare class ConvertBytesPipe implements PipeTransform {
    /** @hidden */
    private readonly _sizes;
    /** @hidden */
    transform(bytes: number): string;
    /**
     * Convert bytes to KB, MB, GB, ...
     * @param bytes number
     * @param decimals number
     */
    private _convertBytes;
    static ɵfac: i0.ɵɵFactoryDeclaration<ConvertBytesPipe, never>;
    static ɵpipe: i0.ɵɵPipeDeclaration<ConvertBytesPipe, "convertBytes", true>;
}

declare class PlatformPipeModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<PlatformPipeModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<PlatformPipeModule, never, [typeof ConvertBytesPipe], [typeof ConvertBytesPipe]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<PlatformPipeModule>;
}

/**
 * @license
 * Copyright Google LLC All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */

/**
 * Creates a browser MouseEvent with the specified options.
 * @docs-private
 */
declare function createMouseEvent(type: string, x?: number, y?: number, button?: number): MouseEvent;
/**
 * Creates a browser TouchEvent with the specified pointer coordinates.
 * @docs-private
 */
declare function createTouchEvent(type: string, pageX?: number, pageY?: number): Event;
/**
 * Dispatches a keydown event from an element.
 * @docs-private
 */
declare function createKeyboardEvent(type: string, keyCode?: number, key?: string, target?: Element, modifiers?: ModifierKeys): KeyboardEvent;
/**
 * Creates a fake event object with any desired event type.
 * @docs-private
 */
declare function createFakeEvent(type: string, canBubble?: boolean, cancelable?: boolean): Event;

/** @hidden */
declare function objectValues(obj: any): any[];
/** @hidden */
declare function objectToName(target: any): string;
/** @hidden */
declare function isJsObject(o: any): boolean;
/** @hidden */
declare function isPresent(obj: any): boolean;
/** @hidden */
declare function isBlank(obj: any): boolean;
/** @hidden */
declare function isBoolean(obj: any): boolean;
/** @hidden */
declare function isNumber(obj: any): boolean;
/** @hidden */
declare function isString(obj: any): obj is string;
/** @hidden */
declare function isFunction(obj: any): boolean;
/** @hidden */
declare function isType(obj: any): boolean;
/** @hidden */
declare function isStringMap(obj: any): obj is Record<string, any>;
/** @hidden */
declare function isObject<T>(item: T): boolean;
/** @hidden */
declare function isPromise<T = any>(obj: any): obj is Promise<T>;
/** @hidden */
declare function isSubscribable(obj: any | Observable<any>): obj is Observable<any>;

interface PresetManagedComponent<T> {
    name: string;
    presetChanged: EventEmitter<T>;
    setPreset(data: T): void;
    getCurrentPreset(): T;
}

declare const FDP_PRESET_MANAGED_COMPONENT: InjectionToken<unknown>;

export { ApprovalFlowTeamDataSource, ApprovalFlowUserDataSource, ArrayComboBoxDataSource, ArrayListDataSource, ArrayMultiComboBoxDataSource, ArrayMultiInputDataSource, BaseComponent, BaseDataProvider, BaseInput, CollectionBaseInput, ColumnLayoutGridClass, ComboBoxDataSource, ConvertBytesPipe, DATA_PROVIDERS, DataProvider, FDP_DO_CHECK, FDP_FORM_SUBMIT, FDP_PRESET_MANAGED_COMPONENT, FormFieldGroup, FormGroupContainer, InLineLayoutCollectionBaseInput, ListDataSource, MatchingStrategy, MultiComboBoxDataSource, MultiInputDataSource, ObservableComboBoxDataSource, ObservableListDataSource, ObservableMultiComboBoxDataSource, ObservableMultiInputDataSource, PlatformConfig, PlatformFormField, PlatformFormFieldControl, PlatformPipeModule, RESPONSIVE_BREAKPOINTS, RESPONSIVE_BREAKPOINTS_CONFIG, ResponsiveBreakPointConfig, ResponsiveBreakpointsService, SearchFieldDataSource, coerceArraySafe, createFakeEvent, createKeyboardEvent, createMouseEvent, createTouchEvent, getMatchingStrategyStartsWithPerTermReqexp, isBlank, isBoolean, isDataSource, isFunction, isJsObject, isNumber, isObject, isOptionItem, isPresent, isPromise, isSelectItem, isSelectableItem, isSelectableOptionItem, isString, isStringMap, isSubscribable, isType, objectToName, objectValues };
export type { Column, ColumnLayout, DataSource, FdpFormFieldControl, FieldHintInput, FieldHintOptions, FormError, FormErrorDescription, FormErrorHeading, FormFieldErrorContext, FormFieldErrorDirectiveContext, FormZone, HintContent, HintInput, HintOptions, HintPlacement, InlineLayout, LabelLayout, MatchBy, MatchingBy, MultiInputOption, OptionItem, PresetManagedComponent, ProviderParams, SelectItem, SelectableOptionItem };
