import { LiveAnnouncer, FocusableOption } from '@angular/cdk/a11y';
import * as i0 from '@angular/core';
import { OnChanges, AfterViewInit, OnDestroy, QueryList, ElementRef, TemplateRef, EventEmitter, ChangeDetectorRef, SimpleChanges } from '@angular/core';
import { NgModel } from '@angular/forms';
import { Observable } from 'rxjs';
import { FocusKeyManagerListDirective, FocusKeyManagerItemDirective } from '@fundamental-ngx/cdk/utils';
import { ContentDensityObserver } from '@fundamental-ngx/core/content-density';
import { FdLanguage } from '@fundamental-ngx/i18n';

interface Pagination {
    totalItems: number;
    itemsPerPage?: number;
    currentPage?: number;
}

/**
 * Service that is used to retrieve all the pages, the number of pages, and to validate the pagination object.
 */
declare class PaginationService {
    /** @hidden */
    readonly moreElementValue = -1;
    /**
     * Returns a number array representing the pages of the pagination object.
     * Array length always the same and configured by CORNER_DISPLAY_PAGES & SIDE_CURRENT_DISPLAY_PAGES.
     * @param pagination An object of type *Pagination*.
     */
    getPages(pagination: Pagination): number[];
    /**
     * Retrieves the total number of pages.
     * @param pagination An object of type *Pagination*.
     */
    getTotalPages(pagination: Pagination): number;
    /**
     * Provides validation for the pagination object.
     * @param pagination An object of type *Pagination*.
     */
    validate(pagination: Pagination): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<PaginationService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<PaginationService>;
}

interface CurrentShowing {
    from: number;
    to: number;
    totalCount: number;
}
/**
 * The component that is used to provide navigation between paged information.
 * ```html
 * <fd-pagination
 *          [totalItems]="50"
 *          [itemsPerPage]="10"
 *          [currentPage]="3">
 * </fd-pagination>
 * ```
 */
declare class PaginationComponent implements OnChanges, AfterViewInit, OnDestroy {
    private readonly paginationService;
    private readonly _cdr;
    private readonly _liveAnnouncer;
    private readonly _language;
    readonly _contentDensityObserver: ContentDensityObserver;
    /** @hidden */
    readonly _focusKeyManagerList: FocusKeyManagerListDirective;
    /** @hidden */
    readonly _focusKeyManagerItems: QueryList<FocusKeyManagerItemDirective>;
    /** @hidden */
    readonly _pageInputElement: ElementRef;
    /** @hidden */
    readonly _currentPageElement: ElementRef;
    /** Id for the pagination component. If omitted, a unique one is generated. */
    id: string;
    /** Whether component should be shown in the mobile mode. */
    mobile: boolean;
    /** Represents the total number of items. */
    totalItems: number;
    /** Represents the current page number. */
    set currentPage(value: number);
    get currentPage(): number;
    /** Represents the number of items per page. */
    set itemsPerPage(value: number);
    get itemsPerPage(): number;
    /**
     * The custom template show range of item by current page of items.
     * It has higher priority than `itemsPerPageOptions` property.
     */
    itemsPerPageTemplate: TemplateRef<any>;
    /** Represents the options for items per page. */
    set itemsPerPageOptions(value: number[]);
    get itemsPerPageOptions(): number[];
    /** Whether to display the total number of items. */
    displayTotalItems: boolean;
    /**
     * The template show range of item by current page of items.
     * Default view: Showing {{ from }}-{{ to }} of {{ of }}
     */
    displayTextTemplate: TemplateRef<any>;
    /** Event emitted when the page is changed. */
    pageChangeStart: EventEmitter<number>;
    /** Event emitted when items per page option is changed.*/
    itemsPerPageChange: EventEmitter<number>;
    /** @hidden */
    _pages: number[];
    /** @hidden */
    _pagesBeforeCurrent: number[];
    /** @hidden */
    _pagesAfterCurrent: number[];
    /**
     * Retrieves an object that represents
     * the total number of items, the current page, and the number of items per page.
     */
    get paginationObject(): Pagination;
    /** @hidden */
    get _lastPage(): number;
    /** @hidden */
    get isFirstPage(): boolean;
    /** @hidden */
    get isLastPage(): boolean;
    /** @hidden */
    get _totalPages(): number;
    /** @hidden */
    get _totalPagesElementId(): string;
    /** @hidden */
    get _moreElementValue(): number;
    /** @hidden */
    _currentShowing: CurrentShowing;
    /** @hidden */
    _displayedPageSizeOptions: number[];
    /** @hidden */
    private _itemsPerPage;
    /** @hidden */
    private _itemsPerPageOptions;
    /** @hidden */
    private _currentPage;
    /** @hidden */
    private _subscriptions;
    /** @hidden */
    private _translationResolver;
    /** @hidden */
    private readonly _rtlService;
    /** @hidden */
    constructor(paginationService: PaginationService, _cdr: ChangeDetectorRef, _liveAnnouncer: LiveAnnouncer, _language: Observable<FdLanguage>, _contentDensityObserver: ContentDensityObserver);
    /** @hidden */
    ngOnChanges(changes: SimpleChanges): void;
    /** @hidden */
    ngAfterViewInit(): void;
    /** @hidden */
    ngOnDestroy(): void;
    /** @hidden */
    skipItemPredicate(item: ElementRef & FocusableOption): boolean;
    /**
     * Navigates to a specific page.
     * @param page The page to navigate to.
     * @param event The mouse event (optional).
     */
    goToPage(page: number, event?: Event): void;
    /** Navigates to the first page */
    goToFirstPage(): void;
    /**
     * Navigates to a previous page.
     */
    previousPage(): void;
    /**
     * Navigates to the next page.
     */
    nextPage(): void;
    /** Navigates to the last page */
    goToLastPage(): void;
    /** @hidden */
    _onChangePerPage: (event: number) => void;
    /** @hidden */
    _restoreInputValue(model: NgModel): void;
    /** @hidden */
    private _refreshPages;
    /** Focus current page link/input using FocusKeyManager
     * @hidden
     */
    private _focusCurrentPage;
    /**
     * Updates the list of page size options to display to the user. Includes making sure that
     * the page size is an option and that the list is sorted.
     */
    private _updateDisplayedPageSizeOptions;
    /** @hidden */
    private _announcePage;
    static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "fd-pagination", never, { "id": { "alias": "id"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; }; "itemsPerPageTemplate": { "alias": "itemsPerPageTemplate"; "required": false; }; "itemsPerPageOptions": { "alias": "itemsPerPageOptions"; "required": false; }; "displayTotalItems": { "alias": "displayTotalItems"; "required": false; }; "displayTextTemplate": { "alias": "displayTextTemplate"; "required": false; }; }, { "pageChangeStart": "pageChangeStart"; "itemsPerPageChange": "itemsPerPageChange"; }, never, never, true, never>;
    static ngAcceptInputType_mobile: unknown;
}

/**
 * @deprecated
 * Use direct imports of components and directives.
 */
declare class PaginationModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<PaginationModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<PaginationModule, never, [typeof PaginationComponent], [typeof PaginationComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<PaginationModule>;
}

export { PaginationComponent, PaginationModule, PaginationService };
export type { Pagination };
