import { __spread, __decorate, __metadata } from 'tslib';
import { ɵɵelementStart, ɵɵtext, ɵɵelementEnd, ɵɵnextContext, ɵɵadvance, ɵɵtextInterpolate, ɵɵelement, ɵɵelementContainerStart, ɵɵtemplate, ɵɵelementContainerEnd, ɵɵproperty, EventEmitter, ɵɵdefineComponent, ɵɵlistener, ɵɵattribute, ɵɵclassProp, ɵɵNgOnChangesFeature, ɵɵtemplateRefExtractor, ɵɵreference, ɵɵpureFunction2, ɵsetClassMetadata, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, ɵɵtextInterpolate1, ɵɵgetCurrentView, ɵɵrestoreView, ɵɵdirectiveInject, ChangeDetectorRef, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
import { toNumber, InputBoolean, InputNumber } from 'ng-zorro-antd/core';
import { NzI18nService, NzI18nModule } from 'ng-zorro-antd/i18n';
import { Subject, ReplaySubject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { NgTemplateOutlet, NgSwitch, NgSwitchCase, NgSwitchDefault, NgIf, NgForOf, CommonModule } from '@angular/common';
import { NzIconDirective, NzIconModule } from 'ng-zorro-antd/icon';
import { NzSelectComponent, NzOptionComponent, NzSelectModule } from 'ng-zorro-antd/select';
import { NgControlStatus, NgModel, FormsModule } from '@angular/forms';

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
var _c0 = ["nz-pagination-item", ""];
function NzPaginationItemComponent_ng_template_0_a_1_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementStart(0, "a");
    ɵɵtext(1);
    ɵɵelementEnd();
} if (rf & 2) {
    var page_r2660 = ɵɵnextContext().page;
    ɵɵadvance(1);
    ɵɵtextInterpolate(page_r2660);
} }
function NzPaginationItemComponent_ng_template_0_ng_container_2_i_2_Template(rf, ctx) { if (rf & 1) {
    ɵɵelement(0, "i", 9);
} }
function NzPaginationItemComponent_ng_template_0_ng_container_2_i_3_Template(rf, ctx) { if (rf & 1) {
    ɵɵelement(0, "i", 10);
} }
function NzPaginationItemComponent_ng_template_0_ng_container_2_div_4_i_2_Template(rf, ctx) { if (rf & 1) {
    ɵɵelement(0, "i", 15);
} }
function NzPaginationItemComponent_ng_template_0_ng_container_2_div_4_i_3_Template(rf, ctx) { if (rf & 1) {
    ɵɵelement(0, "i", 16);
} }
function NzPaginationItemComponent_ng_template_0_ng_container_2_div_4_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementStart(0, "div", 11);
    ɵɵelementContainerStart(1, 2);
    ɵɵtemplate(2, NzPaginationItemComponent_ng_template_0_ng_container_2_div_4_i_2_Template, 1, 0, "i", 12);
    ɵɵtemplate(3, NzPaginationItemComponent_ng_template_0_ng_container_2_div_4_i_3_Template, 1, 0, "i", 13);
    ɵɵelementContainerEnd();
    ɵɵelementStart(4, "span", 14);
    ɵɵtext(5, "\u2022\u2022\u2022");
    ɵɵelementEnd();
    ɵɵelementEnd();
} if (rf & 2) {
    var type_r2659 = ɵɵnextContext(2).$implicit;
    ɵɵadvance(1);
    ɵɵproperty("ngSwitch", type_r2659);
    ɵɵadvance(1);
    ɵɵproperty("ngSwitchCase", "prev_5");
    ɵɵadvance(1);
    ɵɵproperty("ngSwitchCase", "next_5");
} }
function NzPaginationItemComponent_ng_template_0_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementContainerStart(0);
    ɵɵelementStart(1, "a", 5);
    ɵɵtemplate(2, NzPaginationItemComponent_ng_template_0_ng_container_2_i_2_Template, 1, 0, "i", 6);
    ɵɵtemplate(3, NzPaginationItemComponent_ng_template_0_ng_container_2_i_3_Template, 1, 0, "i", 7);
    ɵɵtemplate(4, NzPaginationItemComponent_ng_template_0_ng_container_2_div_4_Template, 6, 3, "div", 8);
    ɵɵelementEnd();
    ɵɵelementContainerEnd();
} if (rf & 2) {
    var type_r2659 = ɵɵnextContext().$implicit;
    ɵɵadvance(1);
    ɵɵproperty("ngSwitch", type_r2659);
    ɵɵadvance(1);
    ɵɵproperty("ngSwitchCase", "prev");
    ɵɵadvance(1);
    ɵɵproperty("ngSwitchCase", "next");
} }
function NzPaginationItemComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementContainerStart(0, 2);
    ɵɵtemplate(1, NzPaginationItemComponent_ng_template_0_a_1_Template, 2, 1, "a", 3);
    ɵɵtemplate(2, NzPaginationItemComponent_ng_template_0_ng_container_2_Template, 5, 3, "ng-container", 4);
    ɵɵelementContainerEnd();
} if (rf & 2) {
    var type_r2659 = ctx.$implicit;
    ɵɵproperty("ngSwitch", type_r2659);
    ɵɵadvance(1);
    ɵɵproperty("ngSwitchCase", "page");
} }
function NzPaginationItemComponent_ng_template_2_Template(rf, ctx) { }
var _c1 = function (a0, a1) { return { $implicit: a0, page: a1 }; };
var NzPaginationItemComponent = /** @class */ (function () {
    function NzPaginationItemComponent() {
        this.active = false;
        this.locale = {};
        this.index = null;
        this.disabled = false;
        this.type = null;
        this.itemRender = null;
        this.diffIndex = new EventEmitter();
        this.gotoIndex = new EventEmitter();
        this.title = null;
    }
    NzPaginationItemComponent.prototype.clickItem = function () {
        if (!this.disabled) {
            if (this.type === 'page') {
                this.gotoIndex.emit(this.index);
            }
            else {
                this.diffIndex.emit({
                    next: 1,
                    prev: -1,
                    prev_5: -5,
                    next_5: 5
                }[this.type]);
            }
        }
    };
    NzPaginationItemComponent.prototype.ngOnChanges = function (changes) {
        var locale = changes.locale, index = changes.index, type = changes.type;
        if (locale || index || type) {
            this.title = {
                page: "" + this.index,
                next: this.locale.next_page,
                prev: this.locale.prev_page,
                prev_5: this.locale.prev_5,
                next_5: this.locale.next_5
            }[this.type];
        }
    };
    /** @nocollapse */ NzPaginationItemComponent.ɵfac = function NzPaginationItemComponent_Factory(t) { return new (t || NzPaginationItemComponent)(); };
    /** @nocollapse */ NzPaginationItemComponent.ɵcmp = ɵɵdefineComponent({ type: NzPaginationItemComponent, selectors: [["li", "nz-pagination-item", ""]], hostVars: 19, hostBindings: function NzPaginationItemComponent_HostBindings(rf, ctx) { if (rf & 1) {
            ɵɵlistener("click", function NzPaginationItemComponent_click_HostBindingHandler() { return ctx.clickItem(); });
        } if (rf & 2) {
            ɵɵattribute("title", ctx.title);
            ɵɵclassProp("ant-pagination-prev", ctx.type === "prev")("ant-pagination-next", ctx.type === "next")("ant-pagination-item", ctx.type === "page")("ant-pagination-jump-prev", ctx.type === "prev_5")("ant-pagination-jump-prev-custom-icon", ctx.type === "prev_5")("ant-pagination-jump-next", ctx.type === "next_5")("ant-pagination-jump-next-custom-icon", ctx.type === "next_5")("ant-pagination-disabled", ctx.disabled)("ant-pagination-item-active", ctx.active);
        } }, inputs: { active: "active", locale: "locale", index: "index", disabled: "disabled", type: "type", itemRender: "itemRender" }, outputs: { diffIndex: "diffIndex", gotoIndex: "gotoIndex" }, features: [ɵɵNgOnChangesFeature], attrs: _c0, decls: 3, vars: 5, consts: [["renderItemTemplate", ""], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], [1, "ant-pagination-item-link", 3, "ngSwitch"], ["nz-icon", "", "nzType", "left", 4, "ngSwitchCase"], ["nz-icon", "", "nzType", "right", 4, "ngSwitchCase"], ["class", "ant-pagination-item-container", 4, "ngSwitchDefault"], ["nz-icon", "", "nzType", "left"], ["nz-icon", "", "nzType", "right"], [1, "ant-pagination-item-container"], ["nz-icon", "", "nzType", "double-left", "class", "ant-pagination-item-link-icon", 4, "ngSwitchCase"], ["nz-icon", "", "nzType", "double-right", "class", "ant-pagination-item-link-icon", 4, "ngSwitchCase"], [1, "ant-pagination-item-ellipsis"], ["nz-icon", "", "nzType", "double-left", 1, "ant-pagination-item-link-icon"], ["nz-icon", "", "nzType", "double-right", 1, "ant-pagination-item-link-icon"]], template: function NzPaginationItemComponent_Template(rf, ctx) { if (rf & 1) {
            ɵɵtemplate(0, NzPaginationItemComponent_ng_template_0_Template, 3, 2, "ng-template", null, 0, ɵɵtemplateRefExtractor);
            ɵɵtemplate(2, NzPaginationItemComponent_ng_template_2_Template, 0, 0, "ng-template", 1);
        } if (rf & 2) {
            var _r2656 = ɵɵreference(1);
            ɵɵadvance(2);
            ɵɵproperty("ngTemplateOutlet", ctx.itemRender || _r2656)("ngTemplateOutletContext", ɵɵpureFunction2(2, _c1, ctx.type, ctx.index));
        } }, directives: [NgTemplateOutlet, NgSwitch, NgSwitchCase, NgSwitchDefault, NzIconDirective], encapsulation: 2, changeDetection: 0 });
    return NzPaginationItemComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzPaginationItemComponent, [{
        type: Component,
        args: [{
                selector: 'li[nz-pagination-item]',
                preserveWhitespaces: false,
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                template: "\n    <ng-template #renderItemTemplate let-type let-page=\"page\">\n      <ng-container [ngSwitch]=\"type\">\n        <a *ngSwitchCase=\"'page'\">{{ page }}</a>\n        <ng-container *ngSwitchDefault>\n          <a class=\"ant-pagination-item-link\" [ngSwitch]=\"type\">\n            <i nz-icon nzType=\"left\" *ngSwitchCase=\"'prev'\"></i>\n            <i nz-icon nzType=\"right\" *ngSwitchCase=\"'next'\"></i>\n            <div class=\"ant-pagination-item-container\" *ngSwitchDefault>\n              <ng-container [ngSwitch]=\"type\">\n                <i *ngSwitchCase=\"'prev_5'\" nz-icon nzType=\"double-left\" class=\"ant-pagination-item-link-icon\"></i>\n                <i *ngSwitchCase=\"'next_5'\" nz-icon nzType=\"double-right\" class=\"ant-pagination-item-link-icon\"></i>\n              </ng-container>\n              <span class=\"ant-pagination-item-ellipsis\">\u2022\u2022\u2022</span>\n            </div>\n          </a>\n        </ng-container>\n      </ng-container>\n    </ng-template>\n    <ng-template\n      [ngTemplateOutlet]=\"itemRender || renderItemTemplate\"\n      [ngTemplateOutletContext]=\"{ $implicit: type, page: index }\"\n    ></ng-template>\n  ",
                host: {
                    '[class.ant-pagination-prev]': "type === 'prev'",
                    '[class.ant-pagination-next]': "type === 'next'",
                    '[class.ant-pagination-item]': "type === 'page'",
                    '[class.ant-pagination-jump-prev]': "type === 'prev_5'",
                    '[class.ant-pagination-jump-prev-custom-icon]': "type === 'prev_5'",
                    '[class.ant-pagination-jump-next]': "type === 'next_5'",
                    '[class.ant-pagination-jump-next-custom-icon]': "type === 'next_5'",
                    '[class.ant-pagination-disabled]': 'disabled',
                    '[class.ant-pagination-item-active]]': 'active',
                    '[attr.title]': 'title',
                    '(click)': 'clickItem()'
                }
            }]
    }], null, { active: [{
            type: Input
        }], locale: [{
            type: Input
        }], index: [{
            type: Input
        }], disabled: [{
            type: Input
        }], type: [{
            type: Input
        }], itemRender: [{
            type: Input
        }], diffIndex: [{
            type: Output
        }], gotoIndex: [{
            type: Output
        }] }); })();

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
var _c0$1 = ["nz-pagination-simple", ""];
var NzPaginationSimpleComponent = /** @class */ (function () {
    function NzPaginationSimpleComponent() {
        this.itemRender = null;
        this.disabled = false;
        this.locale = {};
        this.total = 0;
        this.pageIndex = 1;
        this.pageSize = 10;
        this.pageIndexChange = new EventEmitter();
        this.lastIndex = 0;
        this.isFirstIndex = false;
        this.isLastIndex = false;
    }
    NzPaginationSimpleComponent.prototype.jumpToPageViaInput = function ($event) {
        var target = $event.target;
        var index = toNumber(target.value, this.pageIndex);
        this.onPageIndexChange(index);
        target.value = "" + this.pageIndex;
    };
    NzPaginationSimpleComponent.prototype.prePage = function () {
        this.onPageIndexChange(this.pageIndex - 1);
    };
    NzPaginationSimpleComponent.prototype.nextPage = function () {
        this.onPageIndexChange(this.pageIndex + 1);
    };
    NzPaginationSimpleComponent.prototype.onPageIndexChange = function (index) {
        this.pageIndexChange.next(index);
    };
    NzPaginationSimpleComponent.prototype.updateBindingValue = function () {
        this.lastIndex = Math.ceil(this.total / this.pageSize);
        this.isFirstIndex = this.pageIndex === 1;
        this.isLastIndex = this.pageIndex === this.lastIndex;
    };
    NzPaginationSimpleComponent.prototype.ngOnChanges = function (changes) {
        var pageIndex = changes.pageIndex, total = changes.total, pageSize = changes.pageSize;
        if (pageIndex || total || pageSize) {
            this.updateBindingValue();
        }
    };
    /** @nocollapse */ NzPaginationSimpleComponent.ɵfac = function NzPaginationSimpleComponent_Factory(t) { return new (t || NzPaginationSimpleComponent)(); };
    /** @nocollapse */ NzPaginationSimpleComponent.ɵcmp = ɵɵdefineComponent({ type: NzPaginationSimpleComponent, selectors: [["ul", "nz-pagination-simple", ""]], hostVars: 6, hostBindings: function NzPaginationSimpleComponent_HostBindings(rf, ctx) { if (rf & 2) {
            ɵɵclassProp("ant-pagination", true)("ant-pagination-simple", true)("ant-pagination-disabled", ctx.disabled);
        } }, inputs: { itemRender: "itemRender", disabled: "disabled", locale: "locale", total: "total", pageIndex: "pageIndex", pageSize: "pageSize" }, outputs: { pageIndexChange: "pageIndexChange" }, features: [ɵɵNgOnChangesFeature], attrs: _c0$1, decls: 7, vars: 10, consts: [["nz-pagination-item", "", "type", "prev", 3, "disabled", "itemRender", "click"], [1, "ant-pagination-simple-pager"], ["size", "3", 3, "disabled", "value", "keydown.enter"], [1, "ant-pagination-slash"], ["nz-pagination-item", "", "type", "next", 3, "disabled", "itemRender", "click"]], template: function NzPaginationSimpleComponent_Template(rf, ctx) { if (rf & 1) {
            ɵɵelementStart(0, "li", 0);
            ɵɵlistener("click", function NzPaginationSimpleComponent_Template_li_click_0_listener() { return ctx.prePage(); });
            ɵɵelementEnd();
            ɵɵelementStart(1, "li", 1);
            ɵɵelementStart(2, "input", 2);
            ɵɵlistener("keydown.enter", function NzPaginationSimpleComponent_Template_input_keydown_enter_2_listener($event) { return ctx.jumpToPageViaInput($event); });
            ɵɵelementEnd();
            ɵɵelementStart(3, "span", 3);
            ɵɵtext(4, "/");
            ɵɵelementEnd();
            ɵɵtext(5);
            ɵɵelementEnd();
            ɵɵelementStart(6, "li", 4);
            ɵɵlistener("click", function NzPaginationSimpleComponent_Template_li_click_6_listener() { return ctx.nextPage(); });
            ɵɵelementEnd();
        } if (rf & 2) {
            ɵɵproperty("disabled", ctx.isFirstIndex)("itemRender", ctx.itemRender);
            ɵɵattribute("title", ctx.locale.prev_page);
            ɵɵadvance(1);
            ɵɵattribute("title", ctx.pageIndex + "/" + ctx.lastIndex);
            ɵɵadvance(1);
            ɵɵproperty("disabled", ctx.disabled)("value", ctx.pageIndex);
            ɵɵadvance(3);
            ɵɵtextInterpolate1(" ", ctx.lastIndex, " ");
            ɵɵadvance(1);
            ɵɵproperty("disabled", ctx.isLastIndex)("itemRender", ctx.itemRender);
            ɵɵattribute("title", ctx.locale.next_page);
        } }, directives: [NzPaginationItemComponent], encapsulation: 2, changeDetection: 0 });
    return NzPaginationSimpleComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzPaginationSimpleComponent, [{
        type: Component,
        args: [{
                selector: 'ul[nz-pagination-simple]',
                preserveWhitespaces: false,
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                template: "\n    <li\n      nz-pagination-item\n      [attr.title]=\"locale.prev_page\"\n      [disabled]=\"isFirstIndex\"\n      (click)=\"prePage()\"\n      type=\"prev\"\n      [itemRender]=\"itemRender\"\n    ></li>\n    <li [attr.title]=\"pageIndex + '/' + lastIndex\" class=\"ant-pagination-simple-pager\">\n      <input [disabled]=\"disabled\" [value]=\"pageIndex\" (keydown.enter)=\"jumpToPageViaInput($event)\" size=\"3\" />\n      <span class=\"ant-pagination-slash\">/</span>\n      {{ lastIndex }}\n    </li>\n    <li\n      nz-pagination-item\n      [attr.title]=\"locale.next_page\"\n      [disabled]=\"isLastIndex\"\n      (click)=\"nextPage()\"\n      type=\"next\"\n      [itemRender]=\"itemRender\"\n    ></li>\n  ",
                host: {
                    '[class.ant-pagination]': 'true',
                    '[class.ant-pagination-simple]': 'true',
                    '[class.ant-pagination-disabled]': 'disabled'
                }
            }]
    }], null, { itemRender: [{
            type: Input
        }], disabled: [{
            type: Input
        }], locale: [{
            type: Input
        }], total: [{
            type: Input
        }], pageIndex: [{
            type: Input
        }], pageSize: [{
            type: Input
        }], pageIndexChange: [{
            type: Output
        }] }); })();

