import { HttpParams } from '@angular/common/http';
import { UntypedFormGroup } from '@angular/forms';
import { ThemePalette } from '@angular/material/core';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { Observable } from 'rxjs';
import { ScrollOptions } from '../scrollbar/scrollbar.model';
export declare const DEFAULT_PAGESIZE = 10;
export declare const DEFAULT_PAGESIZE_OPTIONS: number[];
export type PaginatorStyle = 'default' | 'pageNumber';
export type PaginatorPosition = 'top' | 'bottom';
export type PaginatorHorizontalPosition = 'left' | 'right';
export type PaginatorType = 'default' | 'button' | 'scroll';
/**
 * Pagination model
 */
export interface PaginatedResponse<T> {
    /**
     * Number of items (total)
     */
    count: number;
    /**
     * Array of item associated to the current page
     */
    items: T[];
}
/**
 * Define pagination opions
 */
export declare class PaginationOption {
    /**
     * Limit height of table
     */
    maxHeight?: string;
    /**
     * Add scroll options and callbacks
     */
    scrollOptions?: ScrollOptions;
    /**
     * If style == pageNumber, number of page buttons to display
     */
    nbPagesToShow?: number;
}
/**
 * Paginator configuration model
 */
export declare class PaginatorConfig {
    /**
     * Type of pagination
     *
     * default: standard material design pagination
     *
     * button: add load more button
     *
     * scroll: add infinite scroll
     */
    type?: PaginatorType;
    /**
     * Style of pagination
     *
     * default: only show next and previous page buttons
     *
     * pageNumber: display page number buttons
     *
     */
    style?: PaginatorStyle;
    /**
     * Options specifications
     */
    options?: PaginationOption;
    /**
     * Color of the loader
     *
     * See LoaderComponent
     */
    loaderColor?: ThemePalette;
    /**
     * Pagination position
     * Possible values are : top and bottom
     */
    position?: PaginatorPosition;
    /**
     * Pagination horizontal position
     * Possible values are : left and right
     */
    horizontalPosition?: PaginatorHorizontalPosition;
    /**
     * Display additionnal actions on bottom
     */
    forceBottomAction?: boolean;
    /**
     * After a number of items, pagination can be automatically displayed on top and on bottom
     */
    bottomAndTopPaginatorThreshold?: number;
    /**
     * Page size (ex: 10)
     */
    pageSize?: number;
    /**
     * Page size options (ex: [10,20,50,100])
     */
    pageSizeOptions?: number[];
    /**
     * Edit the load more button label
     */
    loadMoreButtonLabel?: string;
}
/**
 * Storage options
 */
export declare class StorageOption {
    /**
     * Prefix add on store keys
     */
    prefix?: string;
    /**
     * Restrict storage for a set of attributes
     */
    keys?: string[];
    /**
     * Define if pagination is saved in storage
     */
    paginator?: boolean;
    /**
     * Define if columns are saved in storage
     */
    columns?: boolean;
}
/**
 * Storage configuration model
 */
export declare class StorageConfig {
    /**
     * Type of storage : session, local and query parameters
     */
    type?: Storage | 'query';
    /**
     * Additionnal options
     */
    options?: StorageOption;
    /**
     * Get pagination store state from a storage configuration
     *
     * In the case of query parameter storage, you need to give activated route
     *
     * @param storage
     * @param route
     * @returns
     */
    static getState(storage: StorageConfig, route?: ActivatedRoute): Partial<PaginatorFilters>;
    private static manageParams;
    /**
     * Store pagination state with a storage configuration
     *
     * In the case of query parameter storage, you need to give router
     *
     * @param storage
     * @param filters
     * @param router
     */
    static storeState(storage: StorageConfig, filters: PaginatorFilters, router: Router): void;
    private static getExtraFilters;
    /**
     * Remove prefix on each stored keys
     *
     * @param prefix
     * @param params
     * @returns
     */
    static removePrefix(prefix: string, params: Params): Params;
    /**
     * Add prefix on each stored keys
     *
     * @param prefix
     * @param params
     * @returns
     */
    static addPrefix(prefix: string, params: Params): Params;
}
/**
 * Paginator filters
 */
export declare class PaginatorFilters<F extends Params = Params> {
    /**
     * Limit of the page
     */
    limit: number;
    /**
     * Current page index
     */
    page: number;
    /**
     * Active sort (string like name:direction)
     */
    sort?: string;
    /**
     * Extra filters like search parameter
     */
    extraFilters?: F | null;
    constructor({ limit, page, sort, extraFilters }: Partial<PaginatorFilters<F>>);
    /**
     * Apply extra filters on the model
     *
     * @param extraFilters
     */
    patchExtraFilters(extraFilters: Partial<F>): void;
    /**
     * Retrieve all pagination parameters as Angular Http parameters
     *
     * @returns
     */
    toHttpParams(): HttpParams;
}
/**
 * Paginator fetcher is used to retrieve data
 *
 * This type receive pagination filters in parameters and need to return an observable
 */
export type PaginatorFetcher<T extends Object, F extends Params = Params> = (filters: PaginatorFilters<F>) => Observable<PaginatedResponse<T>>;
export declare class PaginatorFormGroup extends UntypedFormGroup {
    value: PaginatorFilters;
    constructor(init: Partial<PaginatorFilters>, extraFilters?: Params);
}
