import * as i2 from '@angular/cdk/a11y';
import { coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';
import * as i0 from '@angular/core';
import { isDevMode, Injectable, EventEmitter, inject, effect, ElementRef, booleanAttribute, Output, Input, ViewChild, ViewChildren, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
import * as i4 from '@angular/forms';
import { FormsModule } from '@angular/forms';
import { Subscription } from 'rxjs';
import { range, RtlService, FocusKeyManagerListDirective, FocusKeyManagerItemDirective, OnlyDigitsDirective } from '@fundamental-ngx/cdk/utils';
import { NgTemplateOutlet } from '@angular/common';
import { ButtonComponent } from '@fundamental-ngx/core/button';
import * as i3 from '@fundamental-ngx/core/content-density';
import { contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';
import { FormLabelComponent, FormControlComponent } from '@fundamental-ngx/core/form';
import { SelectComponent, OptionComponent } from '@fundamental-ngx/core/select';
import { TranslationResolver, FD_LANGUAGE_SIGNAL, FdTranslatePipe } from '@fundamental-ngx/i18n';

/** Constant representing the number of pages which appear before and after current page. */
const CORNER_DISPLAY_PAGES = 1;
const SIDE_CURRENT_DISPLAY_PAGES = 2;
/**
 * Service that is used to retrieve all the pages, the number of pages, and to validate the pagination object.
 */
class PaginationService {
    constructor() {
        /** @hidden */
        this.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) {
        if (!pagination.currentPage) {
            pagination.currentPage = 1;
        }
        this.validate(pagination);
        const totalPages = this.getTotalPages(pagination);
        const pages = range(totalPages, (i) => i + 1);
        // +1 for current page, +2 for "more" elements - after start & before end pages
        const pagesToDisplay = CORNER_DISPLAY_PAGES * 2 + SIDE_CURRENT_DISPLAY_PAGES * 2 + 1 + 2;
        if (pages.length <= pagesToDisplay) {
            return pages;
        }
        const pagesBefore = pagination.currentPage - 1;
        const pagesAfter = totalPages - pagination.currentPage;
        const minimalPagesGap = Math.round(pagesToDisplay / 2);
        if (pagesBefore < minimalPagesGap) {
            return [
                ...pages.slice(0, pagesToDisplay - 2),
                this.moreElementValue,
                ...pages.slice(totalPages - CORNER_DISPLAY_PAGES)
            ];
        }
        if (pagesAfter < minimalPagesGap) {
            return [
                ...pages.slice(0, CORNER_DISPLAY_PAGES),
                this.moreElementValue,
                ...pages.slice(totalPages - pagesToDisplay + 2)
            ];
        }
        return [
            ...pages.slice(0, CORNER_DISPLAY_PAGES),
            this.moreElementValue,
            ...pages.slice(pagination.currentPage - SIDE_CURRENT_DISPLAY_PAGES - 1, pagination.currentPage + SIDE_CURRENT_DISPLAY_PAGES),
            this.moreElementValue,
            ...pages.slice(totalPages - CORNER_DISPLAY_PAGES)
        ];
    }
    /**
     * Retrieves the total number of pages.
     * @param pagination An object of type *Pagination*.
     */
    getTotalPages(pagination) {
        if (!pagination.itemsPerPage) {
            return 0;
        }
        return Math.ceil(pagination.totalItems / pagination.itemsPerPage);
    }
    /**
     * Provides validation for the pagination object.
     * @param pagination An object of type *Pagination*.
     */
    validate(pagination) {
        if (isDevMode()) {
            if (isNaN(pagination.totalItems) || pagination.totalItems <= 0) {
                console.warn(`"totalItems" must be a number greater than zero but got "${pagination.totalItems}". This warning only appears in development mode.`);
            }
            if (isNaN(pagination.itemsPerPage) || pagination.itemsPerPage <= 0) {
                console.warn(`"itemsPerPage" must be a number greater than zero but got "${pagination.itemsPerPage}". This warning only appears in development mode.`);
            }
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaginationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaginationService }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaginationService, decorators: [{
            type: Injectable
        }] });

/** Constant representing the default number of items per page. */
const DEFAULT_ITEMS_PER_PAGE = 10;
let paginationUniqueId = 0;
/**
 * The component that is used to provide navigation between paged information.
 * ```html
 * <fd-pagination
 *          [totalItems]="50"
 *          [itemsPerPage]="10"
 *          [currentPage]="3">
 * </fd-pagination>
 * ```
 */
class PaginationComponent {
    /** Represents the current page number. */
    set currentPage(value) {
        this._currentPage = Math.floor(coerceNumberProperty(value, 1));
    }
    get currentPage() {
        return this._currentPage;
    }
    /** Represents the number of items per page. */
    set itemsPerPage(value) {
        value = Math.floor(coerceNumberProperty(value, DEFAULT_ITEMS_PER_PAGE));
        this._itemsPerPage = Math.max(value, 1);
        this._updateDisplayedPageSizeOptions();
    }
    get itemsPerPage() {
        return this._itemsPerPage;
    }
    /** Represents the options for items per page. */
    set itemsPerPageOptions(value) {
        this._itemsPerPageOptions = coerceArray(value)
            .map((v) => coerceNumberProperty(v, 0))
            .map((v) => Math.floor(v))
            .filter((v) => v > 0)
            .sort((a, b) => a - b);
        this._updateDisplayedPageSizeOptions();
    }
    get itemsPerPageOptions() {
        return this._itemsPerPageOptions;
    }
    /**
     * Retrieves an object that represents
     * the total number of items, the current page, and the number of items per page.
     */
    get paginationObject() {
        return {
            totalItems: this.totalItems,
            currentPage: this.currentPage,
            itemsPerPage: this.itemsPerPage
        };
    }
    /** @hidden */
    get _lastPage() {
        return this.paginationService.getTotalPages(this.paginationObject);
    }
    /** @hidden */
    get isFirstPage() {
        return this.currentPage === 1;
    }
    /** @hidden */
    get isLastPage() {
        return this.currentPage === this.paginationService.getTotalPages(this.paginationObject);
    }
    /** @hidden */
    get _totalPages() {
        return this.paginationService.getTotalPages(this.paginationObject);
    }
    /** @hidden */
    get _totalPagesElementId() {
        return this.id + '__total';
    }
    /** @hidden */
    get _moreElementValue() {
        return this.paginationService.moreElementValue;
    }
    /** @hidden */
    constructor(paginationService, _cdr, _liveAnnouncer, _contentDensityObserver) {
        this.paginationService = paginationService;
        this._cdr = _cdr;
        this._liveAnnouncer = _liveAnnouncer;
        this._contentDensityObserver = _contentDensityObserver;
        /** Id for the pagination component. If omitted, a unique one is generated. */
        this.id = 'fd-pagination-' + paginationUniqueId++;
        /** Whether component should be shown in the mobile mode. */
        this.mobile = false;
        /** Whether to display the total number of items. */
        this.displayTotalItems = true;
        /** Event emitted when the page is changed. */
        this.pageChangeStart = new EventEmitter();
        /** Event emitted when items per page option is changed.*/
        this.itemsPerPageChange = new EventEmitter();
        /** @hidden */
        this._pages = [];
        /** @hidden */
        this._currentShowing = {
            from: 0,
            to: 0,
            totalCount: 0
        };
        /** @hidden */
        this._displayedPageSizeOptions = [];
        /** @hidden */
        this._itemsPerPage = DEFAULT_ITEMS_PER_PAGE;
        /** @hidden */
        this._itemsPerPageOptions = [];
        /** @hidden */
        this._currentPage = 1;
        /** @hidden */
        this._subscriptions = new Subscription();
        /** @hidden */
        this._translationResolver = new TranslationResolver();
        /** @hidden */
        this._rtlService = inject(RtlService, { optional: true });
        /** @hidden */
        this._languageSignal = inject(FD_LANGUAGE_SIGNAL);
        /** @hidden */
        this._onChangePerPage = (event) => {
            this.itemsPerPage = event;
            this.itemsPerPageChange.emit(this.itemsPerPage);
            this._refreshPages();
            const maxPage = this._pages[this._pages.length - 1];
            if (this.currentPage > maxPage) {
                this.pageChangeStart.emit(maxPage);
            }
        };
        // React to RTL changes
        effect(() => {
            this._rtlService?.rtl();
            this._refreshPages();
        });
    }
    /** @hidden */
    ngOnChanges(changes) {
        if (changes?.currentPage) {
            this.currentPage = changes.currentPage.currentValue;
        }
        if (!this.currentPage || this.currentPage < 1) {
            this.currentPage = 1;
        }
        else {
            const totalPages = this.paginationService.getTotalPages(this.paginationObject);
            if (this.currentPage > totalPages) {
                this.currentPage = totalPages;
            }
        }
        this._refreshPages();
    }
    /** @hidden */
    ngAfterViewInit() {
        this._focusKeyManagerList?.focusKeyManager?.withVerticalOrientation(false);
    }
    /** @hidden */
    ngOnDestroy() {
        this._subscriptions.unsubscribe();
    }
    /** @hidden */
    skipItemPredicate(item) {
        return (getComputedStyle(item.nativeElement).display === 'none' ||
            item.nativeElement.getAttribute('disabled') === 'true');
    }
    /**
     * Navigates to a specific page.
     * @param page The page to navigate to.
     * @param event The mouse event (optional).
     */
    goToPage(page, event) {
        if (page > this._lastPage || page < 1) {
            return;
        }
        this._refreshPages();
        if (event) {
            this._focusCurrentPage();
        }
        this.pageChangeStart.emit(page);
        this._announcePage(page);
    }
    /** Navigates to the first page */
    goToFirstPage() {
        this.goToPage(1);
    }
    /**
     * Navigates to a previous page.
     */
    previousPage() {
        this.goToPage(this.currentPage - 1);
    }
    /**
     * Navigates to the next page.
     */
    nextPage() {
        this.goToPage(this.currentPage + 1);
    }
    /** Navigates to the last page */
    goToLastPage() {
        this.goToPage(this._lastPage);
    }
    /** @hidden */
    _restoreInputValue(model) {
        model.reset(this.currentPage);
        this._cdr.markForCheck();
    }
    /** @hidden */
    _refreshPages() {
        const pagination = this.paginationObject;
        this._pages = this.paginationService.getPages(pagination);
        const currentPageIndex = this._pages.findIndex((page) => page === this.currentPage);
        this._pagesBeforeCurrent = this._pages.slice(0, currentPageIndex);
        this._pagesAfterCurrent = this._pages.slice(currentPageIndex + 1);
        const itemsPerPage = pagination.itemsPerPage ?? DEFAULT_ITEMS_PER_PAGE;
        this._currentShowing = {
            from: this.currentPage - 1 === 0 ? 1 : (this.currentPage - 1) * itemsPerPage + 1,
            to: Math.min((this.currentPage - 1) * itemsPerPage + itemsPerPage, this.totalItems),
            totalCount: this.totalItems
        };
        this._cdr.markForCheck();
    }
    /** Focus current page link/input using FocusKeyManager
     * @hidden
     */
    _focusCurrentPage() {
        const currentPageNativeElement = getComputedStyle(this._currentPageElement.nativeElement).display === 'none'
            ? this._pageInputElement.nativeElement
            : this._currentPageElement.nativeElement;
        const index = this._focusKeyManagerItems
            .toArray()
            .findIndex((elem) => elem.nativeElement === currentPageNativeElement);
        this._focusKeyManagerList.focusItem(index);
    }
    /**
     * 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.
     */
    _updateDisplayedPageSizeOptions() {
        // If no page size is provided, use the first page size option or the default page size.
        if (!this.itemsPerPage) {
            this._itemsPerPage = this.itemsPerPageOptions.length ? this.itemsPerPageOptions[0] : DEFAULT_ITEMS_PER_PAGE;
        }
        this._displayedPageSizeOptions = this.itemsPerPageOptions?.slice() ?? [];
        if (!this._displayedPageSizeOptions.includes(this.itemsPerPage)) {
            this._displayedPageSizeOptions.push(this.itemsPerPage);
        }
        this._displayedPageSizeOptions.sort((a, b) => a - b);
        this._cdr.markForCheck();
    }
    /** @hidden */
    async _announcePage(page) {
        await this._liveAnnouncer.announce(this._translationResolver.resolve(this._languageSignal(), 'corePagination.currentPageAriaLabel', {
            pageNumber: page,
            totalCount: this.totalItems
        }));
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaginationComponent, deps: [{ token: PaginationService }, { token: i0.ChangeDetectorRef }, { token: i2.LiveAnnouncer }, { token: i3.ContentDensityObserver }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: PaginationComponent, isStandalone: true, selector: "fd-pagination", inputs: { id: "id", mobile: ["mobile", "mobile", booleanAttribute], totalItems: "totalItems", currentPage: "currentPage", itemsPerPage: "itemsPerPage", itemsPerPageTemplate: "itemsPerPageTemplate", itemsPerPageOptions: "itemsPerPageOptions", displayTotalItems: "displayTotalItems", displayTextTemplate: "displayTextTemplate" }, outputs: { pageChangeStart: "pageChangeStart", itemsPerPageChange: "itemsPerPageChange" }, host: { properties: { "class.fd-pagination--mobile": "mobile", "class.fd-pagination--short": "_lastPage <= 9" }, classAttribute: "fd-pagination" }, providers: [PaginationService, contentDensityObserverProviders()], viewQueries: [{ propertyName: "_focusKeyManagerList", first: true, predicate: FocusKeyManagerListDirective, descendants: true }, { propertyName: "_pageInputElement", first: true, predicate: ["pageInputElement"], descendants: true, read: ElementRef }, { propertyName: "_currentPageElement", first: true, predicate: ["currentPageElement"], descendants: true, read: ElementRef }, { propertyName: "_focusKeyManagerItems", predicate: FocusKeyManagerItemDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (totalItems) {\n    @if (itemsPerPageTemplate || itemsPerPageOptions.length) {\n        <div class=\"fd-pagination__per-page\">\n            <!-- note, that we're checking for the length of \"itemsPerPageOptions\", but using \"_displayedPageSizeOptions\" as \"pageOptions\" -->\n            <!-- these 2 can be different, as \"_displayedPageSizeOptions\" may also include \"itemsPerPage\" if it's not included in options -->\n            <ng-template\n                [ngTemplateOutlet]=\"itemsPerPageTemplate || perPage\"\n                [ngTemplateOutletContext]=\"{ onSelect: _onChangePerPage, pageOptions: _displayedPageSizeOptions }\"\n            ></ng-template>\n        </div>\n    }\n    @if (totalItems >= itemsPerPage) {\n        <nav\n            fdkFocusKeyManagerList\n            orientation=\"horizontal\"\n            [skipPredicate]=\"skipItemPredicate\"\n            class=\"fd-pagination__nav\"\n            [attr.aria-label]=\"('corePagination.ariaLabel' | fdTranslate)()\"\n            [attr.aria-labelledby]=\"displayTotalItems ? _totalPagesElementId : null\"\n        >\n            <button\n                fdkFocusKeyManagerItem\n                fd-button\n                fdType=\"transparent\"\n                glyph=\"media-rewind\"\n                [disabled]=\"isFirstPage\"\n                [ariaLabel]=\"('corePagination.firstLabel' | fdTranslate)()\"\n                [title]=\"('corePagination.firstLabel' | fdTranslate)()\"\n                class=\"fd-pagination__button fd-pagination__button--mobile\"\n                [attr.aria-disabled]=\"isFirstPage\"\n                (click)=\"goToFirstPage()\"\n                (keyup.enter)=\"goToFirstPage()\"\n                (keydown.space)=\"$event.preventDefault()\"\n                (keyup.space)=\"goToFirstPage()\"\n            ></button>\n            <button\n                fdkFocusKeyManagerItem\n                fd-button\n                fdType=\"transparent\"\n                glyph=\"navigation-left-arrow\"\n                [disabled]=\"isFirstPage\"\n                [ariaLabel]=\"('corePagination.previousLabel' | fdTranslate)()\"\n                [title]=\"('corePagination.previousLabel' | fdTranslate)()\"\n                class=\"fd-pagination__button\"\n                [attr.aria-disabled]=\"isFirstPage\"\n                (click)=\"previousPage()\"\n                (keyup.enter)=\"previousPage()\"\n                (keydown.space)=\"$event.preventDefault()\"\n                (keyup.space)=\"previousPage()\"\n            ></button>\n            <!-- Duplicated to preserve the items order for keyboard navigation -->\n            @for (page of _pagesBeforeCurrent; track page) {\n                @if (page !== _moreElementValue) {\n                    <button\n                        fdkFocusKeyManagerItem\n                        fd-button\n                        fdType=\"transparent\"\n                        [ariaLabel]=\"('corePagination.pageLabel' | fdTranslate: { pageNumber: page })()\"\n                        [title]=\"('corePagination.pageLabel' | fdTranslate: { pageNumber: page })()\"\n                        class=\"fd-pagination__link\"\n                        (click)=\"goToPage(page)\"\n                        (keyup.enter)=\"goToPage(page, $event)\"\n                        (keydown.space)=\"$event.preventDefault()\"\n                        (keyup.space)=\"goToPage(page, $event)\"\n                    >\n                        {{ page }}\n                    </button>\n                } @else {\n                    <span class=\"fd-pagination__more\" aria-hidden=\"true\" aria-label=\"...\" role=\"presentation\"></span>\n                }\n            }\n            <button\n                #currentPageElement\n                fdkFocusKeyManagerItem\n                fd-button\n                fdType=\"transparent\"\n                [ariaLabel]=\"('corePagination.pageLabel' | fdTranslate: { pageNumber: currentPage })()\"\n                class=\"fd-pagination__link is-active\"\n                [attr.aria-current]=\"true\"\n            >\n                {{ currentPage }}\n            </button>\n            <label fd-form-label class=\"fd-pagination__label\">\n                {{ ('corePagination.labelBeforeInputMobile' | fdTranslate)() }}\n            </label>\n            <input\n                #pageInputElement\n                fdkFocusKeyManagerItem\n                fd-form-control\n                fdkOnlyDigits\n                required\n                size=\"1\"\n                min=\"1\"\n                type=\"number\"\n                [max]=\"_lastPage\"\n                [state]=\"currentPageModel.invalid ? 'error' : null\"\n                class=\"fd-pagination__input\"\n                #currentPageModel=\"ngModel\"\n                [ngModel]=\"currentPage\"\n                [ariaLabel]=\"\n                    (\n                        'corePagination.inputAriaLabel'\n                        | fdTranslate: { pageNumber: currentPage, totalCount: _totalPages }\n                    )()\n                \"\n                (keydown.enter)=\"goToPage(currentPageModel.value)\"\n                (keydown.space)=\"goToPage(currentPageModel.value)\"\n                (blur)=\"_restoreInputValue(currentPageModel)\"\n            />\n            <label fd-form-label class=\"fd-pagination__label\">\n                {{\n                    (\n                        'corePagination.labelAfterInputMobile'\n                        | fdTranslate: { pageNumber: currentPage, totalCount: _totalPages }\n                    )()\n                }}\n            </label>\n            <!-- Duplicated to preserve the items order for keyboard navigation -->\n            @for (page of _pagesAfterCurrent; track page) {\n                @if (page !== _moreElementValue) {\n                    <button\n                        fdkFocusKeyManagerItem\n                        fd-button\n                        fdType=\"transparent\"\n                        [ariaLabel]=\"('corePagination.pageLabel' | fdTranslate: { pageNumber: page })()\"\n                        [title]=\"('corePagination.pageLabel' | fdTranslate: { pageNumber: page })()\"\n                        class=\"fd-pagination__link\"\n                        (click)=\"goToPage(page)\"\n                        (keyup.enter)=\"goToPage(page, $event)\"\n                        (keydown.space)=\"$event.preventDefault()\"\n                        (keyup.space)=\"goToPage(page, $event)\"\n                    >\n                        {{ page }}\n                    </button>\n                } @else {\n                    <span class=\"fd-pagination__more\" aria-hidden=\"true\" aria-label=\"...\" role=\"presentation\"></span>\n                }\n            }\n            <button\n                fdkFocusKeyManagerItem\n                fd-button\n                fdType=\"transparent\"\n                glyph=\"navigation-right-arrow\"\n                [disabled]=\"isLastPage\"\n                [ariaLabel]=\"('corePagination.nextLabel' | fdTranslate)()\"\n                [title]=\"('corePagination.nextLabel' | fdTranslate)()\"\n                class=\"fd-pagination__button\"\n                [attr.aria-disabled]=\"isLastPage\"\n                (click)=\"nextPage()\"\n                (keyup.enter)=\"nextPage()\"\n                (keydown.space)=\"$event.preventDefault()\"\n                (keyup.space)=\"nextPage()\"\n            ></button>\n            <button\n                fdkFocusKeyManagerItem\n                fd-button\n                fdType=\"transparent\"\n                glyph=\"media-forward\"\n                [disabled]=\"isLastPage\"\n                [ariaLabel]=\"('corePagination.lastLabel' | fdTranslate)()\"\n                [title]=\"('corePagination.lastLabel' | fdTranslate)()\"\n                class=\"fd-pagination__button fd-pagination__button--mobile\"\n                [attr.aria-disabled]=\"isLastPage\"\n                (click)=\"goToLastPage()\"\n                (keyup.enter)=\"goToLastPage()\"\n                (keydown.space)=\"$event.preventDefault()\"\n                (keyup.space)=\"goToLastPage()\"\n            ></button>\n        </nav>\n    }\n    @if (displayTotalItems) {\n        <span class=\"fd-pagination__total\" [attr.id]=\"_totalPagesElementId\">\n            <ng-template\n                [ngTemplateOutlet]=\"displayTextTemplate || total\"\n                [ngTemplateOutletContext]=\"{ showing: _currentShowing }\"\n            ></ng-template>\n        </span>\n    }\n}\n<ng-template #more>\n    <span class=\"fd-pagination__more\" aria-hidden=\"true\" aria-label=\"...\" role=\"presentation\"></span>\n</ng-template>\n<ng-template #total let-showing=\"showing\">\n    <span fd-form-label class=\"fd-pagination__total-label\">\n        {{ ('corePagination.totalResultsLabel' | fdTranslate: _currentShowing)() }}\n    </span>\n</ng-template>\n<ng-template #perPage let-pageOptions=\"pageOptions\">\n    <label fd-form-label class=\"fd-pagination__per-page-label\">\n        {{ ('corePagination.itemsPerPageLabel' | fdTranslate)() }}\n    </label>\n    <fd-select class=\"fd-pagination__per-page-select\" [value]=\"itemsPerPage\" (valueChange)=\"_onChangePerPage($event)\">\n        @for (option of pageOptions; track option) {\n            <li fd-option [value]=\"option\">{{ option }}</li>\n        }\n    </fd-select>\n</ng-template>\n", styles: [".fd-pagination{--fdPaginationMoreWidth:var(--fdPagination_Placeholder_Dots_Width);border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-inline:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;height:2.75rem;justify-content:space-between;padding-block:0;padding-inline:1rem;width:100%}.fd-pagination:after,.fd-pagination:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-pagination__per-page{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.fd-pagination__per-page:after,.fd-pagination__per-page:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-pagination__nav{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--fdPagination_Elements_Spacing);margin-inline:auto}.fd-pagination__nav:after,.fd-pagination__nav:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-pagination__more{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-pagination__more:after,.fd-pagination__more:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-pagination__more:before{content:\"...\";display:block;text-align:center;width:var(--fdPaginationMoreWidth)}.fd-pagination__more[class*=-compact],.fd-pagination__more[class*=-condensed],[class*=-compact] .fd-pagination__more:not([class*=-cozy]),[class*=-condensed] .fd-pagination__more:not([class*=-cozy]){--fdPaginationMoreWidth:var(--fdPagination_Placeholder_Dots_Width_Compact)}.fd-pagination .fd-pagination__input{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;min-width:2.5rem;text-align:center;width:auto}.fd-pagination .fd-pagination__input::-webkit-inner-spin-button,.fd-pagination .fd-pagination__input::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin-block:0;margin-inline:0}.fd-pagination .fd-pagination__label,.fd-pagination .fd-pagination__per-page-label{-ms-flex-negative:0;flex-shrink:0;-ms-flex-item-align:center;align-self:center}.fd-pagination .fd-pagination__label{display:none}.fd-pagination .fd-pagination__total-label{margin-block:0;margin-inline:0}.fd-pagination .fd-pagination__link.is-focus,.fd-pagination .fd-pagination__link:focus{outline:none;z-index:5}.fd-pagination .fd-pagination__link.is-focus:after,.fd-pagination .fd-pagination__link:focus:after{border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);border-radius:var(--fdButton_Focus_Border_Radius);content:\"\";display:block;inset:var(--fdButton_Outline_Offset) var(--fdButton_Outline_Offset) var(--fdButton_Outline_Offset) var(--fdButton_Outline_Offset);position:absolute}.fd-pagination .fd-pagination__link.is-focus.fd-button--toggled:after,.fd-pagination .fd-pagination__link.is-focus.is-selected:after,.fd-pagination .fd-pagination__link:focus.fd-button--toggled:after,.fd-pagination .fd-pagination__link:focus.is-selected:after{border-color:var(--fdButton_Outline_Contrast)}.fd-pagination .fd-pagination__link.is-active{display:none}.fd-pagination .fd-pagination__button [class*=sap-icon][dir=rtl],[dir=rtl] .fd-pagination .fd-pagination__button [class*=sap-icon]{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fd-pagination .fd-pagination__button--mobile{display:none}.fd-pagination .fd-pagination__button.is-disabled,.fd-pagination .fd-pagination__button:disabled,.fd-pagination .fd-pagination__button[aria-disabled=true]{pointer-events:none}.fd-pagination--short .fd-pagination__link.is-active,.fd-pagination--short .fd-pagination__link:active{display:-webkit-box;display:-ms-flexbox;display:flex}.fd-pagination--short .fd-pagination__input{display:none}.fd-pagination--mobile .fd-pagination__per-page+.fd-pagination__nav{margin-inline:auto 0}.fd-pagination--mobile .fd-pagination__link,.fd-pagination--mobile .fd-pagination__more,.fd-pagination--mobile .fd-pagination__per-page-label,.fd-pagination--mobile .fd-pagination__total{display:none}.fd-pagination--mobile .fd-pagination__button--mobile,.fd-pagination--mobile .fd-pagination__input,.fd-pagination--mobile .fd-pagination__label{display:-webkit-box;display:-ms-flexbox;display:flex}.fd-pagination--mobile .fd-pagination__link.is-active,.fd-pagination--mobile .fd-pagination__link:active{display:none}@media(width<=599px){.fd-pagination .fd-pagination__per-page+.fd-pagination__nav{margin-inline:auto 0}.fd-pagination .fd-pagination__link,.fd-pagination .fd-pagination__more,.fd-pagination .fd-pagination__per-page-label,.fd-pagination .fd-pagination__total{display:none}.fd-pagination .fd-pagination__button--mobile,.fd-pagination .fd-pagination__input,.fd-pagination .fd-pagination__label{display:-webkit-box;display:-ms-flexbox;display:flex}.fd-pagination .fd-pagination__link.is-active,.fd-pagination .fd-pagination__link:active{display:none}}@media(width>=600px)and (width<=1023px){.fd-pagination .fd-pagination__per-page+.fd-pagination__nav{margin-inline:auto 0}.fd-pagination .fd-pagination__link,.fd-pagination .fd-pagination__more,.fd-pagination .fd-pagination__per-page-label,.fd-pagination .fd-pagination__total{display:none}.fd-pagination .fd-pagination__button--mobile,.fd-pagination .fd-pagination__input,.fd-pagination .fd-pagination__label{display:-webkit-box;display:-ms-flexbox;display:flex}.fd-pagination .fd-pagination__link.is-active,.fd-pagination .fd-pagination__link:active{display:none}}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.fd-pagination__label .fd-form-label,.fd-pagination__total-label .fd-form-label{margin:0}\n/*! Bundled license information:\n\nfundamental-styles/dist/pagination.css:\n  (*!\n   * Fundamental Library Styles v0.41.7\n   * Copyright (c) 2026 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: FocusKeyManagerListDirective, selector: "[fdkFocusKeyManagerList]", inputs: ["orientation", "skipPredicate"] }, { kind: "component", type: ButtonComponent, selector: "button[fd-button], a[fd-button], span[fd-button]", inputs: ["id"], exportAs: ["fd-button"] }, { kind: "directive", type: FocusKeyManagerItemDirective, selector: "[fdkFocusKeyManagerItem]", inputs: ["initialFocus", "_tabindex"] }, { kind: "component", type: FormLabelComponent, selector: "[fd-form-label]", inputs: ["required", "colon", "alignLabelEnd", "inlineHelpContent", "inlineHelpGlyph", "inlineHelpTriggers", "inlineHelpBodyPlacement", "inlineHelpPlacement", "allowWrap", "inlineHelpLabel", "id", "disabled", "unitDescription", "independent"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i4.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FormControlComponent, selector: "input[fd-form-control], textarea[fd-form-control]", inputs: ["state", "type", "class", "ariaLabel", "ariaLabelledBy"] }, { kind: "directive", type: OnlyDigitsDirective, selector: "[fdkOnlyDigits]", inputs: ["decimal", "decimalSeparator"] }, { kind: "component", type: SelectComponent, selector: "fd-select", inputs: ["extendedBodyTemplate", "scrollStrategy", "textOverflow", "controlId", "state", "mobile", "stateMessage", "disabled", "required", "readonly", "placeholder", "value", "maxHeight", "glyph", "glyphFont", "closeOnOutsideClick", "fillControlMode", "controlTemplate", "appendTo", "unselectMissingOption", "typeaheadDebounceInterval", "ariaLabelledBy", "ariaLabel", "mobileConfig", "inline", "selectControlClass", "selectDropdownButtonClass", "advancedStateMessage", "tabOutStrategy", "ariaHasPopup", "ariaDescription", "compareWith"], outputs: ["isOpenChange", "valueChange"] }, { kind: "component", type: OptionComponent, selector: "[fd-option], fd-option", inputs: ["id", "value", "disabled"], outputs: ["selectionChange"] }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None, preserveWhitespaces: true }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaginationComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-pagination', providers: [PaginationService, contentDensityObserverProviders()], host: {
                        class: 'fd-pagination',
                        '[class.fd-pagination--mobile]': 'mobile',
                        '[class.fd-pagination--short]': '_lastPage <= 9'
                    }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: true, imports: [
                        NgTemplateOutlet,
                        FocusKeyManagerListDirective,
                        ButtonComponent,
                        FocusKeyManagerItemDirective,
                        FormLabelComponent,
                        FormsModule,
                        FormControlComponent,
                        OnlyDigitsDirective,
                        SelectComponent,
                        OptionComponent,
                        FdTranslatePipe
                    ], template: "@if (totalItems) {\n    @if (itemsPerPageTemplate || itemsPerPageOptions.length) {\n        <div class=\"fd-pagination__per-page\">\n            <!-- note, that we're checking for the length of \"itemsPerPageOptions\", but using \"_displayedPageSizeOptions\" as \"pageOptions\" -->\n            <!-- these 2 can be different, as \"_displayedPageSizeOptions\" may also include \"itemsPerPage\" if it's not included in options -->\n            <ng-template\n                [ngTemplateOutlet]=\"itemsPerPageTemplate || perPage\"\n                [ngTemplateOutletContext]=\"{ onSelect: _onChangePerPage, pageOptions: _displayedPageSizeOptions }\"\n            ></ng-template>\n        </div>\n    }\n    @if (totalItems >= itemsPerPage) {\n        <nav\n            fdkFocusKeyManagerList\n            orientation=\"horizontal\"\n            [skipPredicate]=\"skipItemPredicate\"\n            class=\"fd-pagination__nav\"\n            [attr.aria-label]=\"('corePagination.ariaLabel' | fdTranslate)()\"\n            [attr.aria-labelledby]=\"displayTotalItems ? _totalPagesElementId : null\"\n        >\n            <button\n                fdkFocusKeyManagerItem\n                fd-button\n                fdType=\"transparent\"\n                glyph=\"media-rewind\"\n                [disabled]=\"isFirstPage\"\n                [ariaLabel]=\"('corePagination.firstLabel' | fdTranslate)()\"\n                [title]=\"('corePagination.firstLabel' | fdTranslate)()\"\n                class=\"fd-pagination__button fd-pagination__button--mobile\"\n                [attr.aria-disabled]=\"isFirstPage\"\n                (click)=\"goToFirstPage()\"\n                (keyup.enter)=\"goToFirstPage()\"\n                (keydown.space)=\"$event.preventDefault()\"\n                (keyup.space)=\"goToFirstPage()\"\n            ></button>\n            <button\n                fdkFocusKeyManagerItem\n                fd-button\n                fdType=\"transparent\"\n                glyph=\"navigation-left-arrow\"\n                [disabled]=\"isFirstPage\"\n                [ariaLabel]=\"('corePagination.previousLabel' | fdTranslate)()\"\n                [title]=\"('corePagination.previousLabel' | fdTranslate)()\"\n                class=\"fd-pagination__button\"\n                [attr.aria-disabled]=\"isFirstPage\"\n                (click)=\"previousPage()\"\n                (keyup.enter)=\"previousPage()\"\n                (keydown.space)=\"$event.preventDefault()\"\n                (keyup.space)=\"previousPage()\"\n            ></button>\n            <!-- Duplicated to preserve the items order for keyboard navigation -->\n            @for (page of _pagesBeforeCurrent; track page) {\n                @if (page !== _moreElementValue) {\n                    <button\n                        fdkFocusKeyManagerItem\n                        fd-button\n                        fdType=\"transparent\"\n                        [ariaLabel]=\"('corePagination.pageLabel' | fdTranslate: { pageNumber: page })()\"\n                        [title]=\"('corePagination.pageLabel' | fdTranslate: { pageNumber: page })()\"\n                        class=\"fd-pagination__link\"\n                        (click)=\"goToPage(page)\"\n                        (keyup.enter)=\"goToPage(page, $event)\"\n                        (keydown.space)=\"$event.preventDefault()\"\n                        (keyup.space)=\"goToPage(page, $event)\"\n                    >\n                        {{ page }}\n                    </button>\n                } @else {\n                    <span class=\"fd-pagination__more\" aria-hidden=\"true\" aria-label=\"...\" role=\"presentation\"></span>\n                }\n            }\n            <button\n                #currentPageElement\n                fdkFocusKeyManagerItem\n                fd-button\n                fdType=\"transparent\"\n                [ariaLabel]=\"('corePagination.pageLabel' | fdTranslate: { pageNumber: currentPage })()\"\n                class=\"fd-pagination__link is-active\"\n                [attr.aria-current]=\"true\"\n            >\n                {{ currentPage }}\n            </button>\n            <label fd-form-label class=\"fd-pagination__label\">\n                {{ ('corePagination.labelBeforeInputMobile' | fdTranslate)() }}\n            </label>\n            <input\n                #pageInputElement\n                fdkFocusKeyManagerItem\n                fd-form-control\n                fdkOnlyDigits\n                required\n                size=\"1\"\n                min=\"1\"\n                type=\"number\"\n                [max]=\"_lastPage\"\n                [state]=\"currentPageModel.invalid ? 'error' : null\"\n                class=\"fd-pagination__input\"\n                #currentPageModel=\"ngModel\"\n                [ngModel]=\"currentPage\"\n                [ariaLabel]=\"\n                    (\n                        'corePagination.inputAriaLabel'\n                        | fdTranslate: { pageNumber: currentPage, totalCount: _totalPages }\n                    )()\n                \"\n                (keydown.enter)=\"goToPage(currentPageModel.value)\"\n                (keydown.space)=\"goToPage(currentPageModel.value)\"\n                (blur)=\"_restoreInputValue(currentPageModel)\"\n            />\n            <label fd-form-label class=\"fd-pagination__label\">\n                {{\n                    (\n                        'corePagination.labelAfterInputMobile'\n                        | fdTranslate: { pageNumber: currentPage, totalCount: _totalPages }\n                    )()\n                }}\n            </label>\n            <!-- Duplicated to preserve the items order for keyboard navigation -->\n            @for (page of _pagesAfterCurrent; track page) {\n                @if (page !== _moreElementValue) {\n                    <button\n                        fdkFocusKeyManagerItem\n                        fd-button\n                        fdType=\"transparent\"\n                        [ariaLabel]=\"('corePagination.pageLabel' | fdTranslate: { pageNumber: page })()\"\n                        [title]=\"('corePagination.pageLabel' | fdTranslate: { pageNumber: page })()\"\n                        class=\"fd-pagination__link\"\n                        (click)=\"goToPage(page)\"\n                        (keyup.enter)=\"goToPage(page, $event)\"\n                        (keydown.space)=\"$event.preventDefault()\"\n                        (keyup.space)=\"goToPage(page, $event)\"\n                    >\n                        {{ page }}\n                    </button>\n                } @else {\n                    <span class=\"fd-pagination__more\" aria-hidden=\"true\" aria-label=\"...\" role=\"presentation\"></span>\n                }\n            }\n            <button\n                fdkFocusKeyManagerItem\n                fd-button\n                fdType=\"transparent\"\n                glyph=\"navigation-right-arrow\"\n                [disabled]=\"isLastPage\"\n                [ariaLabel]=\"('corePagination.nextLabel' | fdTranslate)()\"\n                [title]=\"('corePagination.nextLabel' | fdTranslate)()\"\n                class=\"fd-pagination__button\"\n                [attr.aria-disabled]=\"isLastPage\"\n                (click)=\"nextPage()\"\n                (keyup.enter)=\"nextPage()\"\n                (keydown.space)=\"$event.preventDefault()\"\n                (keyup.space)=\"nextPage()\"\n            ></button>\n            <button\n                fdkFocusKeyManagerItem\n                fd-button\n                fdType=\"transparent\"\n                glyph=\"media-forward\"\n                [disabled]=\"isLastPage\"\n                [ariaLabel]=\"('corePagination.lastLabel' | fdTranslate)()\"\n                [title]=\"('corePagination.lastLabel' | fdTranslate)()\"\n                class=\"fd-pagination__button fd-pagination__button--mobile\"\n                [attr.aria-disabled]=\"isLastPage\"\n                (click)=\"goToLastPage()\"\n                (keyup.enter)=\"goToLastPage()\"\n                (keydown.space)=\"$event.preventDefault()\"\n                (keyup.space)=\"goToLastPage()\"\n            ></button>\n        </nav>\n    }\n    @if (displayTotalItems) {\n        <span class=\"fd-pagination__total\" [attr.id]=\"_totalPagesElementId\">\n            <ng-template\n                [ngTemplateOutlet]=\"displayTextTemplate || total\"\n                [ngTemplateOutletContext]=\"{ showing: _currentShowing }\"\n            ></ng-template>\n        </span>\n    }\n}\n<ng-template #more>\n    <span class=\"fd-pagination__more\" aria-hidden=\"true\" aria-label=\"...\" role=\"presentation\"></span>\n</ng-template>\n<ng-template #total let-showing=\"showing\">\n    <span fd-form-label class=\"fd-pagination__total-label\">\n        {{ ('corePagination.totalResultsLabel' | fdTranslate: _currentShowing)() }}\n    </span>\n</ng-template>\n<ng-template #perPage let-pageOptions=\"pageOptions\">\n    <label fd-form-label class=\"fd-pagination__per-page-label\">\n        {{ ('corePagination.itemsPerPageLabel' | fdTranslate)() }}\n    </label>\n    <fd-select class=\"fd-pagination__per-page-select\" [value]=\"itemsPerPage\" (valueChange)=\"_onChangePerPage($event)\">\n        @for (option of pageOptions; track option) {\n            <li fd-option [value]=\"option\">{{ option }}</li>\n        }\n    </fd-select>\n</ng-template>\n", styles: [".fd-pagination{--fdPaginationMoreWidth:var(--fdPagination_Placeholder_Dots_Width);border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-inline:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;height:2.75rem;justify-content:space-between;padding-block:0;padding-inline:1rem;width:100%}.fd-pagination:after,.fd-pagination:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-pagination__per-page{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.fd-pagination__per-page:after,.fd-pagination__per-page:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-pagination__nav{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--fdPagination_Elements_Spacing);margin-inline:auto}.fd-pagination__nav:after,.fd-pagination__nav:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-pagination__more{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-pagination__more:after,.fd-pagination__more:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-pagination__more:before{content:\"...\";display:block;text-align:center;width:var(--fdPaginationMoreWidth)}.fd-pagination__more[class*=-compact],.fd-pagination__more[class*=-condensed],[class*=-compact] .fd-pagination__more:not([class*=-cozy]),[class*=-condensed] .fd-pagination__more:not([class*=-cozy]){--fdPaginationMoreWidth:var(--fdPagination_Placeholder_Dots_Width_Compact)}.fd-pagination .fd-pagination__input{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;min-width:2.5rem;text-align:center;width:auto}.fd-pagination .fd-pagination__input::-webkit-inner-spin-button,.fd-pagination .fd-pagination__input::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin-block:0;margin-inline:0}.fd-pagination .fd-pagination__label,.fd-pagination .fd-pagination__per-page-label{-ms-flex-negative:0;flex-shrink:0;-ms-flex-item-align:center;align-self:center}.fd-pagination .fd-pagination__label{display:none}.fd-pagination .fd-pagination__total-label{margin-block:0;margin-inline:0}.fd-pagination .fd-pagination__link.is-focus,.fd-pagination .fd-pagination__link:focus{outline:none;z-index:5}.fd-pagination .fd-pagination__link.is-focus:after,.fd-pagination .fd-pagination__link:focus:after{border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);border-radius:var(--fdButton_Focus_Border_Radius);content:\"\";display:block;inset:var(--fdButton_Outline_Offset) var(--fdButton_Outline_Offset) var(--fdButton_Outline_Offset) var(--fdButton_Outline_Offset);position:absolute}.fd-pagination .fd-pagination__link.is-focus.fd-button--toggled:after,.fd-pagination .fd-pagination__link.is-focus.is-selected:after,.fd-pagination .fd-pagination__link:focus.fd-button--toggled:after,.fd-pagination .fd-pagination__link:focus.is-selected:after{border-color:var(--fdButton_Outline_Contrast)}.fd-pagination .fd-pagination__link.is-active{display:none}.fd-pagination .fd-pagination__button [class*=sap-icon][dir=rtl],[dir=rtl] .fd-pagination .fd-pagination__button [class*=sap-icon]{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fd-pagination .fd-pagination__button--mobile{display:none}.fd-pagination .fd-pagination__button.is-disabled,.fd-pagination .fd-pagination__button:disabled,.fd-pagination .fd-pagination__button[aria-disabled=true]{pointer-events:none}.fd-pagination--short .fd-pagination__link.is-active,.fd-pagination--short .fd-pagination__link:active{display:-webkit-box;display:-ms-flexbox;display:flex}.fd-pagination--short .fd-pagination__input{display:none}.fd-pagination--mobile .fd-pagination__per-page+.fd-pagination__nav{margin-inline:auto 0}.fd-pagination--mobile .fd-pagination__link,.fd-pagination--mobile .fd-pagination__more,.fd-pagination--mobile .fd-pagination__per-page-label,.fd-pagination--mobile .fd-pagination__total{display:none}.fd-pagination--mobile .fd-pagination__button--mobile,.fd-pagination--mobile .fd-pagination__input,.fd-pagination--mobile .fd-pagination__label{display:-webkit-box;display:-ms-flexbox;display:flex}.fd-pagination--mobile .fd-pagination__link.is-active,.fd-pagination--mobile .fd-pagination__link:active{display:none}@media(width<=599px){.fd-pagination .fd-pagination__per-page+.fd-pagination__nav{margin-inline:auto 0}.fd-pagination .fd-pagination__link,.fd-pagination .fd-pagination__more,.fd-pagination .fd-pagination__per-page-label,.fd-pagination .fd-pagination__total{display:none}.fd-pagination .fd-pagination__button--mobile,.fd-pagination .fd-pagination__input,.fd-pagination .fd-pagination__label{display:-webkit-box;display:-ms-flexbox;display:flex}.fd-pagination .fd-pagination__link.is-active,.fd-pagination .fd-pagination__link:active{display:none}}@media(width>=600px)and (width<=1023px){.fd-pagination .fd-pagination__per-page+.fd-pagination__nav{margin-inline:auto 0}.fd-pagination .fd-pagination__link,.fd-pagination .fd-pagination__more,.fd-pagination .fd-pagination__per-page-label,.fd-pagination .fd-pagination__total{display:none}.fd-pagination .fd-pagination__button--mobile,.fd-pagination .fd-pagination__input,.fd-pagination .fd-pagination__label{display:-webkit-box;display:-ms-flexbox;display:flex}.fd-pagination .fd-pagination__link.is-active,.fd-pagination .fd-pagination__link:active{display:none}}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.fd-pagination__label .fd-form-label,.fd-pagination__total-label .fd-form-label{margin:0}\n/*! Bundled license information:\n\nfundamental-styles/dist/pagination.css:\n  (*!\n   * Fundamental Library Styles v0.41.7\n   * Copyright (c) 2026 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"] }]
        }], ctorParameters: () => [{ type: PaginationService }, { type: i0.ChangeDetectorRef }, { type: i2.LiveAnnouncer }, { type: i3.ContentDensityObserver }], propDecorators: { _focusKeyManagerList: [{
                type: ViewChild,
                args: [FocusKeyManagerListDirective]
            }], _focusKeyManagerItems: [{
                type: ViewChildren,
                args: [FocusKeyManagerItemDirective]
            }], _pageInputElement: [{
                type: ViewChild,
                args: ['pageInputElement', { read: ElementRef }]
            }], _currentPageElement: [{
                type: ViewChild,
                args: ['currentPageElement', { read: ElementRef }]
            }], id: [{
                type: Input
            }], mobile: [{
                type: Input,
                args: [{ transform: booleanAttribute }]
            }], totalItems: [{
                type: Input
            }], currentPage: [{
                type: Input
            }], itemsPerPage: [{
                type: Input
            }], itemsPerPageTemplate: [{
                type: Input
            }], itemsPerPageOptions: [{
                type: Input
            }], displayTotalItems: [{
                type: Input
            }], displayTextTemplate: [{
                type: Input
            }], pageChangeStart: [{
                type: Output
            }], itemsPerPageChange: [{
                type: Output
            }] } });

/**
 * @deprecated
 * Use direct imports of components and directives.
 */
class PaginationModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaginationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: PaginationModule, imports: [PaginationComponent], exports: [PaginationComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaginationModule, imports: [PaginationComponent] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaginationModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [PaginationComponent],
                    exports: [PaginationComponent]
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { PaginationComponent, PaginationModule, PaginationService };
//# sourceMappingURL=fundamental-ngx-core-pagination.mjs.map
