import { AXEvent, MXInteractiveComponent, AXComponent, MXValueComponent, AXPagedComponent } from '@acorex/cdk/common';
import { AXUnsubscriber, AXHtmlUtil } from '@acorex/core/utils';
import * as i0 from '@angular/core';
import { Injectable, inject, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, afterNextRender, signal, EventEmitter, forwardRef, HostBinding, Output, NgModule } from '@angular/core';
import { AXDecoratorGenericComponent, AXDecoratorIconComponent, AXDecoratorModule } from '@acorex/components/decorators';
import { AXTranslationService, AXTranslatorPipe, AXTranslationModule } from '@acorex/core/translation';
import { AsyncPipe, NgClass, CommonModule } from '@angular/common';
import { AXNumberBoxComponent, AXNumberBoxModule } from '@acorex/components/number-box';
import * as i1 from '@angular/forms';
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
import { AXButtonComponent, AXButtonItemListComponent, AXButtonItemComponent, AXButtonModule } from '@acorex/components/button';
import { AXDropdownPanelComponent, AXDropdownModule } from '@acorex/components/dropdown';
import { isNumber, isEqual, cloneDeep } from 'lodash-es';
import { AXButtonGroupModule } from '@acorex/components/button-group';
import { AXSkeletonModule } from '@acorex/components/skeleton';

class AXDataPagerChangedEvent extends AXEvent {
    constructor() {
        super(...arguments);
        this.range = { from: 0, to: 0 };
        this.page = 0;
        this.skip = 0;
        this.take = 0;
        this.totalPages = 0;
        this.totalItems = 0;
    }
}
class AXDataPagerParentComponent {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerParentComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerParentComponent }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerParentComponent, decorators: [{
            type: Injectable
        }] });
class AXDataPagerChild extends MXInteractiveComponent {
    /**
     *  @ignore
     */
    constructor() {
        super();
        this._parent = inject(AXDataPagerParentComponent);
        this._unsubscriber = inject(AXUnsubscriber);
        //
        this._parent.onChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe(async (c) => {
            await this.applyParent();
        });
        //
        this._parent.onOptionChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe(async (c) => {
            await this.applyParent();
        });
    }
    /**
     *  @ignore
     */
    async ngAfterViewInit() {
        await this.applyParent();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerChild, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerChild }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerChild, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

/**
 * Displays formatted and translated information text for a data pager component.
 *
 * @category Components
 */
class AXDataPagerInfoComponent extends AXDataPagerChild {
    constructor() {
        super(...arguments);
        this.translateService = inject(AXTranslationService);
    }
    /**
     *  @ignore
     */
    async applyParent() {
        const info = this._parent.displayInfo;
        if ([info.range, info.range.from, info.totalItems].every((c) => c != undefined)) {
            this._textFormatted = (await this.translateService.translateAsync(this.text ?? '@acorex:datapager.info.text'))
                .replace('[from]', info.range.from.toLocaleString())
                .replace('[to]', info.range.to.toLocaleString())
                .replace('[totalItems]', info.totalItems.toLocaleString())
                .replace('[page]', info.page.toLocaleString())
                .replace('[totalPages]', info.totalPages.toLocaleString());
            this.cdr.markForCheck();
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerInfoComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AXDataPagerInfoComponent, isStandalone: true, selector: "ax-data-pager-info", inputs: { text: "text" }, providers: [
            { provide: AXDataPagerChild, useExisting: AXDataPagerInfoComponent },
            AXUnsubscriber,
            { provide: AXComponent, useExisting: AXDataPagerInfoComponent },
        ], usesInheritance: true, ngImport: i0, template: `<ax-text> {{ _textFormatted | translate | async }}</ax-text>`, isInline: true, dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerInfoComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'ax-data-pager-info',
                    template: `<ax-text> {{ _textFormatted | translate | async }}</ax-text>`,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        { provide: AXDataPagerChild, useExisting: AXDataPagerInfoComponent },
                        AXUnsubscriber,
                        { provide: AXComponent, useExisting: AXDataPagerInfoComponent },
                    ],
                    imports: [AXDecoratorGenericComponent, AsyncPipe, AXTranslatorPipe],
                }]
        }], propDecorators: { text: [{
                type: Input
            }] } });

/**
 * Provides an input selector for navigating pages in a data pager component.
 *
 * @category Components
 */
