import { CommonFormControl, TrackFn } from '@alauda/ui';
import { ChangeDetectorRef, TemplateRef } from '@angular/core';
import { FormGroupDirective } from '@angular/forms';
import { BehaviorSubject, Observable } from 'rxjs';
import * as i0 from "@angular/core";
export interface SearchableSelectorOption {
    value: unknown;
    label: string;
    filterValue?: string;
    resource?: unknown;
}
export declare type SearchableSelectorFetcher = (params: unknown, keyword: string) => Observable<SearchableSelectorOption[]>;
export declare class SearchableSelectorLabelDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<SearchableSelectorLabelDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<SearchableSelectorLabelDirective, "[aclSearchableSelectorLabel]", never, {}, {}, never, never, false>;
}
export declare class SearchableSelectorOptionDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<SearchableSelectorOptionDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<SearchableSelectorOptionDirective, "[aclSearchableSelectorOption]", never, {}, {}, never, never, false>;
}
export declare class SearchableSelectorComponent extends CommonFormControl<unknown> {
    private readonly parentForm;
    get errorState(): boolean;
    fetcher: SearchableSelectorFetcher;
    fetcher$: Observable<SearchableSelectorFetcher>;
    allowCreate: boolean;
    placeholder: string;
    trackFn: TrackFn<unknown>;
    params: unknown;
    params$: Observable<unknown>;
    multi: boolean;
    clearable: boolean;
    disableFn: (option: SearchableSelectorOption, params?: unknown) => boolean;
    disableParams: unknown;
    disableTooltip: string;
    labelTemplate: TemplateRef<unknown>;
    optionTemplate: TemplateRef<unknown>;
    keyword$$: BehaviorSubject<string>;
    loading: boolean;
    data$: Observable<SearchableSelectorOption[]>;
    constructor(parentForm: FormGroupDirective, cdr: ChangeDetectorRef);
    defaultTrackFn: (value: string) => string;
    filterFn: (keyword: string, option: {
        label: string;
        labelContext: SearchableSelectorOption;
        value: unknown;
    }) => boolean;
    filterChange(keyword: string): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<SearchableSelectorComponent, [{ optional: true; }, null]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SearchableSelectorComponent, "acl-searchable-selector", never, { "fetcher": "fetcher"; "allowCreate": "allowCreate"; "placeholder": "placeholder"; "trackFn": "trackFn"; "params": "params"; "multi": "multi"; "clearable": "clearable"; "disableFn": "disableFn"; "disableParams": "disableParams"; "disableTooltip": "disableTooltip"; }, {}, ["labelTemplate", "optionTemplate"], never, false>;
}