var _c0$2 = ["nz-pagination-options", ""];
function NzPaginationOptionsComponent_nz_select_0_nz_option_1_Template(rf, ctx) { if (rf & 1) {
    ɵɵelement(0, "nz-option", 4);
} if (rf & 2) {
    var option_r2685 = ctx.$implicit;
    ɵɵproperty("nzLabel", option_r2685.label)("nzValue", option_r2685.value);
} }
function NzPaginationOptionsComponent_nz_select_0_Template(rf, ctx) { if (rf & 1) {
    var _r2687 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "nz-select", 2);
    ɵɵlistener("ngModelChange", function NzPaginationOptionsComponent_nz_select_0_Template_nz_select_ngModelChange_0_listener($event) { ɵɵrestoreView(_r2687); var ctx_r2686 = ɵɵnextContext(); return ctx_r2686.onPageSizeChange($event); });
    ɵɵtemplate(1, NzPaginationOptionsComponent_nz_select_0_nz_option_1_Template, 1, 2, "nz-option", 3);
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r2682 = ɵɵnextContext();
    ɵɵproperty("nzDisabled", ctx_r2682.disabled)("nzSize", ctx_r2682.nzSize)("ngModel", ctx_r2682.pageSize);
    ɵɵadvance(1);
    ɵɵproperty("ngForOf", ctx_r2682.listOfPageSizeOption)("ngForTrackBy", ctx_r2682.trackByOption);
} }
function NzPaginationOptionsComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    var _r2689 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "div", 5);
    ɵɵtext(1);
    ɵɵelementStart(2, "input", 6);
    ɵɵlistener("keydown.enter", function NzPaginationOptionsComponent_div_1_Template_input_keydown_enter_2_listener($event) { ɵɵrestoreView(_r2689); var ctx_r2688 = ɵɵnextContext(); return ctx_r2688.jumpToPageViaInput($event); });
    ɵɵelementEnd();
    ɵɵtext(3);
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r2683 = ɵɵnextContext();
    ɵɵadvance(1);
    ɵɵtextInterpolate1(" ", ctx_r2683.locale.jump_to, " ");
    ɵɵadvance(1);
    ɵɵproperty("disabled", ctx_r2683.disabled);
    ɵɵadvance(1);
    ɵɵtextInterpolate1(" ", ctx_r2683.locale.page, " ");
} }
var NzPaginationOptionsComponent = /** @class */ (function () {
    function NzPaginationOptionsComponent() {
        this.nzSize = 'default';
        this.disabled = false;
        this.showSizeChanger = false;
        this.showQuickJumper = false;
        this.locale = {};
        this.total = 0;
        this.pageIndex = 1;
        this.pageSize = 10;
        this.pageSizeOptions = [];
        this.pageIndexChange = new EventEmitter();
        this.pageSizeChange = new EventEmitter();
        this.listOfPageSizeOption = [];
    }
    NzPaginationOptionsComponent.prototype.onPageSizeChange = function (size) {
        if (this.pageSize !== size) {
            this.pageSizeChange.next(size);
        }
    };
    NzPaginationOptionsComponent.prototype.jumpToPageViaInput = function ($event) {
        var target = $event.target;
        var index = toNumber(target.value, this.pageIndex);
        this.pageIndexChange.next(index);
        target.value = '';
    };
    NzPaginationOptionsComponent.prototype.trackByOption = function (_, option) {
        return option.value;
    };
    NzPaginationOptionsComponent.prototype.ngOnChanges = function (changes) {
        var _this = this;
        var pageSize = changes.pageSize, pageSizeOptions = changes.pageSizeOptions, locale = changes.locale;
        if (pageSize || pageSizeOptions || locale) {
            this.listOfPageSizeOption = __spread(new Set(__spread(this.pageSizeOptions, [this.pageSize]))).map(function (item) {
                return {
                    value: item,
                    label: item + " " + _this.locale.items_per_page
                };
            });
        }
    };
    /** @nocollapse */ NzPaginationOptionsComponent.ɵfac = function NzPaginationOptionsComponent_Factory(t) { return new (t || NzPaginationOptionsComponent)(); };
    /** @nocollapse */ NzPaginationOptionsComponent.ɵcmp = ɵɵdefineComponent({ type: NzPaginationOptionsComponent, selectors: [["div", "nz-pagination-options", ""]], hostVars: 2, hostBindings: function NzPaginationOptionsComponent_HostBindings(rf, ctx) { if (rf & 2) {
            ɵɵclassProp("ant-pagination-options", true);
        } }, inputs: { nzSize: "nzSize", disabled: "disabled", showSizeChanger: "showSizeChanger", showQuickJumper: "showQuickJumper", locale: "locale", total: "total", pageIndex: "pageIndex", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions" }, outputs: { pageIndexChange: "pageIndexChange", pageSizeChange: "pageSizeChange" }, features: [ɵɵNgOnChangesFeature], attrs: _c0$2, decls: 2, vars: 2, consts: [["class", "ant-pagination-options-size-changer", 3, "nzDisabled", "nzSize", "ngModel", "ngModelChange", 4, "ngIf"], ["class", "ant-pagination-options-quick-jumper", 4, "ngIf"], [1, "ant-pagination-options-size-changer", 3, "nzDisabled", "nzSize", "ngModel", "ngModelChange"], [3, "nzLabel", "nzValue", 4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "nzLabel", "nzValue"], [1, "ant-pagination-options-quick-jumper"], [3, "disabled", "keydown.enter"]], template: function NzPaginationOptionsComponent_Template(rf, ctx) { if (rf & 1) {
            ɵɵtemplate(0, NzPaginationOptionsComponent_nz_select_0_Template, 2, 5, "nz-select", 0);
            ɵɵtemplate(1, NzPaginationOptionsComponent_div_1_Template, 4, 3, "div", 1);
        } if (rf & 2) {
            ɵɵproperty("ngIf", ctx.showSizeChanger);
            ɵɵadvance(1);
            ɵɵproperty("ngIf", ctx.showQuickJumper);
        } }, directives: [NgIf, NzSelectComponent, NgControlStatus, NgModel, NgForOf, NzOptionComponent], encapsulation: 2, changeDetection: 0 });
    return NzPaginationOptionsComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzPaginationOptionsComponent, [{
        type: Component,
        args: [{
                selector: 'div[nz-pagination-options]',
                preserveWhitespaces: false,
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                template: "\n    <nz-select\n      class=\"ant-pagination-options-size-changer\"\n      *ngIf=\"showSizeChanger\"\n      [nzDisabled]=\"disabled\"\n      [nzSize]=\"nzSize\"\n      [ngModel]=\"pageSize\"\n      (ngModelChange)=\"onPageSizeChange($event)\"\n    >\n      <nz-option\n        *ngFor=\"let option of listOfPageSizeOption; trackBy: trackByOption\"\n        [nzLabel]=\"option.label\"\n        [nzValue]=\"option.value\"\n      ></nz-option>\n    </nz-select>\n    <div class=\"ant-pagination-options-quick-jumper\" *ngIf=\"showQuickJumper\">\n      {{ locale.jump_to }}\n      <input [disabled]=\"disabled\" (keydown.enter)=\"jumpToPageViaInput($event)\" />\n      {{ locale.page }}\n    </div>\n  ",
                host: {
                    '[class.ant-pagination-options]': 'true'
                }
            }]
    }], null, { nzSize: [{
            type: Input
        }], disabled: [{
            type: Input
        }], showSizeChanger: [{
            type: Input
        }], showQuickJumper: [{
            type: Input
        }], locale: [{
            type: Input
        }], total: [{
            type: Input
        }], pageIndex: [{
            type: Input
        }], pageSize: [{
            type: Input
        }], pageSizeOptions: [{
            type: Input
        }], pageIndexChange: [{
            type: Output
        }], pageSizeChange: [{
            type: Output
        }] }); })();