class AXDataPagerInputSelectorComponent extends AXDataPagerChild {
    constructor() {
        super(...arguments);
        /**
         *  @ignore
         */
        this._totalPages = 1;
        /**
         *  @ignore
         */
        this._currentPage = 1;
    }
    /**
     *  @ignore
     */
    async applyParent() {
        this._currentPage = this._parent.displayInfo.page;
        this._totalPages = this._parent.displayInfo.totalPages;
        this.cdr.markForCheck();
    }
    /**
     *  @ignore
     */
    _handleValueChanged(e) {
        //TODO: debounceTime
        if (e.isUserInteraction) {
            this._parent.goToPage(e.value);
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerInputSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AXDataPagerInputSelectorComponent, isStandalone: true, selector: "ax-data-pager-input-selector", providers: [
            {
                provide: AXDataPagerChild,
                useExisting: AXDataPagerInputSelectorComponent,
            },
            AXUnsubscriber,
            { provide: AXComponent, useExisting: AXDataPagerInputSelectorComponent },
        ], usesInheritance: true, ngImport: i0, template: `
    <ax-number-box
      class="ax-sm"
      [disabled]="_parent.disabled"
      [readonly]="_parent.readonly"
      [ngModel]="_currentPage"
      (onValueChanged)="_handleValueChanged($event)"
      [showSpinButtons]="false"
      [minValue]="1"
      [maxValue]="_totalPages"
    >
    </ax-number-box>
  `, isInline: true, dependencies: [{ kind: "component", type: AXNumberBoxComponent, selector: "ax-number-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "minValue", "maxValue", "showSpinButtons", "thousandsSeparator", "decimals", "changeOnScroll", "step"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "thousandsSeparatorChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerInputSelectorComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'ax-data-pager-input-selector',
                    template: `
    <ax-number-box
      class="ax-sm"
      [disabled]="_parent.disabled"
      [readonly]="_parent.readonly"
      [ngModel]="_currentPage"
      (onValueChanged)="_handleValueChanged($event)"
      [showSpinButtons]="false"
      [minValue]="1"
      [maxValue]="_totalPages"
    >
    </ax-number-box>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    imports: [AXNumberBoxComponent, FormsModule],
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        {
                            provide: AXDataPagerChild,
                            useExisting: AXDataPagerInputSelectorComponent,
                        },
                        AXUnsubscriber,
                        { provide: AXComponent, useExisting: AXDataPagerInputSelectorComponent },
                    ],
                }]
        }] });

/**
 * Provides buttons for navigating to the next and last pages in a data pager component.
 *
 * @category Components
 */
class AXDataPagerNextButtonsComponent extends AXDataPagerChild {
    /**
     *  @ignore
     */
    ngOnInit() {
        super.ngOnInit;
        this.rtl = AXHtmlUtil.isRtl(this.getHostElement());
    }
    /**
     *  @ignore
     */
    async applyParent() {
        this.disabled = this._parent.displayInfo.page == this._parent.displayInfo.totalPages || this._parent.disabled;
    }
    /**
     *  @ignore
     */
    _emitOnLastPageClick(e) {
        if (this._parent.readonly || this._parent.disabled)
            return;
        this._parent.goLastPage();
    }
    /**
     *  @ignore
     */
    _emitOnNextPageClick(e) {
        if (this._parent.readonly || this._parent.disabled)
            return;
        this._parent.goNextPage();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerNextButtonsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AXDataPagerNextButtonsComponent, isStandalone: true, selector: "ax-data-pager-next-buttons", providers: [
            { provide: AXDataPagerChild, useExisting: AXDataPagerNextButtonsComponent },
            AXUnsubscriber,
            { provide: AXComponent, useExisting: AXDataPagerNextButtonsComponent },
        ], usesInheritance: true, ngImport: i0, template: `
    <ax-button
      [disabled]="disabled"
      look="blank"
      class="ax-sm"
      title="Go to the next page"
      (onClick)="_emitOnNextPageClick($event)"
    >
      <ax-icon
        class="ax-icon ax-text-xl"
        [ngClass]="{
          'ax-icon-chevron-left': rtl,
          'ax-icon-chevron-right': !rtl,
        }"
      ></ax-icon>
    </ax-button>
    <ax-button
      [disabled]="disabled"
      look="blank"
      class="ax-sm"
      title="Go to the last page"
      (onClick)="_emitOnLastPageClick($event)"
    >
      <ax-icon
        class="ax-icon ax-text-xl"
        [ngClass]="{ 'ax-icon-chevron-double-left': rtl, 'ax-icon-chevron-double-right': !rtl }"
      ></ax-icon>
    </ax-button>
  `, isInline: true, dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerNextButtonsComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'ax-data-pager-next-buttons',
                    template: `
    <ax-button
      [disabled]="disabled"
      look="blank"
      class="ax-sm"
      title="Go to the next page"
      (onClick)="_emitOnNextPageClick($event)"
    >
      <ax-icon
        class="ax-icon ax-text-xl"
        [ngClass]="{
          'ax-icon-chevron-left': rtl,
          'ax-icon-chevron-right': !rtl,
        }"
      ></ax-icon>
    </ax-button>
    <ax-button
      [disabled]="disabled"
      look="blank"
      class="ax-sm"
      title="Go to the last page"
      (onClick)="_emitOnLastPageClick($event)"
    >
      <ax-icon
        class="ax-icon ax-text-xl"
        [ngClass]="{ 'ax-icon-chevron-double-left': rtl, 'ax-icon-chevron-double-right': !rtl }"
      ></ax-icon>
    </ax-button>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        { provide: AXDataPagerChild, useExisting: AXDataPagerNextButtonsComponent },
                        AXUnsubscriber,
                        { provide: AXComponent, useExisting: AXDataPagerNextButtonsComponent },
                    ],
                    imports: [AXButtonComponent, AXDecoratorIconComponent, NgClass],
                }]
        }] });

/**
 * Component that provides numeric page selection controls for a data pager.
 *
 * @category Components
 */
