import { SelectionModel } from '@angular/cdk/collections';
import { CdkVirtualScrollViewport, ScrollDispatcher } from '@angular/cdk/scrolling';
import { AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, IterableDiffer, IterableDiffers, OnDestroy, OnInit, QueryList } from '@angular/core';
import { ControlContainer, ControlValueAccessor, FormControl, UntypedFormControl } from '@angular/forms';
import { MatOption, MatOptionSelectionChange, ThemePalette } from '@angular/material/core';
import { FloatLabelType, MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field';
import { MatPaginator } from '@angular/material/paginator';
import { MatSelect } from '@angular/material/select';
import { Params } from '@angular/router';
import { BehaviorSubject, Subscription } from 'rxjs';
import { PaginatedResponse, PaginatorFetcher } from '../paginator/paginator.model';
import { DropdownPaginatorConfig, LoaderConfig } from './dropdown.model';
import * as i0 from "@angular/core";
/**
 * Component to manage dropdown with a search input
 *
 * This component support server side pagnation
 */
export declare class DropdownComponent<T extends Object> implements OnInit, DoCheck, OnDestroy, AfterViewInit, ControlValueAccessor {
    private readonly cd;
    private readonly sd;
    private readonly differs;
    private readonly controlContainer?;
    /**
     * Pagination index
     */
    pageIndex: import("@angular/core").WritableSignal<number>;
    /**
     * Global counter used to paginate the list
     */
    dataTotalSize: import("@angular/core").WritableSignal<number>;
    /**
     * Is the list loading for the first time
     */
    firstLoading: boolean;
    /**
     * Value to manage all checkbox
     * This value is exclude from result
     */
    allValue: Object;
    /**
     * Form control to manage the search input
     */
    search: FormControl<string>;
    /**
     * Associate control for ControlValueAccessor
     */
    control: FormControl<T | T[]>;
    /**
     * Model to store selection
     */
    selection: SelectionModel<T>;
    /**
     * Filter data used to display dropdown options
     */
    searchData: import("@angular/core").WritableSignal<T[]>;
    /**
     * Virtual scroll subscription
     */
    sdSubscription?: Subscription;
    /**
     * Show content is used to manage transclusion on dropdown
     */
    showContent: boolean;
    /**
     * Data fetcher subscription
     */
    dataSubscr?: Subscription;
    /**
     * Data counter subscription
     */
    dataTotalSubscr: Subscription;
    /**
     * Loading subject used during data fetching
     */
    loadingSubject: BehaviorSubject<boolean>;
    readonly dataSourceSubject: BehaviorSubject<PaginatedResponse<T>>;
    /**
     * Put your data with this attribute
     *
     * Alternative : use fetcher
     */
    data: import("@angular/core").InputSignal<T[]>;
    /**
     * Dropdown label
     */
    label?: string;
    /**
     * Material appearance for the input
     */
    appearance?: MatFormFieldAppearance;
    /**
     * Material theme palette for the input
     */
    color: ThemePalette;
    /**
     * Loader configuration
     */
    loaderConfig?: LoaderConfig;
    /**
     * You can use this input to activate virtual scroll
     */
    virtualScroll?: boolean;
    /**
     * Material float label
     */
    floatLabel?: FloatLabelType;
    /**
     * Define the displayed attribute
     *
     * Support string for basic usage or function for more specificities
     */
    attribute: import("@angular/core").InputSignal<string | ((elt: T) => string | undefined | null)>;
    /**
     * Input placeholder
     */
    placeholder: string;
    /**
     * Placeholder when no data present
     */
    emptyPlaceholder?: string;
    /**
     * Placeholder for search input
     */
    searchPlaceholder?: string;
    /**
     * Is the input required
     */
    required: boolean;
    /**
     * Required text message
     */
    requiredLabel?: string;
    /**
     * When an option is null, add a text to describe the element
     */
    nullLabel: import("@angular/core").InputSignal<string>;
    /**
     * Label display for the
     */
    allLabel: import("@angular/core").InputSignal<string>;
    /**
     * Allow multiple selection
     */
    multiple: import("@angular/core").InputSignal<boolean>;
    /**
     * Limit selection for a multiple dropdown
     */
    limitSelection?: number;
    /**
     * Define pagination configuration
     */
    paginator?: DropdownPaginatorConfig;
    /**
     * Put filters for the pagination request (through fetcher)
     */
    filters?: Params;
    /**
     * Fetcher method to retrieve data
     */
    fetcher?: PaginatorFetcher<T>;
    /**
     * Whether the form field should reserve space for one line of hint/error text (default) or to have the spacing grow from 0px as needed based on the size of the hint/error content.
     *
     * Note that when using dynamic sizing, layout shifts will occur when hint/error text changes.
     */
    subscriptSizing?: SubscriptSizing;
    initLoading: boolean;
    /**
     * Event trigger when the dropdown is opened or closed
     */
    openedChange: EventEmitter<boolean>;
    cdkVirtualScrollViewPort?: CdkVirtualScrollViewport;
    searchInput: ElementRef;
    options?: QueryList<MatOption>;
    /**
     * Manage all selection checkbox
     */
    allSelected?: MatOption;
    content?: ElementRef;
    paginatorRef?: MatPaginator;
    dataDiffer: IterableDiffer<T>;
    private fetcherLoaded;
    /**
     * Bind the dropdown with a formControl
     *
     * Alternative : formControlName
     */
    formControl?: UntypedFormControl;
    /**
     * Bind the dropdown with a formControlName
     *
     * Alternative : formControl
     */
    formControlName?: string;
    displayedPlaceholder?: string;
    debounceTime: import("@angular/core").InputSignal<number>;
    computedPlaceholder: import("@angular/core").Signal<string>;
    constructor(cd: ChangeDetectorRef, sd: ScrollDispatcher, differs: IterableDiffers, controlContainer?: ControlContainer);
    /**
     * Method to compare items
     *
     * @param i
     * @param j
     * @returns
     */
    compareWith: (i: T, j: T) => boolean;
    get pageSize(): number;
    /**
     * Get the parent control using input or control container
     */
    get parentControl(): UntypedFormControl | undefined;
    onChange: (_: T | T[]) => void;
    onTouch: () => void;
    ngOnInit(): void;
    /**
     * Do check
     * Detect touched on the formControl
     *
     * @returns
     */
    ngDoCheck(): void;
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    /**
     * Update search data when data input change
     * Selection should be updated too
     */
    private updateDataAndSelection;
    private retreiveDataUsingFetcher;
    private initSearchField;
    /**
     * Method triggered when the dropdown is opened
     * Reset the search input
     */
    opened(opened: boolean): void;
    /**
     * Check if a checkbox is selected
     * Usefull with paginated dropdown
     */
    checkOptions(): void;
    /**
     * Return selection except value use to checkall option
     *
     * @returns
     */
    getValuesExceptAllSelector(): T[];
    /**
     * Update selected values based on parameter
     */
    updateSelection(values: T[]): void;
    /**
     * In the case of multiple selection
     * Trigger the change detection on formcontrol with the selected value
     */
    onSelectionChange(change: MatOptionSelectionChange, index: number): void;
    /**
     * Virtual scroll open triggered
     */
    foropen(): void;
    /**
     *  Check if an item is active based on a search parameter
     */
    isActive(item: T, value: string | null): boolean;
    /**
     * Return length of data set
     * Usefull for virtual scrolling
     */
    getLength(): number;
    /**
     * Construction of the placeholder based on the selected data
     */
    getSelectTriggerLabel(): string;
    /**
     * If the objects handled are different from a character string,
     * it is possible to target the right attribute with this method
     */
    getAttribute(element: T): string | T;
    /**
     * When the user first interacts with the form control, the control is considered to have the status touched, which is useful for styling.
     * In order to report to the parent form that the control was touched, we need to use a callback registered using the registerOnToched method
     */
    registerOnTouched(fn: any): void;
    /**
     * When a form value changes due to user input, we need to report the value back to the parent form.
     * This is done by calling a callback, that was initially registered with the control using the registerOnChange method
     */
    registerOnChange(fn: any): void;
    /**
     * This method is called by the Forms module to write a value into a form control
     */
    writeValue(value: T | T[]): void;
    /**
     * adds a clear button when one value is selected and
     * expecting to clear selection
     */
    clearSelection(matSelect: MatSelect): void;
    /**
     * Form controls can be enabled and disabled using the Forms API.
     * This state can be transmitted to the form control via the setDisabledState method
     */
    setDisabledState(disabled: boolean): void;
    /**
     * Check if all values are selected
     *
     * @returns
     */
    isAllChecked(): boolean;
    /**
     * Update the selection when all checkbox status change
     */
    toggleAll(event: MatOptionSelectionChange): void;
    /**
     * Load data using fetcher
     * Pagination and search field are passed in parameters
     */
    private loadData;
    /**
     * Manage keyboard actions on search input
     *
     * @param event
     */
    onSearchKeydown(event: KeyboardEvent): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent<any>, [null, null, null, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent<any>, "mic-dropdown-search", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "color": { "alias": "color"; "required": false; }; "loaderConfig": { "alias": "loaderConfig"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "attribute": { "alias": "attribute"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; }; "emptyPlaceholder": { "alias": "emptyPlaceholder"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "requiredLabel": { "alias": "requiredLabel"; "required": false; }; "nullLabel": { "alias": "nullLabel"; "required": false; "isSignal": true; }; "allLabel": { "alias": "allLabel"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "limitSelection": { "alias": "limitSelection"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "fetcher": { "alias": "fetcher"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "initLoading": { "alias": "initLoading"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; }; }, { "openedChange": "openedChange"; }, never, ["*"], false, never>;
}
export declare function getAttributeForObject<T extends Object>(item: T, attribute?: string | ((elt: T) => string | undefined | null)): string | undefined;