var _c0$3 = ["nz-pagination-default", ""];
function NzPaginationDefaultComponent_li_0_ng_template_1_Template(rf, ctx) { }
var _c1$1 = function (a0, a1) { return { $implicit: a0, range: a1 }; };
function NzPaginationDefaultComponent_li_0_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementStart(0, "li", 3);
    ɵɵtemplate(1, NzPaginationDefaultComponent_li_0_ng_template_1_Template, 0, 0, "ng-template", 4);
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r2671 = ɵɵnextContext();
    ɵɵadvance(1);
    ɵɵproperty("ngTemplateOutlet", ctx_r2671.showTotal)("ngTemplateOutletContext", ɵɵpureFunction2(2, _c1$1, ctx_r2671.total, ctx_r2671.ranges));
} }
function NzPaginationDefaultComponent_li_1_Template(rf, ctx) { if (rf & 1) {
    var _r2677 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "li", 5);
    ɵɵlistener("gotoIndex", function NzPaginationDefaultComponent_li_1_Template_li_gotoIndex_0_listener($event) { ɵɵrestoreView(_r2677); var ctx_r2676 = ɵɵnextContext(); return ctx_r2676.jumpPage($event); })("diffIndex", function NzPaginationDefaultComponent_li_1_Template_li_diffIndex_0_listener($event) { ɵɵrestoreView(_r2677); var ctx_r2678 = ɵɵnextContext(); return ctx_r2678.jumpDiff($event); });
    ɵɵelementEnd();
} if (rf & 2) {
    var page_r2675 = ctx.$implicit;
    var ctx_r2672 = ɵɵnextContext();
    ɵɵproperty("locale", ctx_r2672.locale)("type", page_r2675.type)("index", page_r2675.index)("disabled", page_r2675.disabled)("itemRender", ctx_r2672.itemRender)("active", ctx_r2672.pageIndex === page_r2675.index);
} }
function NzPaginationDefaultComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    var _r2680 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "div", 6);
    ɵɵlistener("pageIndexChange", function NzPaginationDefaultComponent_div_2_Template_div_pageIndexChange_0_listener($event) { ɵɵrestoreView(_r2680); var ctx_r2679 = ɵɵnextContext(); return ctx_r2679.onPageIndexChange($event); })("pageSizeChange", function NzPaginationDefaultComponent_div_2_Template_div_pageSizeChange_0_listener($event) { ɵɵrestoreView(_r2680); var ctx_r2681 = ɵɵnextContext(); return ctx_r2681.onPageSizeChange($event); });
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r2673 = ɵɵnextContext();
    ɵɵproperty("total", ctx_r2673.total)("locale", ctx_r2673.locale)("disabled", ctx_r2673.disabled)("nzSize", ctx_r2673.nzSize)("showSizeChanger", ctx_r2673.showSizeChanger)("showQuickJumper", ctx_r2673.showQuickJumper)("pageIndex", ctx_r2673.pageIndex)("pageSize", ctx_r2673.pageSize)("pageSizeOptions", ctx_r2673.pageSizeOptions);
} }
var NzPaginationDefaultComponent = /** @class */ (function () {
    function NzPaginationDefaultComponent() {
        this.nzSize = 'default';
        this.showTotal = null;
        this.disabled = false;
        this.locale = {};
        this.showSizeChanger = false;
        this.showQuickJumper = false;
        this.total = 0;
        this.pageIndex = 1;
        this.pageSize = 10;
        this.pageSizeOptions = [10, 20, 30, 40];
        this.pageIndexChange = new EventEmitter();
        this.pageSizeChange = new EventEmitter();
        this.ranges = [0, 0];
        this.listOfPageItem = [];
    }
    NzPaginationDefaultComponent.prototype.jumpPage = function (index) {
        this.onPageIndexChange(index);
    };
    NzPaginationDefaultComponent.prototype.jumpDiff = function (diff) {
        this.jumpPage(this.pageIndex + diff);
    };
    NzPaginationDefaultComponent.prototype.trackByPageItem = function (_, value) {
        return value.type + "-" + value.index;
    };
    NzPaginationDefaultComponent.prototype.onPageIndexChange = function (index) {
        this.pageIndexChange.next(index);
    };
    NzPaginationDefaultComponent.prototype.onPageSizeChange = function (size) {
        this.pageSizeChange.next(size);
    };
    NzPaginationDefaultComponent.prototype.getLastIndex = function (total, pageSize) {
        return Math.ceil(total / pageSize);
    };
    NzPaginationDefaultComponent.prototype.buildIndexes = function () {
        var lastIndex = this.getLastIndex(this.total, this.pageSize);
        this.listOfPageItem = this.getListOfPageItem(this.pageIndex, lastIndex);
    };
    NzPaginationDefaultComponent.prototype.getListOfPageItem = function (pageIndex, lastIndex) {
        var concatWithPrevNext = function (listOfPage) {
            var prevItem = {
                type: 'prev',
                disabled: pageIndex === 1
            };
            var nextItem = {
                type: 'next',
                disabled: pageIndex === lastIndex
            };
            return __spread([prevItem], listOfPage, [nextItem]);
        };
        var generatePage = function (start, end) {
            var list = [];
            for (var i = start; i <= end; i++) {
                list.push({
                    index: i,
                    type: 'page'
                });
            }
            return list;
        };
        if (lastIndex <= 9) {
            return concatWithPrevNext(generatePage(1, lastIndex));
        }
        else {
            var generateRangeItem = function (selected, last) {
                var listOfRange = [];
                var prevFiveItem = {
                    type: 'prev_5'
                };
                var nextFiveItem = {
                    type: 'next_5'
                };
                var firstPageItem = generatePage(1, 1);
                var lastPageItem = generatePage(lastIndex, lastIndex);
                if (selected < 4) {
                    listOfRange = __spread(generatePage(2, 5), [nextFiveItem]);
                }
                else if (selected < last - 3) {
                    listOfRange = __spread([prevFiveItem], generatePage(selected - 2, selected + 2), [nextFiveItem]);
                }
                else {
                    listOfRange = __spread([prevFiveItem], generatePage(last - 4, last - 1));
                }
                return __spread(firstPageItem, listOfRange, lastPageItem);
            };
            return concatWithPrevNext(generateRangeItem(pageIndex, lastIndex));
        }
    };
    NzPaginationDefaultComponent.prototype.ngOnChanges = function (changes) {
        var pageIndex = changes.pageIndex, pageSize = changes.pageSize, total = changes.total;
        if (pageIndex || pageSize || total) {
            this.ranges = [(this.pageIndex - 1) * this.pageSize + 1, Math.min(this.pageIndex * this.pageSize, this.total)];
            this.buildIndexes();
        }
    };
    /** @nocollapse */ NzPaginationDefaultComponent.ɵfac = function NzPaginationDefaultComponent_Factory(t) { return new (t || NzPaginationDefaultComponent)(); };
    /** @nocollapse */ NzPaginationDefaultComponent.ɵcmp = ɵɵdefineComponent({ type: NzPaginationDefaultComponent, selectors: [["ul", "nz-pagination-default", ""]], hostVars: 6, hostBindings: function NzPaginationDefaultComponent_HostBindings(rf, ctx) { if (rf & 2) {
            ɵɵclassProp("ant-pagination", true)("ant-pagination-disabled", ctx.disabled)("mini", ctx.nzSize === "small");
        } }, inputs: { nzSize: "nzSize", itemRender: "itemRender", showTotal: "showTotal", disabled: "disabled", locale: "locale", showSizeChanger: "showSizeChanger", showQuickJumper: "showQuickJumper", total: "total", pageIndex: "pageIndex", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions" }, outputs: { pageIndexChange: "pageIndexChange", pageSizeChange: "pageSizeChange" }, features: [ɵɵNgOnChangesFeature], attrs: _c0$3, decls: 3, vars: 4, consts: [["class", "ant-pagination-total-text", 4, "ngIf"], ["nz-pagination-item", "", 3, "locale", "type", "index", "disabled", "itemRender", "active", "gotoIndex", "diffIndex", 4, "ngFor", "ngForOf", "ngForTrackBy"], ["nz-pagination-options", "", 3, "total", "locale", "disabled", "nzSize", "showSizeChanger", "showQuickJumper", "pageIndex", "pageSize", "pageSizeOptions", "pageIndexChange", "pageSizeChange", 4, "ngIf"], [1, "ant-pagination-total-text"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], ["nz-pagination-item", "", 3, "locale", "type", "index", "disabled", "itemRender", "active", "gotoIndex", "diffIndex"], ["nz-pagination-options", "", 3, "total", "locale", "disabled", "nzSize", "showSizeChanger", "showQuickJumper", "pageIndex", "pageSize", "pageSizeOptions", "pageIndexChange", "pageSizeChange"]], template: function NzPaginationDefaultComponent_Template(rf, ctx) { if (rf & 1) {
            ɵɵtemplate(0, NzPaginationDefaultComponent_li_0_Template, 2, 5, "li", 0);
            ɵɵtemplate(1, NzPaginationDefaultComponent_li_1_Template, 1, 6, "li", 1);
            ɵɵtemplate(2, NzPaginationDefaultComponent_div_2_Template, 1, 9, "div", 2);
        } if (rf & 2) {
            ɵɵproperty("ngIf", ctx.showTotal);
            ɵɵadvance(1);
            ɵɵproperty("ngForOf", ctx.listOfPageItem)("ngForTrackBy", ctx.trackByPageItem);
            ɵɵadvance(1);
            ɵɵproperty("ngIf", ctx.showQuickJumper || ctx.showSizeChanger);
        } }, directives: [NgIf, NgForOf, NgTemplateOutlet, NzPaginationItemComponent, NzPaginationOptionsComponent], encapsulation: 2, changeDetection: 0 });
    return NzPaginationDefaultComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzPaginationDefaultComponent, [{
        type: Component,
        args: [{
                selector: 'ul[nz-pagination-default]',
                preserveWhitespaces: false,
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                template: "\n    <li class=\"ant-pagination-total-text\" *ngIf=\"showTotal\">\n      <ng-template [ngTemplateOutlet]=\"showTotal\" [ngTemplateOutletContext]=\"{ $implicit: total, range: ranges }\"></ng-template>\n    </li>\n    <li\n      *ngFor=\"let page of listOfPageItem; trackBy: trackByPageItem\"\n      nz-pagination-item\n      [locale]=\"locale\"\n      [type]=\"page.type\"\n      [index]=\"page.index\"\n      [disabled]=\"page.disabled\"\n      [itemRender]=\"itemRender\"\n      [active]=\"pageIndex === page.index\"\n      (gotoIndex)=\"jumpPage($event)\"\n      (diffIndex)=\"jumpDiff($event)\"\n    ></li>\n    <div\n      nz-pagination-options\n      *ngIf=\"showQuickJumper || showSizeChanger\"\n      [total]=\"total\"\n      [locale]=\"locale\"\n      [disabled]=\"disabled\"\n      [nzSize]=\"nzSize\"\n      [showSizeChanger]=\"showSizeChanger\"\n      [showQuickJumper]=\"showQuickJumper\"\n      [pageIndex]=\"pageIndex\"\n      [pageSize]=\"pageSize\"\n      [pageSizeOptions]=\"pageSizeOptions\"\n      (pageIndexChange)=\"onPageIndexChange($event)\"\n      (pageSizeChange)=\"onPageSizeChange($event)\"\n    ></div>\n  ",
                host: {
                    '[class.ant-pagination]': 'true',
                    '[class.ant-pagination-disabled]': 'disabled',
                    '[class.mini]': "nzSize === 'small'"
                }
            }]
    }], null, { nzSize: [{
            type: Input
        }], itemRender: [{
            type: Input
        }], showTotal: [{
            type: Input
        }], disabled: [{
            type: Input
        }], locale: [{
            type: Input
        }], showSizeChanger: [{
            type: Input
        }], showQuickJumper: [{
            type: Input
        }], total: [{
            type: Input
        }], pageIndex: [{
            type: Input
        }], pageSize: [{
            type: Input
        }], pageSizeOptions: [{
            type: Input
        }], pageIndexChange: [{
            type: Output
        }], pageSizeChange: [{
            type: Output
        }] }); })();