class AXDataPagerNumericSelectorComponent extends AXDataPagerChild {
    /**
     *  @ignore
     */
    constructor() {
        super();
        this._items = [];
        this._currentPage = 1;
        this._lastPage = 1;
        this._loading = false;
        /**
         *  @ignore
         */
        this._displayCount = 5;
        afterNextRender(() => {
            this.rtl = AXHtmlUtil.isRtl(this.getHostElement());
            this.cdr.detectChanges();
        });
    }
    /**
     *  @ignore
     */
    async applyParent() {
        this._currentPage = this._parent.displayInfo.page;
        this._loading = this._parent.isLoading;
        this._lastPage = this._parent.displayInfo.totalPages;
        //
        this._items = [];
        // Calculate the range to center the current page
        const halfDisplayCount = Math.floor(this._displayCount / 2);
        let start = Math.max(1, this._currentPage - halfDisplayCount);
        const end = Math.min(this._lastPage, start + this._displayCount - 1);
        // Adjust start if we're near the end to ensure we show the full display count
        if (end - start + 1 < this._displayCount) {
            start = Math.max(1, end - this._displayCount + 1);
        }
        // Add ellipsis button for previous pages if needed
        if (start > 1) {
            this._items.push({
                iconClass: this.rtl ? 'ax-icon-chevron-right' : 'ax-icon-chevron-left',
                data: start - 1,
            });
        }
        // Add page number buttons
        for (let i = start; i <= end; i++) {
            this._items.push({
                text: i.toLocaleString(),
                data: i,
            });
        }
        // Add ellipsis button for next pages if needed
        if (end < this._lastPage) {
            this._items.push({
                iconClass: this.rtl ? 'ax-icon-chevron-left' : 'ax-icon-chevron-right',
                data: end + 1,
            });
        }
        this.cdr.detectChanges();
    }
    /**
     *  @ignore
     */
    _handleOnItemClick(e) {
        if (this._parent.readonly || this._parent.disabled)
            return;
        if (e.iconClass === 'ax-icon-chevron-right') {
            this._parent.goNextPage();
        }
        else if (e.iconClass === 'ax-icon-chevron-left') {
            this._parent.goPrevPage();
        }
        else {
            this._parent.goToPage(Number(e.data));
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerNumericSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXDataPagerNumericSelectorComponent, isStandalone: true, selector: "ax-data-pager-numeric-selector", providers: [
            {
                provide: AXDataPagerChild,
                useExisting: AXDataPagerNumericSelectorComponent,
            },
            AXUnsubscriber,
            { provide: AXComponent, useExisting: AXDataPagerNumericSelectorComponent },
        ], usesInheritance: true, ngImport: i0, template: `
    <ax-button
      class="ax-sm"
      [disabled]="_currentPage === 1 || _parent.disabled || _parent.isLoading"
      look="blank"
      (onClick)="_handleOnItemClick({ data: 1 })"
    >
      <ax-icon
        class="ax-icon"
        [ngClass]="{
          'ax-icon-chevron-double-left': !rtl,
          'ax-icon-chevron-double-right': rtl,
        }"
      ></ax-icon>
    </ax-button>

    @for (item of _items; track $index) {
      <ax-button
        class="ax-data-pager-num-button"
        [disabled]="_parent.disabled || _parent.isLoading"
        [color]="_currentPage === item.data ? 'primary' : 'default'"
        [look]="_currentPage === item.data ? 'solid' : 'blank'"
        [text]="item.text"
        (onClick)="_handleOnItemClick(item)"
      >
        @if (item.iconClass) {
          <ax-icon class="ax-icon" [ngClass]="item.iconClass"></ax-icon>
        }
      </ax-button>
    }

    <ax-button
      class="ax-sm"
      [disabled]="_currentPage === _lastPage || _parent.disabled || _parent.isLoading"
      look="blank"
      (onClick)="_handleOnItemClick({ data: _lastPage })"
    >
      <ax-icon
        class="ax-icon"
        [ngClass]="{
          'ax-icon-chevron-double-left': rtl,
          'ax-icon-chevron-double-right': !rtl,
        }"
      ></ax-icon>
    </ax-button>
  `, isInline: true, dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerNumericSelectorComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'ax-data-pager-numeric-selector',
                    template: `
    <ax-button
      class="ax-sm"
      [disabled]="_currentPage === 1 || _parent.disabled || _parent.isLoading"
      look="blank"
      (onClick)="_handleOnItemClick({ data: 1 })"
    >
      <ax-icon
        class="ax-icon"
        [ngClass]="{
          'ax-icon-chevron-double-left': !rtl,
          'ax-icon-chevron-double-right': rtl,
        }"
      ></ax-icon>
    </ax-button>

    @for (item of _items; track $index) {
      <ax-button
        class="ax-data-pager-num-button"
        [disabled]="_parent.disabled || _parent.isLoading"
        [color]="_currentPage === item.data ? 'primary' : 'default'"
        [look]="_currentPage === item.data ? 'solid' : 'blank'"
        [text]="item.text"
        (onClick)="_handleOnItemClick(item)"
      >
        @if (item.iconClass) {
          <ax-icon class="ax-icon" [ngClass]="item.iconClass"></ax-icon>
        }
      </ax-button>
    }

    <ax-button
      class="ax-sm"
      [disabled]="_currentPage === _lastPage || _parent.disabled || _parent.isLoading"
      look="blank"
      (onClick)="_handleOnItemClick({ data: _lastPage })"
    >
      <ax-icon
        class="ax-icon"
        [ngClass]="{
          'ax-icon-chevron-double-left': rtl,
          'ax-icon-chevron-double-right': !rtl,
        }"
      ></ax-icon>
    </ax-button>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        {
                            provide: AXDataPagerChild,
                            useExisting: AXDataPagerNumericSelectorComponent,
                        },
                        AXUnsubscriber,
                        { provide: AXComponent, useExisting: AXDataPagerNumericSelectorComponent },
                    ],
                    imports: [AXButtonComponent, AXDecoratorIconComponent, NgClass],
                }]
        }], ctorParameters: () => [] });

/**
 * Displays a button to select page sizes for data pagination.
 *
 * @category Components
 */
class AXDataPagerPageSizesComponent extends AXDataPagerChild {
    constructor() {
        super(...arguments);
        /**
         *  @ignore
         */
        //TODO: AXButtonItems type error
        this._items = [];
    }
    /**
     * Gets the list of page sizes available for selection.
     */
    get sizes() {
        return this._sizes || [5, 10, 20, 50, 100];
    }
    /**
     * Sets the list of page sizes available for selection.
     *
     * @param value - An array of numbers representing the page sizes to be set.
     */
    set sizes(v) {
        this._sizes = v;
        this.applyParent();
    }
    /**
     *  @ignore
     */
    async applyParent() {
        this._size = this._parent.displayInfo.take;
        this._items = this.sizes.map((s) => ({
            text: s.toString(),
            selected: s == this._size,
            data: {
                size: s,
            },
        }));
        this.cdr.detectChanges();
    }
    /**
     *  @ignore
     */
    _emitOnItemClick(e) {
        if (this._parent.readonly || this._parent.disabled)
            return;
        this._size = this._parent.size = Number(e.data.size);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerPageSizesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXDataPagerPageSizesComponent, isStandalone: true, selector: "ax-data-pager-page-sizes", inputs: { sizes: "sizes" }, providers: [
            { provide: AXDataPagerChild, useExisting: AXDataPagerPageSizesComponent },
            AXUnsubscriber,
            { provide: AXComponent, useExisting: AXDataPagerPageSizesComponent },
        ], usesInheritance: true, ngImport: i0, template: `
    <ax-button [text]="_size" [disabled]="_parent.disabled">
      <ax-dropdown-panel>
        <ax-button-item-list (onItemClick)="_emitOnItemClick($event)">
          @for (item of _items; track $index) {
            <ax-button-item color="default" [text]="item.text" [data]="item.data" [selected]="item.selected">
            </ax-button-item>
          }
        </ax-button-item-list>
      </ax-dropdown-panel>
      <ax-suffix>
        <ax-icon icon="ax-icon ax-icon-solid ax-icon-arrow-down"></ax-icon>
      </ax-suffix>
    </ax-button>
    <!-- <span >items per page</span> -->
  `, isInline: true, dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "component", type: AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerPageSizesComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'ax-data-pager-page-sizes',
                    template: `
    <ax-button [text]="_size" [disabled]="_parent.disabled">
      <ax-dropdown-panel>
        <ax-button-item-list (onItemClick)="_emitOnItemClick($event)">
          @for (item of _items; track $index) {
            <ax-button-item color="default" [text]="item.text" [data]="item.data" [selected]="item.selected">
            </ax-button-item>
          }
        </ax-button-item-list>
      </ax-dropdown-panel>
      <ax-suffix>
        <ax-icon icon="ax-icon ax-icon-solid ax-icon-arrow-down"></ax-icon>
      </ax-suffix>
    </ax-button>
    <!-- <span >items per page</span> -->
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    encapsulation: ViewEncapsulation.None,
                    outputs: [],
                    providers: [
                        { provide: AXDataPagerChild, useExisting: AXDataPagerPageSizesComponent },
                        AXUnsubscriber,
                        { provide: AXComponent, useExisting: AXDataPagerPageSizesComponent },
                    ],
                    imports: [
                        AXButtonComponent,
                        AXDropdownPanelComponent,
                        AXButtonItemListComponent,
                        AXButtonItemComponent,
                        AXDecoratorGenericComponent,
                        AXDecoratorIconComponent,
                    ],
                }]
        }], propDecorators: { sizes: [{
                type: Input
            }] } });

