var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Component, Host, h, Element, Prop } from '@stencil/core';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer } from 'vega-slimmer/core';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../../helpers/slimmers/component-usage-runtime-metrics';
import { sanitizeVegaComponent } from '../../../utils/component';
import { PageSelectorMobileRenderer } from './slimmers/renderers/page-selector-mobile-renderer';
import { PrevAndNextButtonRenderer } from './slimmers/renderers/prev-and-next-button-renderer';
import { VegaChange } from '../../../helpers/event-manager/event-id/vega-event-id';
import { ChildNodesEventPreventSlimmer } from '../../../helpers/event-manager/slimmers/child-nodes-event-prevent-slimmer';
/**
 * @vegaVersion 2.42.0
 */
export class VegaPaginationPageSelectorMobile {
  constructor() {
    this.globalSlimmers = {};
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.childEventPrevent = new ChildNodesEventPreventSlimmer([VegaChange], () => this.host);
    this.pageSelectorMobileRenderer = new PageSelectorMobileRenderer();
    this.prevAndNextButtonRenderer = new PrevAndNextButtonRenderer();
    /**
     * Total number of pages.
     *
     * @vegaVersion 2.42.0
     */
    this.pageCount = 0;
    /**
     * Specifies the current page number
     *
     * @vegaVersion 2.42.0
     */
    /* eslint-disable-next-line @stencil/strict-mutable */
    this.current = 1;
    /**
     * Specifies the total number of data items
     *
     * @vegaVersion 2.42.0
     */
    this.total = 0;
  }
  render() {
    return sanitizeVegaComponent(h(Host, null, this.pageSelectorMobileRenderer.render()), this.host);
  }
  static get is() { return "vega-pagination-page-selector-mobile"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-pagination-page-selector-mobile.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-pagination-page-selector-mobile.css"]
  }; }
  static get properties() { return {
    "type": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "'pageSelectorMobile' | 'pageSelectorMobile_goTo'",
        "resolved": "\"pageSelectorMobile\" | \"pageSelectorMobile_goTo\"",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.42.0"
          }],
        "text": "Specifies the type of the pagination elements."
      },
      "attribute": "type",
      "reflect": false
    },
    "pageCount": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "number",
        "resolved": "number",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.42.0"
          }],
        "text": "Total number of pages."
      },
      "attribute": "page-count",
      "reflect": false,
      "defaultValue": "0"
    },
    "current": {
      "type": "number",
      "mutable": true,
      "complexType": {
        "original": "number",
        "resolved": "number",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.42.0"
          }],
        "text": "Specifies the current page number"
      },
      "attribute": "current",
      "reflect": true,
      "defaultValue": "1"
    },
    "total": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "number",
        "resolved": "number",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.42.0"
          }],
        "text": "Specifies the total number of data items"
      },
      "attribute": "total",
      "reflect": false,
      "defaultValue": "0"
    }
  }; }
  static get elementRef() { return "host"; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaPaginationPageSelectorMobile.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaPaginationPageSelectorMobile.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaPaginationPageSelectorMobile.prototype, "childEventPrevent", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaPaginationPageSelectorMobile.prototype, "pageSelectorMobileRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaPaginationPageSelectorMobile.prototype, "prevAndNextButtonRenderer", void 0);