function NzPaginationComponent_ng_container_0_ul_1_Template(rf, ctx) { if (rf & 1) {
    var _r2652 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "ul", 3);
    ɵɵlistener("pageIndexChange", function NzPaginationComponent_ng_container_0_ul_1_Template_ul_pageIndexChange_0_listener($event) { ɵɵrestoreView(_r2652); var ctx_r2651 = ɵɵnextContext(2); return ctx_r2651.onPageIndexChange($event); });
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r2649 = ɵɵnextContext(2);
    ɵɵclassProp("ant-table-pagination", ctx_r2649.nzInsideTable);
    ɵɵproperty("disabled", ctx_r2649.nzDisabled)("itemRender", ctx_r2649.nzItemRender)("locale", ctx_r2649.locale)("pageSize", ctx_r2649.nzPageSize)("total", ctx_r2649.nzTotal)("pageIndex", ctx_r2649.nzPageIndex);
} }
function NzPaginationComponent_ng_container_0_ul_2_Template(rf, ctx) { if (rf & 1) {
    var _r2654 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "ul", 4);
    ɵɵlistener("pageIndexChange", function NzPaginationComponent_ng_container_0_ul_2_Template_ul_pageIndexChange_0_listener($event) { ɵɵrestoreView(_r2654); var ctx_r2653 = ɵɵnextContext(2); return ctx_r2653.onPageIndexChange($event); })("pageSizeChange", function NzPaginationComponent_ng_container_0_ul_2_Template_ul_pageSizeChange_0_listener($event) { ɵɵrestoreView(_r2654); var ctx_r2655 = ɵɵnextContext(2); return ctx_r2655.onPageSizeChange($event); });
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r2650 = ɵɵnextContext(2);
    ɵɵclassProp("ant-table-pagination", ctx_r2650.nzInsideTable);
    ɵɵproperty("nzSize", ctx_r2650.nzSize)("itemRender", ctx_r2650.nzItemRender)("showTotal", ctx_r2650.nzShowTotal)("disabled", ctx_r2650.nzDisabled)("locale", ctx_r2650.locale)("showSizeChanger", ctx_r2650.nzShowSizeChanger)("showQuickJumper", ctx_r2650.nzShowQuickJumper)("total", ctx_r2650.nzTotal)("pageIndex", ctx_r2650.nzPageIndex)("pageSize", ctx_r2650.nzPageSize)("pageSizeOptions", ctx_r2650.nzPageSizeOptions);
} }
function NzPaginationComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementContainerStart(0);
    ɵɵtemplate(1, NzPaginationComponent_ng_container_0_ul_1_Template, 1, 8, "ul", 1);
    ɵɵtemplate(2, NzPaginationComponent_ng_container_0_ul_2_Template, 1, 13, "ul", 2);
    ɵɵelementContainerEnd();
} if (rf & 2) {
    var ctx_r2648 = ɵɵnextContext();
    ɵɵadvance(1);
    ɵɵproperty("ngIf", ctx_r2648.nzSimple);
    ɵɵadvance(1);
    ɵɵproperty("ngIf", !ctx_r2648.nzSimple);
} }
var NzPaginationComponent = /** @class */ (function () {
    function NzPaginationComponent(i18n, cdr) {
        this.i18n = i18n;
        this.cdr = cdr;
        this.nzPageSizeChange = new EventEmitter();
        this.nzPageIndexChange = new EventEmitter();
        this.nzShowTotal = null;
        this.nzSize = 'default';
        this.nzPageSizeOptions = [10, 20, 30, 40];
        this.nzDisabled = false;
        this.nzInsideTable = false;
        this.nzShowSizeChanger = false;
        this.nzHideOnSinglePage = false;
        this.nzShowQuickJumper = false;
        this.nzSimple = false;
        this.nzTotal = 0;
        this.nzPageIndex = 1;
        this.nzPageSize = 10;
        this.showPagination = true;
        this.locale = {};
        this.destroy$ = new Subject();
        this.total$ = new ReplaySubject(1);
    }
    NzPaginationComponent.prototype.validatePageIndex = function (value, lastIndex) {
        if (value > lastIndex) {
            return lastIndex;
        }
        else if (value < 1) {
            return 1;
        }
        else {
            return value;
        }
    };
    NzPaginationComponent.prototype.onPageIndexChange = function (index) {
        var lastIndex = this.getLastIndex(this.nzTotal, this.nzPageSize);
        var validIndex = this.validatePageIndex(index, lastIndex);
        if (validIndex !== this.nzPageIndex && !this.nzDisabled) {
            this.nzPageIndex = validIndex;
            this.nzPageIndexChange.emit(this.nzPageIndex);
        }
    };
    NzPaginationComponent.prototype.onPageSizeChange = function (size) {
        this.nzPageSize = size;
        this.nzPageSizeChange.emit(size);
        var lastIndex = this.getLastIndex(this.nzTotal, this.nzPageSize);
        if (this.nzPageIndex > lastIndex) {
            this.onPageIndexChange(lastIndex);
        }
    };
    NzPaginationComponent.prototype.onTotalChange = function (total) {
        var _this = this;
        var lastIndex = this.getLastIndex(total, this.nzPageSize);
        if (this.nzPageIndex > lastIndex) {
            Promise.resolve().then(function () { return _this.onPageIndexChange(lastIndex); });
        }
    };
    NzPaginationComponent.prototype.getLastIndex = function (total, pageSize) {
        return Math.ceil(total / pageSize);
    };
    NzPaginationComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.i18n.localeChange.pipe(takeUntil(this.destroy$)).subscribe(function () {
            _this.locale = _this.i18n.getLocaleData('Pagination');
            _this.cdr.markForCheck();
        });
        this.total$.pipe(takeUntil(this.destroy$)).subscribe(function (total) {
            _this.onTotalChange(total);
        });
    };
    NzPaginationComponent.prototype.ngOnDestroy = function () {
        this.destroy$.next();
        this.destroy$.complete();
    };
    NzPaginationComponent.prototype.ngOnChanges = function (changes) {
        var nzHideOnSinglePage = changes.nzHideOnSinglePage, nzTotal = changes.nzTotal, nzPageSize = changes.nzPageSize;
        if (nzTotal) {
            this.total$.next(this.nzTotal);
        }
        if (nzHideOnSinglePage || nzTotal || nzPageSize) {
            this.showPagination = (this.nzHideOnSinglePage && this.nzTotal > this.nzPageSize) || (this.nzTotal > 0 && !this.nzHideOnSinglePage);
        }
    };
    /** @nocollapse */ NzPaginationComponent.ɵfac = function NzPaginationComponent_Factory(t) { return new (t || NzPaginationComponent)(ɵɵdirectiveInject(NzI18nService), ɵɵdirectiveInject(ChangeDetectorRef)); };
    /** @nocollapse */ NzPaginationComponent.ɵcmp = ɵɵdefineComponent({ type: NzPaginationComponent, selectors: [["nz-pagination"]], inputs: { nzShowTotal: "nzShowTotal", nzSize: "nzSize", nzPageSizeOptions: "nzPageSizeOptions", nzItemRender: "nzItemRender", nzDisabled: "nzDisabled", nzInsideTable: "nzInsideTable", nzShowSizeChanger: "nzShowSizeChanger", nzHideOnSinglePage: "nzHideOnSinglePage", nzShowQuickJumper: "nzShowQuickJumper", nzSimple: "nzSimple", nzTotal: "nzTotal", nzPageIndex: "nzPageIndex", nzPageSize: "nzPageSize" }, outputs: { nzPageSizeChange: "nzPageSizeChange", nzPageIndexChange: "nzPageIndexChange" }, exportAs: ["nzPagination"], features: [ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[4, "ngIf"], ["nz-pagination-simple", "", 3, "ant-table-pagination", "disabled", "itemRender", "locale", "pageSize", "total", "pageIndex", "pageIndexChange", 4, "ngIf"], ["nz-pagination-default", "", 3, "ant-table-pagination", "nzSize", "itemRender", "showTotal", "disabled", "locale", "showSizeChanger", "showQuickJumper", "total", "pageIndex", "pageSize", "pageSizeOptions", "pageIndexChange", "pageSizeChange", 4, "ngIf"], ["nz-pagination-simple", "", 3, "disabled", "itemRender", "locale", "pageSize", "total", "pageIndex", "pageIndexChange"], ["nz-pagination-default", "", 3, "nzSize", "itemRender", "showTotal", "disabled", "locale", "showSizeChanger", "showQuickJumper", "total", "pageIndex", "pageSize", "pageSizeOptions", "pageIndexChange", "pageSizeChange"]], template: function NzPaginationComponent_Template(rf, ctx) { if (rf & 1) {
            ɵɵtemplate(0, NzPaginationComponent_ng_container_0_Template, 3, 2, "ng-container", 0);
        } if (rf & 2) {
            ɵɵproperty("ngIf", ctx.showPagination);
        } }, directives: [NgIf, NzPaginationSimpleComponent, NzPaginationDefaultComponent], encapsulation: 2, changeDetection: 0 });
    __decorate([
        InputBoolean(),
        __metadata("design:type", Object)
    ], NzPaginationComponent.prototype, "nzDisabled", void 0);
    __decorate([
        InputBoolean(),
        __metadata("design:type", Object)
    ], NzPaginationComponent.prototype, "nzInsideTable", void 0);
    __decorate([
        InputBoolean(),
        __metadata("design:type", Object)
    ], NzPaginationComponent.prototype, "nzShowSizeChanger", void 0);
    __decorate([
        InputBoolean(),
        __metadata("design:type", Object)
    ], NzPaginationComponent.prototype, "nzHideOnSinglePage", void 0);
    __decorate([
        InputBoolean(),
        __metadata("design:type", Object)
    ], NzPaginationComponent.prototype, "nzShowQuickJumper", void 0);
    __decorate([
        InputBoolean(),
        __metadata("design:type", Object)
    ], NzPaginationComponent.prototype, "nzSimple", void 0);
    __decorate([
        InputNumber(),
        __metadata("design:type", Object)
    ], NzPaginationComponent.prototype, "nzTotal", void 0);
    __decorate([
        InputNumber(),
        __metadata("design:type", Object)
    ], NzPaginationComponent.prototype, "nzPageIndex", void 0);
    __decorate([
        InputNumber(),
        __metadata("design:type", Object)
    ], NzPaginationComponent.prototype, "nzPageSize", void 0);
    return NzPaginationComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzPaginationComponent, [{
        type: Component,
        args: [{
                selector: 'nz-pagination',
                exportAs: 'nzPagination',
                preserveWhitespaces: false,
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                template: "\n    <ng-container *ngIf=\"showPagination\">\n      <ul\n        *ngIf=\"nzSimple\"\n        nz-pagination-simple\n        [class.ant-table-pagination]=\"nzInsideTable\"\n        [disabled]=\"nzDisabled\"\n        [itemRender]=\"nzItemRender\"\n        [locale]=\"locale\"\n        [pageSize]=\"nzPageSize\"\n        [total]=\"nzTotal\"\n        [pageIndex]=\"nzPageIndex\"\n        (pageIndexChange)=\"onPageIndexChange($event)\"\n      ></ul>\n      <ul\n        *ngIf=\"!nzSimple\"\n        nz-pagination-default\n        [class.ant-table-pagination]=\"nzInsideTable\"\n        [nzSize]=\"nzSize\"\n        [itemRender]=\"nzItemRender\"\n        [showTotal]=\"nzShowTotal\"\n        [disabled]=\"nzDisabled\"\n        [locale]=\"locale\"\n        [showSizeChanger]=\"nzShowSizeChanger\"\n        [showQuickJumper]=\"nzShowQuickJumper\"\n        [total]=\"nzTotal\"\n        [pageIndex]=\"nzPageIndex\"\n        [pageSize]=\"nzPageSize\"\n        [pageSizeOptions]=\"nzPageSizeOptions\"\n        (pageIndexChange)=\"onPageIndexChange($event)\"\n        (pageSizeChange)=\"onPageSizeChange($event)\"\n      ></ul>\n    </ng-container>\n  "
            }]
    }], function () { return [{ type: NzI18nService }, { type: ChangeDetectorRef }]; }, { nzPageSizeChange: [{
            type: Output
        }], nzPageIndexChange: [{
            type: Output
        }], nzShowTotal: [{
            type: Input
        }], nzSize: [{
            type: Input
        }], nzPageSizeOptions: [{
            type: Input
        }], nzItemRender: [{
            type: Input
        }], nzDisabled: [{
            type: Input
        }], nzInsideTable: [{
            type: Input
        }], nzShowSizeChanger: [{
            type: Input
        }], nzHideOnSinglePage: [{
            type: Input
        }], nzShowQuickJumper: [{
            type: Input
        }], nzSimple: [{
            type: Input
        }], nzTotal: [{
            type: Input
        }], nzPageIndex: [{
            type: Input
        }], nzPageSize: [{
            type: Input
        }] }); })();

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
var NzPaginationModule = /** @class */ (function () {
    function NzPaginationModule() {
    }
    /** @nocollapse */ NzPaginationModule.ɵmod = ɵɵdefineNgModule({ type: NzPaginationModule });
    /** @nocollapse */ NzPaginationModule.ɵinj = ɵɵdefineInjector({ factory: function NzPaginationModule_Factory(t) { return new (t || NzPaginationModule)(); }, imports: [[CommonModule, FormsModule, NzSelectModule, NzI18nModule, NzIconModule]] });
    return NzPaginationModule;
}());
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(NzPaginationModule, { declarations: [NzPaginationComponent,
        NzPaginationSimpleComponent,
        NzPaginationOptionsComponent,
        NzPaginationItemComponent,
        NzPaginationDefaultComponent], imports: [CommonModule, FormsModule, NzSelectModule, NzI18nModule, NzIconModule], exports: [NzPaginationComponent] }); })();
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzPaginationModule, [{
        type: NgModule,
        args: [{
                declarations: [
                    NzPaginationComponent,
                    NzPaginationSimpleComponent,
                    NzPaginationOptionsComponent,
                    NzPaginationItemComponent,
                    NzPaginationDefaultComponent
                ],
                exports: [NzPaginationComponent],
                imports: [CommonModule, FormsModule, NzSelectModule, NzI18nModule, NzIconModule]
            }]
    }], null, null); })();

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */

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

export { NzPaginationComponent, NzPaginationDefaultComponent, NzPaginationItemComponent, NzPaginationModule, NzPaginationOptionsComponent, NzPaginationSimpleComponent };
//# sourceMappingURL=ng-zorro-antd-pagination.js.map