/**
 * Component that provides navigation buttons for going to the previous page and the first page in a data pager.
 *
 * @category Components
 */
class AXDataPagerPrevButtonsComponent extends AXDataPagerChild {
    /**
     *  @ignore
     */
    ngOnInit() {
        super.ngOnInit;
        this.rtl = AXHtmlUtil.isRtl(this.getHostElement());
    }
    /**
     *  @ignore
     */
    async applyParent() {
        this.disabled = this._parent.displayInfo.page == 1 || this._parent.disabled;
    }
    /**
     *  @ignore
     */
    _emitOnFirstPageClick(e) {
        if (this._parent.readonly || this._parent.disabled)
            return;
        this._parent.goFirstPage();
    }
    /**
     *  @ignore
     */
    _emitOnPrevPageClick(e) {
        if (this._parent.readonly || this._parent.disabled)
            return;
        this._parent.goPrevPage();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerPrevButtonsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AXDataPagerPrevButtonsComponent, isStandalone: true, selector: "ax-data-pager-prev-buttons", providers: [
            { provide: AXDataPagerChild, useExisting: AXDataPagerPrevButtonsComponent },
            AXUnsubscriber,
            { provide: AXComponent, useExisting: AXDataPagerPrevButtonsComponent },
        ], usesInheritance: true, ngImport: i0, template: `
    <ax-button
      [disabled]="disabled"
      look="blank"
      class="ax-sm"
      title="Go to the last page"
      (onClick)="_emitOnFirstPageClick($event)"
    >
      <ax-icon
        class="ax-icon ax-text-xl"
        [ngClass]="{ 'ax-icon-chevron-double-right': rtl, 'ax-icon-chevron-double-left': !rtl }"
      ></ax-icon>
    </ax-button>
    <ax-button
      [disabled]="disabled"
      look="blank"
      class="ax-sm"
      title="Go to the next page"
      (onClick)="_emitOnPrevPageClick($event)"
    >
      <ax-icon
        class="ax-icon ax-text-xl"
        [ngClass]="{
          'ax-icon-chevron-left': !rtl,
          'ax-icon-chevron-right': rtl,
        }"
      ></ax-icon>
    </ax-button>
  `, isInline: true, dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerPrevButtonsComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'ax-data-pager-prev-buttons',
                    template: `
    <ax-button
      [disabled]="disabled"
      look="blank"
      class="ax-sm"
      title="Go to the last page"
      (onClick)="_emitOnFirstPageClick($event)"
    >
      <ax-icon
        class="ax-icon ax-text-xl"
        [ngClass]="{ 'ax-icon-chevron-double-right': rtl, 'ax-icon-chevron-double-left': !rtl }"
      ></ax-icon>
    </ax-button>
    <ax-button
      [disabled]="disabled"
      look="blank"
      class="ax-sm"
      title="Go to the next page"
      (onClick)="_emitOnPrevPageClick($event)"
    >
      <ax-icon
        class="ax-icon ax-text-xl"
        [ngClass]="{
          'ax-icon-chevron-left': !rtl,
          'ax-icon-chevron-right': rtl,
        }"
      ></ax-icon>
    </ax-button>
  `,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        { provide: AXDataPagerChild, useExisting: AXDataPagerPrevButtonsComponent },
                        AXUnsubscriber,
                        { provide: AXComponent, useExisting: AXDataPagerPrevButtonsComponent },
                    ],
                    imports: [AXButtonComponent, AXDecoratorIconComponent, NgClass],
                }]
        }] });

