import { HttpClient } from '@angular/common/http'; import { ILuApiItem } from '@lucca-front/ng/api'; import { ALuSelectInputComponent, LuOptionComparer, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select'; import { Subject, Observable, ReplaySubject, BehaviorSubject } from 'rxjs'; import * as i0 from '@angular/core'; import { OnDestroy, OnInit } from '@angular/core'; declare const LU_SELECT_MAGIC_PAGE_SIZE = 20; declare abstract class ALuCoreSelectApiDirective> implements OnDestroy, OnInit { protected destroy$: Subject; protected pageSize: number; protected debounceDuration: number; select: ALuSelectInputComponent; protected page$: Observable; protected clue$: Observable; /** * Create an object that will be used as params for the api call */ protected abstract params$: Observable; /** * Compare two options to know if they are the same. For example, compare by id or by JSON */ protected optionComparer: LuOptionComparer; /** * Return a unique key to identify the option in for-of loops */ protected abstract optionKey: (option: TOption) => unknown; /** * Return the options for the given params and page */ protected abstract getOptions(params: TParams, page: number): Observable; ngOnInit(): void; protected buildOptions(): Observable; protected getOptionsPage(params: TParams, page: number): Observable<{ items: TOption[]; isLastPage: boolean; }>; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, {}, {}, never, never, true, never>; } declare class LuCoreSelectApiV3Directive extends ALuCoreSelectApiDirective implements CoreSelectApiTotalCountProvider { set apiV3(value: string); set fields(value: string); set orderBy(value: string | null); set filters(value: Record); protected url$: ReplaySubject; protected fields$: BehaviorSubject; protected orderBy$: BehaviorSubject; protected filters$: BehaviorSubject>; protected httpClient: HttpClient; protected params$: Observable<{ name?: string; orderBy?: string; fields?: string; }>; totalCount$: Observable; protected getOptions(params: Record, page: number): Observable; protected optionKey: (option: T) => number; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "lu-simple-select[apiV3],lu-multi-select[apiV3]", never, { "apiV3": { "alias": "apiV3"; "required": false; }; "fields": { "alias": "fields"; "required": false; }; "orderBy": { "alias": "orderBy"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; }, {}, never, never, true, never>; } declare class LuCoreSelectApiV4Directive extends ALuCoreSelectApiDirective implements CoreSelectApiTotalCountProvider { apiV4: i0.ModelSignal; sort: i0.InputSignal; filters: i0.InputSignal>; searchDelimiter: i0.InputSignal; protected httpClient: HttpClient; protected clue: i0.Signal; protected params$: Observable>; totalCount$: Observable; protected getOptions(params: Record, page: number): Observable; protected optionKey: (option: T) => number; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "lu-simple-select[apiV4],lu-multi-select[apiV4]", never, { "apiV4": { "alias": "apiV4"; "required": true; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "searchDelimiter": { "alias": "searchDelimiter"; "required": false; "isSignal": true; }; }, { "apiV4": "apiV4Change"; }, never, never, true, never>; } export { ALuCoreSelectApiDirective, LU_SELECT_MAGIC_PAGE_SIZE, LuCoreSelectApiV3Directive, LuCoreSelectApiV4Directive };