import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "ngx-pagination";
export class PaginationControlsComponent {
    constructor() {
        this.pageChange = new EventEmitter();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: PaginationControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: PaginationControlsComponent, selector: "vdr-pagination-controls", inputs: { id: "id", currentPage: "currentPage", itemsPerPage: "itemsPerPage", totalItems: "totalItems" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<pagination-template #p=\"paginationApi\" (pageChange)=\"pageChange.emit($event)\" [id]=\"id\">\n    <ul>\n        <li class=\"pagination-previous\">\n            <button\n                class=\"button\"\n                [disabled]=\"p.isFirstPage()\"\n                (click)=\"p.previous()\"\n                (keyup.enter)=\"p.previous()\"\n                tabindex=\"0\"\n            >\n                \u00AB\n            </button>\n        </li>\n\n        <li\n            *ngFor=\"let page of p.pages\"\n            class=\"page-number-button\"\n            [class.current]=\"p.getCurrent() === page.value && !(p.isFirstPage() && p.isLastPage())\"\n        >\n            <button\n                class=\"button\"\n                (click)=\"p.setCurrent(page.value)\"\n                (keyup.enter)=\"p.setCurrent(page.value)\"\n                tabindex=\"0\"\n            >\n                {{ page.label }}\n            </button>\n        </li>\n\n        <li class=\"pagination-next\">\n            <button\n                class=\"button\"\n                [disabled]=\"p.isLastPage()\"\n                (click)=\"p.next()\"\n                (keyup.enter)=\"p.next()\"\n                tabindex=\"0\"\n            >\n                \u00BB\n            </button>\n        </li>\n    </ul>\n</pagination-template>\n", styles: ["pagination-template{display:block}pagination-template ul{list-style-type:none;display:flex;justify-content:center;gap:2px}pagination-template li{transition:border-bottom-color .2s}pagination-template li>a{cursor:pointer}pagination-template li>a:hover,pagination-template li>a:focus{border-bottom-color:var(--color-grey-300);text-decoration:none}pagination-template li>a,pagination-template li>div{padding:3px 12px;display:block;-webkit-user-select:none;user-select:none}pagination-template .page-number-button button{box-shadow:none;border-bottom:2px solid transparent;font-size:var(--font-size-xs)}pagination-template .page-number-button.current button{border-bottom-color:var(--color-primary-500)}pagination-template .pagination-previous,pagination-template .pagination-next{z-index:1}@container (max-width: 500px){.page-number-button:not(.current){display:none}.page-number-button.current button{border-bottom-color:transparent!important}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.PaginationControlsDirective, selector: "pagination-template,[pagination-template]", inputs: ["id", "maxSize"], outputs: ["pageChange", "pageBoundsCorrection"], exportAs: ["paginationApi"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: PaginationControlsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'vdr-pagination-controls', changeDetection: ChangeDetectionStrategy.OnPush, template: "<pagination-template #p=\"paginationApi\" (pageChange)=\"pageChange.emit($event)\" [id]=\"id\">\n    <ul>\n        <li class=\"pagination-previous\">\n            <button\n                class=\"button\"\n                [disabled]=\"p.isFirstPage()\"\n                (click)=\"p.previous()\"\n                (keyup.enter)=\"p.previous()\"\n                tabindex=\"0\"\n            >\n                \u00AB\n            </button>\n        </li>\n\n        <li\n            *ngFor=\"let page of p.pages\"\n            class=\"page-number-button\"\n            [class.current]=\"p.getCurrent() === page.value && !(p.isFirstPage() && p.isLastPage())\"\n        >\n            <button\n                class=\"button\"\n                (click)=\"p.setCurrent(page.value)\"\n                (keyup.enter)=\"p.setCurrent(page.value)\"\n                tabindex=\"0\"\n            >\n                {{ page.label }}\n            </button>\n        </li>\n\n        <li class=\"pagination-next\">\n            <button\n                class=\"button\"\n                [disabled]=\"p.isLastPage()\"\n                (click)=\"p.next()\"\n                (keyup.enter)=\"p.next()\"\n                tabindex=\"0\"\n            >\n                \u00BB\n            </button>\n        </li>\n    </ul>\n</pagination-template>\n", styles: ["pagination-template{display:block}pagination-template ul{list-style-type:none;display:flex;justify-content:center;gap:2px}pagination-template li{transition:border-bottom-color .2s}pagination-template li>a{cursor:pointer}pagination-template li>a:hover,pagination-template li>a:focus{border-bottom-color:var(--color-grey-300);text-decoration:none}pagination-template li>a,pagination-template li>div{padding:3px 12px;display:block;-webkit-user-select:none;user-select:none}pagination-template .page-number-button button{box-shadow:none;border-bottom:2px solid transparent;font-size:var(--font-size-xs)}pagination-template .page-number-button.current button{border-bottom-color:var(--color-primary-500)}pagination-template .pagination-previous,pagination-template .pagination-next{z-index:1}@container (max-width: 500px){.page-number-button:not(.current){display:none}.page-number-button.current button{border-bottom-color:transparent!important}}\n"] }]
        }], propDecorators: { id: [{
                type: Input
            }], currentPage: [{
                type: Input
            }], itemsPerPage: [{
                type: Input
            }], totalItems: [{
                type: Input
            }], pageChange: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnaW5hdGlvbi1jb250cm9scy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL3BhZ2luYXRpb24tY29udHJvbHMvcGFnaW5hdGlvbi1jb250cm9scy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL3BhZ2luYXRpb24tY29udHJvbHMvcGFnaW5hdGlvbi1jb250cm9scy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQU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clBhZ2U6IG51bWJlcjtcbiAgICBASW5wdXQoKSB0b3RhbEl0ZW1zOiBudW1iZXI7XG4gICAgQE91dHB1dCgpIHBhZ2VDaGFuZ2UgPSBuZXcgRXZlbnRFbWl0dGVyPG51bWJlcj4oKTtcbn1cbiIsIjxwYWdpbmF0aW9uLXRlbXBsYXRlICNwPVwicGFnaW5hdGlvbkFwaVwiIChwYWdlQ2hhbmdlKT1cInBhZ2VDaGFuZ2UuZW1pdCgkZXZlbnQpXCIgW2lkXT1cImlkXCI+XG4gICAgPHVsPlxuICAgICAgICA8bGkgY2xhc3M9XCJwYWdpbmF0aW9uLXByZXZpb3VzXCI+XG4gICAgICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJidXR0b25cIlxuICAgICAgICAgICAgICAgIFtkaXNhYmxlZF09XCJwLmlzRmlyc3RQYWdlKClcIlxuICAgICAgICAgICAgICAgIChjbGljayk9XCJwLnByZXZpb3VzKClcIlxuICAgICAgICAgICAgICAgIChrZXl1cC5lbnRlcik9XCJwLnByZXZpb3VzKClcIlxuICAgICAgICAgICAgICAgIHRhYmluZGV4PVwiMFwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgwqtcbiAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICA8L2xpPlxuXG4gICAgICAgIDxsaVxuICAgICAgICAgICAgKm5nRm9yPVwibGV0IHBhZ2Ugb2YgcC5wYWdlc1wiXG4gICAgICAgICAgICBjbGFzcz1cInBhZ2UtbnVtYmVyLWJ1dHRvblwiXG4gICAgICAgICAgICBbY2xhc3MuY3VycmVudF09XCJwLmdldEN1cnJlbnQoKSA9PT0gcGFnZS52YWx1ZSAmJiAhKHAuaXNGaXJzdFBhZ2UoKSAmJiBwLmlzTGFzdFBhZ2UoKSlcIlxuICAgICAgICA+XG4gICAgICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJidXR0b25cIlxuICAgICAgICAgICAgICAgIChjbGljayk9XCJwLnNldEN1cnJlbnQocGFnZS52YWx1ZSlcIlxuICAgICAgICAgICAgICAgIChrZXl1cC5lbnRlcik9XCJwLnNldEN1cnJlbnQocGFnZS52YWx1ZSlcIlxuICAgICAgICAgICAgICAgIHRhYmluZGV4PVwiMFwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAge3sgcGFnZS5sYWJlbCB9fVxuICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgIDwvbGk+XG5cbiAgICAgICAgPGxpIGNsYXNzPVwicGFnaW5hdGlvbi1uZXh0XCI+XG4gICAgICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJidXR0b25cIlxuICAgICAgICAgICAgICAgIFtkaXNhYmxlZF09XCJwLmlzTGFzdFBhZ2UoKVwiXG4gICAgICAgICAgICAgICAgKGNsaWNrKT1cInAubmV4dCgpXCJcbiAgICAgICAgICAgICAgICAoa2V5dXAuZW50ZXIpPVwicC5uZXh0KClcIlxuICAgICAgICAgICAgICAgIHRhYmluZGV4PVwiMFwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgwrtcbiAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICA8L2xpPlxuICAgIDwvdWw+XG48L3BhZ2luYXRpb24tdGVtcGxhdGU+XG4iXX0=