/**
 * Component for managing and displaying data pagination controls.
 *
 * @category Components
 */
class AXDataPagerComponent extends MXValueComponent {
    /**
     * Indicates whether the component is currently loading.
     *
     */
    get isLoading() {
        return this._isLoading();
    }
    /**
     * Sets the loading state of the component.
     *
     * @param v - The loading state to be set.
     */
    set isLoading(v) {
        this._isLoading.set(v);
    }
    /**
     * Gets the number of items per page in the data pager.
     */
    get size() {
        return this._size || 10;
    }
    /**
     * Sets the number of items per page and updates the data pager accordingly.
     *
     * @param {number} v - The new number of items per page.
     */
    set size(v) {
        if (v != this._size) {
            const prevSize = this._size;
            this._size = v;
            if (this._parent) {
                this._parent.pageSize = v;
            }
            const newPage = Math.ceil(this.displayInfo.range.from / this._size) || 1;
            this.commitValue(newPage);
            this._emitChangedEvent(prevSize != null ? true : false);
        }
    }
    /**
     * Gets the total number of items.
     */
    get total() {
        return this._total;
    }
    /**
     * Sets the total number of items and triggers an update event if the value changes.
     *
     * @param v - The total number of items to set.
     *                     If the value is non-positive, it defaults to 0.
     */
    set total(v) {
        const t = v && v > 0 ? v : 0;
        if (t != this._total) {
            this._total = t;
            this._emitChangedEvent();
        }
    }
    /**
     * Gets the total number of pages.
     */
    get totalPages() {
        return this._totalPages;
    }
    /**
     * Sets the total number of pages.
     *
     * @param value - The total number of pages to set.
     */
    set totalPages(value) {
        this._totalPages = value;
    }
    /**
     * Gets the current display mode of the data pager.
     */
    get displayMode() {
        return this._displayMode;
    }
    /**
     * Sets the display mode of the data pager and emits a change event.
     *
     * @param v - The new display mode to set, of type `AXDataPagerMode`.
     */
    set displayMode(v) {
        this.setOption({
            name: 'displayMode',
            value: v,
            afterCallback: () => {
                this._emitChangedEvent();
            },
        });
    }
    /**
     *  @ignore
     */
    constructor() {
        super();
        this._parent = inject(AXPagedComponent, { optional: true });
        /**
         *  @ignore
         */
        this._isLoading = signal(false, ...(ngDevMode ? [{ debugName: "_isLoading" }] : []));
        /**
         *  @ignore
         */
        this._size = null;
        /**
         *  @ignore
         */
        this._total = 0;
        /**
         *  @ignore
         */
        this._totalPages = 0;
        /**
         * Emitted when the display mode changes.
         * @event
         * An event containing the new display mode.
         */
        this.displayModeChange = new EventEmitter();
        /**
         *  @ignore
         */
        this._displayMode = 'full';
        /**
         * Emitted when the data pager's state changes.
         * @event
         * An event containing details about the change.
         */
        this.onChanged = new EventEmitter();
        //
        if (this._parent) {
            this._parent.onPageChanged.subscribe((c) => {
                this.size = this._parent.pageSize;
                this.total = this._parent.totalCount;
                this.value = c.value;
            });
            this.size = this._parent.pageSize;
            this.total = this._parent.totalCount;
        }
    }
    /**
     *  @ignore
     */
    ngAfterViewInit() {
        this._emitChangedEvent();
    }
    /**
     *  @ignore
     */
    internalValueChanged(value) {
        this._emitChangedEvent(true);
    }
    /**
     *  @ignore
     */
    internalGetValue(value) {
        if (!isNumber(value) || !value || this.totalPages == 0)
            return 1;
        return value > this.totalPages ? this.totalPages : value;
    }
    get displayInfo() {
        const skip = Math.max(0, (this.value - 1) * this.size);
        const result = {
            page: this.value,
            totalItems: this.total,
            totalPages: this.totalPages,
            range: {
                from: skip + 1,
                to: Math.min(this.value * this.size, this.total),
            },
            skip,
            take: this.size,
        };
        return result;
    }
    /**
     *  @ignore
     */
    _emitChangedEvent(u = false) {
        this.totalPages = Math.ceil(this._total / this.size) || 1;
        //
        if (!isEqual(this.previousDisplayInfo, this.displayInfo)) {
            this.onChanged.emit(Object.assign({
                component: this,
                isUserInteraction: u,
                htmlElement: this.getHostElement(),
            }, this.displayInfo));
            if (this.totalPages > 0)
                this._parent?.goToPage(this.value);
            //
            this.previousDisplayInfo = cloneDeep(this.displayInfo);
            //
            this.cdr.markForCheck();
        }
    }
    /**
     * Navigates to the next page, or to the last page if on the final page.
     *
     * @returns void - No return value. The component navigates to the next available page.
     */
    goNextPage() {
        this.goToPage(Math.min(this.value + 1, this.totalPages));
    }
    /**
     * Navigates to the last page.
     *
     * @returns void - No return value. The component navigates to the final page.
     */
    goLastPage() {
        this.goToPage(this.totalPages);
    }
    /**
     * Navigates to the first page.
     *
     * @returns void - No return value. The component navigates to the first page.
     */
    goFirstPage() {
        this.goToPage(1);
    }
    /**
     * Navigates to the previous page, or to the first page if on the initial page.
     *
     * @returns void - No return value. The component navigates to the previous available page.
     */
    goPrevPage() {
        this.goToPage(Math.max(this.value - 1, 1));
    }
    /**
     * Navigates to a specified page.
     *
     * @param page - The page number to navigate to.
     * @returns void - No return value. The component navigates to the specified page.
     */
    goToPage(page) {
        if (page != this.value) {
            this.commitValue(page, true);
        }
    }
    get __hostClass() {
        return `ax-sm`;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXDataPagerComponent, isStandalone: true, selector: "ax-data-pager", inputs: { value: "value", name: "name", disabled: "disabled", readonly: "readonly", isLoading: "isLoading", size: "size", total: "total", displayMode: "displayMode" }, outputs: { valueChange: "valueChange", onValueChanged: "onValueChanged", disabledChange: "disabledChange", readonlyChange: "readonlyChange", displayModeChange: "displayModeChange", onChanged: "onChanged" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
            { provide: AXDataPagerParentComponent, useExisting: AXDataPagerComponent },
            {
                provide: NG_VALUE_ACCESSOR,
                useExisting: forwardRef(() => AXDataPagerComponent),
                multi: true,
            },
            { provide: AXComponent, useExisting: AXDataPagerComponent },
        ], usesInheritance: true, ngImport: i0, template: "@switch (displayMode) {\n  @case ('full') {\n    <ax-prefix class=\"ax-full-prefix\">\n      <ax-data-pager-numeric-selector> </ax-data-pager-numeric-selector>\n      <ax-data-pager-page-sizes> </ax-data-pager-page-sizes>\n    </ax-prefix>\n    <ax-suffix class=\"ax-full-suffix\">\n      <ax-data-pager-info> </ax-data-pager-info>\n    </ax-suffix>\n  }\n  @case ('compact') {\n    <ax-prefix class=\"ax-compact-prefix\">\n      <ax-data-pager-prev-buttons> </ax-data-pager-prev-buttons>\n      <ax-data-pager-input-selector> </ax-data-pager-input-selector>\n      <ax-data-pager-next-buttons> </ax-data-pager-next-buttons>\n    </ax-prefix>\n    <ax-suffix class=\"ax-compact-suffix\">\n      <ax-data-pager-info> </ax-data-pager-info>\n    </ax-suffix>\n  }\n  @default {\n    <ng-content select=\"ax-prefix\"></ng-content>\n    <ng-content select=\"ax-suffix\"></ng-content>\n  }\n}\n", styles: ["html[dir=rtl] ax-data-pager ax-data-pager-numeric-selector .ax-icon-first-page,html[dir=rtl] ax-data-pager ax-data-pager-numeric-selector .ax-icon-last-page{rotate:180deg}ax-data-pager{display:flex;flex-wrap:nowrap;width:100%;align-items:center;justify-content:space-between;gap:.5rem;padding:.5rem 0;font-size:.875rem;line-height:1.25rem;overflow-x:auto}ax-data-pager ax-button-group{display:flex!important;gap:1rem!important;border-radius:0!important;border-width:0px!important}ax-data-pager ax-button-group ax-button-item{border-radius:0!important;border-width:0px!important;padding:0!important}ax-data-pager ax-button-group ax-button-item.ax-state-selected{border-width:1px!important}ax-data-pager ax-data-pager-input-selector .ax-input{width:4rem!important;max-width:10rem!important;text-align:center!important}ax-data-pager ax-data-pager-next-buttons,ax-data-pager ax-data-pager-prev-buttons,ax-data-pager ax-data-pager-numeric-selector{margin-inline-end:.5rem}ax-data-pager ax-data-pager-next-buttons ax-skeleton,ax-data-pager ax-data-pager-prev-buttons ax-skeleton,ax-data-pager ax-data-pager-numeric-selector ax-skeleton{width:7rem;border-radius:var(--ax-sys-border-radius)}ax-data-pager ax-data-pager-next-buttons .ax-data-pager-num-button,ax-data-pager ax-data-pager-prev-buttons .ax-data-pager-num-button,ax-data-pager ax-data-pager-numeric-selector .ax-data-pager-num-button{margin-inline:.2rem}ax-data-pager ax-data-pager-numeric-selector{display:flex;flex-wrap:nowrap}ax-data-pager .ax-full-prefix,ax-data-pager .ax-full-suffix{display:flex}ax-data-pager .ax-compact-prefix{display:flex}ax-data-pager .ax-compact-prefix ax-data-pager-next-buttons,ax-data-pager .ax-compact-prefix ax-data-pager-prev-buttons{display:flex;flex-wrap:nowrap}ax-data-pager ax-data-pager-info ax-text{color:rgb(var(--ax-sys-color-ghost-surface));white-space:nowrap;margin-inline-end:.2rem}\n"], dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDataPagerNumericSelectorComponent, selector: "ax-data-pager-numeric-selector" }, { kind: "component", type: AXDataPagerPageSizesComponent, selector: "ax-data-pager-page-sizes", inputs: ["sizes"] }, { kind: "component", type: AXDataPagerInfoComponent, selector: "ax-data-pager-info", inputs: ["text"] }, { kind: "component", type: AXDataPagerPrevButtonsComponent, selector: "ax-data-pager-prev-buttons" }, { kind: "component", type: AXDataPagerInputSelectorComponent, selector: "ax-data-pager-input-selector" }, { kind: "component", type: AXDataPagerNextButtonsComponent, selector: "ax-data-pager-next-buttons" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-data-pager', inputs: ['value', 'name', 'disabled', 'readonly'], outputs: ['valueChange', 'onValueChanged', 'disabledChange', 'readonlyChange'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
                        { provide: AXDataPagerParentComponent, useExisting: AXDataPagerComponent },
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef(() => AXDataPagerComponent),
                            multi: true,
                        },
                        { provide: AXComponent, useExisting: AXDataPagerComponent },
                    ], imports: [
                        AXDecoratorGenericComponent,
                        AXDataPagerNumericSelectorComponent,
                        AXDataPagerPageSizesComponent,
                        AXDataPagerInfoComponent,
                        AXDataPagerPrevButtonsComponent,
                        AXDataPagerInputSelectorComponent,
                        AXDataPagerNextButtonsComponent,
                    ], template: "@switch (displayMode) {\n  @case ('full') {\n    <ax-prefix class=\"ax-full-prefix\">\n      <ax-data-pager-numeric-selector> </ax-data-pager-numeric-selector>\n      <ax-data-pager-page-sizes> </ax-data-pager-page-sizes>\n    </ax-prefix>\n    <ax-suffix class=\"ax-full-suffix\">\n      <ax-data-pager-info> </ax-data-pager-info>\n    </ax-suffix>\n  }\n  @case ('compact') {\n    <ax-prefix class=\"ax-compact-prefix\">\n      <ax-data-pager-prev-buttons> </ax-data-pager-prev-buttons>\n      <ax-data-pager-input-selector> </ax-data-pager-input-selector>\n      <ax-data-pager-next-buttons> </ax-data-pager-next-buttons>\n    </ax-prefix>\n    <ax-suffix class=\"ax-compact-suffix\">\n      <ax-data-pager-info> </ax-data-pager-info>\n    </ax-suffix>\n  }\n  @default {\n    <ng-content select=\"ax-prefix\"></ng-content>\n    <ng-content select=\"ax-suffix\"></ng-content>\n  }\n}\n", styles: ["html[dir=rtl] ax-data-pager ax-data-pager-numeric-selector .ax-icon-first-page,html[dir=rtl] ax-data-pager ax-data-pager-numeric-selector .ax-icon-last-page{rotate:180deg}ax-data-pager{display:flex;flex-wrap:nowrap;width:100%;align-items:center;justify-content:space-between;gap:.5rem;padding:.5rem 0;font-size:.875rem;line-height:1.25rem;overflow-x:auto}ax-data-pager ax-button-group{display:flex!important;gap:1rem!important;border-radius:0!important;border-width:0px!important}ax-data-pager ax-button-group ax-button-item{border-radius:0!important;border-width:0px!important;padding:0!important}ax-data-pager ax-button-group ax-button-item.ax-state-selected{border-width:1px!important}ax-data-pager ax-data-pager-input-selector .ax-input{width:4rem!important;max-width:10rem!important;text-align:center!important}ax-data-pager ax-data-pager-next-buttons,ax-data-pager ax-data-pager-prev-buttons,ax-data-pager ax-data-pager-numeric-selector{margin-inline-end:.5rem}ax-data-pager ax-data-pager-next-buttons ax-skeleton,ax-data-pager ax-data-pager-prev-buttons ax-skeleton,ax-data-pager ax-data-pager-numeric-selector ax-skeleton{width:7rem;border-radius:var(--ax-sys-border-radius)}ax-data-pager ax-data-pager-next-buttons .ax-data-pager-num-button,ax-data-pager ax-data-pager-prev-buttons .ax-data-pager-num-button,ax-data-pager ax-data-pager-numeric-selector .ax-data-pager-num-button{margin-inline:.2rem}ax-data-pager ax-data-pager-numeric-selector{display:flex;flex-wrap:nowrap}ax-data-pager .ax-full-prefix,ax-data-pager .ax-full-suffix{display:flex}ax-data-pager .ax-compact-prefix{display:flex}ax-data-pager .ax-compact-prefix ax-data-pager-next-buttons,ax-data-pager .ax-compact-prefix ax-data-pager-prev-buttons{display:flex;flex-wrap:nowrap}ax-data-pager ax-data-pager-info ax-text{color:rgb(var(--ax-sys-color-ghost-surface));white-space:nowrap;margin-inline-end:.2rem}\n"] }]
        }], ctorParameters: () => [], propDecorators: { isLoading: [{
                type: Input
            }], size: [{
                type: Input
            }], total: [{
                type: Input
            }], displayModeChange: [{
                type: Output
            }], displayMode: [{
                type: Input
            }], onChanged: [{
                type: Output
            }], __hostClass: [{
                type: HostBinding,
                args: ['class']
            }] } });

