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 { TranslationSlimmer } from '../../../helpers/slimmers/translation';
import { PageSizeSelectorMobileRenderer } from './slimmers/renderers/page-size-selector-mobile-renderer';
import { PageSizeSelectorMobileDropdownRenderer } from './slimmers/renderers/page-size-selector-mobile-dropdown-renderer';
/**
 * @vegaVersion 2.42.0
 */
export class VegaPaginationPageSizeSelectorMobile {
  constructor() {
    this.globalSlimmers = {};
    this.translationSlimmer = new TranslationSlimmer();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.pageSizeSelectorMobileRenderer = new PageSizeSelectorMobileRenderer();
    this.pageSizeSelectorMobileDropdownRenderer = new PageSizeSelectorMobileDropdownRenderer();
    /**
     * Specifies the number of data items to be displayed per page
     *
     * @vegaVersion 2.42.0
     */
    /* eslint-disable-next-line @stencil/strict-mutable */
    this.pageSize = 10;
    /**
     * Specifies the options available for the page size selector
     *
     * @vegaVersion 2.42.0
     */
    /* eslint-disable-next-line @stencil/strict-mutable */
    this.pageSizeSelectorOptions = [10, 20, 50, 100];
    /**
     * Specifies the total number of data items
     *
     * @vegaVersion 2.42.0
     */
    this.total = 0;
    /**
     * Specifies the current page number
     *
     * @vegaVersion 2.42.0
     */
    /* eslint-disable-next-line @stencil/strict-mutable */
    this.current = 1;
    /**
     * @internal
     * Tracks whether "All" page size option is currently active.
     *
     * @vegaVersion 2.81.0
     */
    this.isAllActive = false;
  }
  render() {
    return sanitizeVegaComponent(h(Host, null, this.pageSizeSelectorMobileRenderer.render()), this.host);
  }
  static get is() { return "vega-pagination-page-size-selector-mobile"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-pagination-page-size-selector-mobile.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-pagination-page-size-selector-mobile.css"]
  }; }
  static get properties() { return {
    "type": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "'pageSizeSelectorMobile' | 'pageSizeSelectorMobile_currentPageLabel'",
        "resolved": "\"pageSizeSelectorMobile\" | \"pageSizeSelectorMobile_currentPageLabel\"",
        "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
    },
    "pageSize": {
      "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 number of data items to be displayed per page"
      },
      "attribute": "page-size",
      "reflect": false,
      "defaultValue": "10"
    },
    "pageSizeSelectorOptions": {
      "type": "unknown",
      "mutable": true,
      "complexType": {
        "original": "VegaPaginationPageSizeOption[]",
        "resolved": "VegaPaginationPageSizeOption[]",
        "references": {
          "VegaPaginationPageSizeOption": {
            "location": "import",
            "path": "../types"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.42.0"
          }],
        "text": "Specifies the options available for the page size selector"
      },
      "defaultValue": "[10, 20, 50, 100]"
    },
    "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"
    },
    "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"
    },
    "dropdownProps": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "DropdownPropsForPagination",
        "resolved": "{ isScreenPosition?: boolean; }",
        "references": {
          "DropdownPropsForPagination": {
            "location": "import",
            "path": "../types"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.42.0"
          }],
        "text": "Specifies the properties of the `vega-dropdown` component\n   used to configure the dropdown for the\n   page size selector mobile in pagination."
      }
    },
    "isAllActive": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "internal",
            "text": "Tracks whether \"All\" page size option is currently active."
          }, {
            "name": "vegaVersion",
            "text": "2.81.0"
          }],
        "text": ""
      },
      "attribute": "is-all-active",
      "reflect": false,
      "defaultValue": "false"
    }
  }; }
  static get elementRef() { return "host"; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaPaginationPageSizeSelectorMobile.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaPaginationPageSizeSelectorMobile.prototype, "translationSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaPaginationPageSizeSelectorMobile.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaPaginationPageSizeSelectorMobile.prototype, "pageSizeSelectorMobileRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaPaginationPageSizeSelectorMobile.prototype, "pageSizeSelectorMobileDropdownRenderer", void 0);
