import { OnDestroy, OnChanges, AfterViewChecked, ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { MatPaginator, PageEvent } from '@angular/material/paginator';
import { PaginatedResponse, PaginatorConfig, PaginatorFetcher, PaginatorFilters, PaginatorFormGroup, PaginatorPosition, StorageConfig } from './paginator.model';
import { PaginatorContentDirective } from './paginator-content.directive';
import { OverlayScrollbars } from 'overlayscrollbars';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { ScrollBarDirective } from '../scrollbar/scrollbar.directive';
import { MicCustomPaginatorDirective } from './paginator-custom.directive';
import { ThemePalette } from '@angular/material/core';
import * as i0 from "@angular/core";
/**
 * Component to manage pagination
 */
export declare class PaginatorComponent<T, F extends Params = Params> implements AfterViewChecked, OnChanges, OnDestroy {
    private readonly router;
    private readonly route;
    private readonly changeDetector;
    private readonly element;
    /**
     * Fetcher method to retrieve data
     */
    fetcher: PaginatorFetcher<T>;
    /**
     * Paginator configuration
     */
    config: PaginatorConfig;
    /**
     * Storage for filters, sorts and search
     * Support session storage, local storage and query parameters
     */
    storage: StorageConfig;
    /**
     * Theme palette (primary, accent, warn)
     */
    color: ThemePalette;
    /**
     * Detect changes on displayed data
     */
    dataChanged: EventEmitter<T[]>;
    scrollbarInstance: ScrollBarDirective;
    paginatorRef1: MatPaginator;
    paginatorRef2: MatPaginator;
    contentQuery: PaginatorContentDirective;
    stylePaginator: MicCustomPaginatorDirective;
    private readonly scrollSelector;
    private readonly buttonContainerClass;
    private dataSubscr;
    private dataTotalSubscr;
    private formSubscr;
    private paginatorSubscr;
    filtersFormGroup: PaginatorFormGroup;
    dataTotalSize: number;
    emptySort: string;
    firstLoading: boolean;
    extraFilters: boolean;
    loading: BehaviorSubject<boolean>;
    scrollbar: OverlayScrollbars;
    isLoadDataFromPagination: boolean;
    data: T[];
    readonly dataSourceSubject: BehaviorSubject<PaginatedResponse<T & {
        page?: number;
    }>>;
    get position(): PaginatorPosition;
    get doublePaginatorThreshold(): number;
    get pageSizeOptions(): number[];
    get pageSize(): number;
    get pageIndex(): number;
    get defaultType(): boolean;
    get pageNumberStyle(): boolean;
    get emptyParams(): Params;
    constructor(router: Router, route: ActivatedRoute, changeDetector: ChangeDetectorRef, element: ElementRef);
    ngAfterViewChecked(): void;
    ngOnDestroy(): void;
    ngOnChanges(): void;
    /**
     * Init subscriptions to detect page change and apply pagination state to filters form group
     */
    init(): void;
    /**
     * Load more data
     * Patch values using form group and reuse the main method
     */
    loadMore(): void;
    /**
     * Init scrollbar options to track scroll events
     * Usefull in the case of configuration for infinite scroll
     *
     * @returns
     */
    initScrollCallbacks(): void;
    /**
     * Update paginator extra filters
     * Set filter form group with pagination state (reset page)
     * Merge current extra filters with others in parameter
     */
    patchExtraFilters(extraFilters: Partial<F>): void;
    /**
     * Get paginator filters associated with the formGroup
     * Return the pagination state (page, sort...) and extra filters
     */
    getFilters(): PaginatorFilters;
    /**
     * Apply a sort using form group
     */
    sortData(active: string, dir: 'asc' | 'desc', groupField?: string[]): void;
    /**
     * Load data in the pagination using fetcher method
     * Filters are retrieve from the form group and pass as parameter to the fetcher
     */
    loadData(): void;
    manageScrollBar(): void;
    /**
     * Reset subscription to load data through fetcher method
     */
    private resetDataSubscription;
    updatePageLabel(paginator: MatPaginator): void;
    onPageChange(event: PageEvent): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<PaginatorComponent<any, any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<PaginatorComponent<any, any>, "mic-paginator", never, { "fetcher": { "alias": "fetcher"; "required": false; }; "config": { "alias": "config"; "required": false; }; "storage": { "alias": "storage"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "dataChanged": "dataChanged"; }, ["contentQuery", "stylePaginator"], ["*"], false, never>;
}