const COMPONENT = [
    AXDataPagerComponent,
    AXDataPagerNextButtonsComponent,
    AXDataPagerPrevButtonsComponent,
    AXDataPagerPageSizesComponent,
    AXDataPagerNumericSelectorComponent,
    AXDataPagerInputSelectorComponent,
    AXDataPagerInfoComponent,
];
const MODULES = [
    CommonModule,
    FormsModule,
    AXButtonModule,
    AXButtonGroupModule,
    AXNumberBoxModule,
    AXDropdownModule,
    AXDecoratorModule,
    AXTranslationModule,
    AXSkeletonModule,
];
class AXDataPagerModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerModule, imports: [CommonModule,
            FormsModule,
            AXButtonModule,
            AXButtonGroupModule,
            AXNumberBoxModule,
            AXDropdownModule,
            AXDecoratorModule,
            AXTranslationModule,
            AXSkeletonModule, AXDataPagerComponent,
            AXDataPagerNextButtonsComponent,
            AXDataPagerPrevButtonsComponent,
            AXDataPagerPageSizesComponent,
            AXDataPagerNumericSelectorComponent,
            AXDataPagerInputSelectorComponent,
            AXDataPagerInfoComponent], exports: [AXDataPagerComponent,
            AXDataPagerNextButtonsComponent,
            AXDataPagerPrevButtonsComponent,
            AXDataPagerPageSizesComponent,
            AXDataPagerNumericSelectorComponent,
            AXDataPagerInputSelectorComponent,
            AXDataPagerInfoComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerModule, imports: [MODULES, COMPONENT] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXDataPagerModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [...MODULES, ...COMPONENT],
                    exports: [...COMPONENT],
                    providers: [],
                }]
        }] });

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

export { AXDataPagerChangedEvent, AXDataPagerChild, AXDataPagerComponent, AXDataPagerInfoComponent, AXDataPagerInputSelectorComponent, AXDataPagerModule, AXDataPagerNextButtonsComponent, AXDataPagerNumericSelectorComponent, AXDataPagerPageSizesComponent, AXDataPagerParentComponent, AXDataPagerPrevButtonsComponent };
//# sourceMappingURL=acorex-components-data-pager.mjs.map
