'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var index = require('../../../select/index.js');
require('../../../../hooks/index.js');
require('../../../../utils/index.js');
var pluginVue_exportHelper = require('../../../../_virtual/plugin-vue_export-helper.js');
var props = require('../../../../utils/vue/props.js');
var typescript = require('../../../../utils/typescript.js');
var index$1 = require('../../../../hooks/use-locale/index.js');
var index$2 = require('../../../../hooks/use-namespace/index.js');

const paginationSizesProps = props.buildProps({
  pageSize: {
    type: Number,
    required: true
  },
  pageSizes: {
    type: props.definePropType(Array),
    default: () => typescript.mutable([10, 20, 30, 40, 50, 100])
  },
  popperClass: {
    type: String,
    default: ""
  },
  disabled: Boolean,
  size: {
    type: String,
    default: "default"
  }
});
const _sfc_main = vue.defineComponent({
  name: "PsPaginationSizes",
  components: {
    PsSelect: index.PsSelect,
    PsOption: index.PsOption
  },
  props: paginationSizesProps,
  setup(props) {
    const { t } = index$1.useLocale();
    const ns = index$2.useNamespace("pagination");
    const innerPageSize = vue.ref(props.pageSize);
    const innerPagesizes = vue.computed(() => props.pageSizes);
    return {
      ns,
      innerPagesizes,
      innerPageSize,
      t
    };
  }
});
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_ps_option = vue.resolveComponent("ps-option");
  const _component_ps_select = vue.resolveComponent("ps-select");
  return vue.openBlock(), vue.createElementBlock("span", {
    class: vue.normalizeClass(_ctx.ns.e("sizes"))
  }, [
    vue.createVNode(_component_ps_select, {
      "model-value": _ctx.innerPageSize,
      disabled: _ctx.disabled,
      "popper-class": _ctx.popperClass,
      size: _ctx.size
    }, {
      default: vue.withCtx(() => [
        (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.innerPagesizes, (item) => {
          return vue.openBlock(), vue.createBlock(_component_ps_option, {
            key: item,
            value: item,
            label: item + _ctx.t("el.pagination.pagesize")
          }, null, 8, ["value", "label"]);
        }), 128))
      ]),
      _: 1
    }, 8, ["model-value", "disabled", "popper-class", "size"])
  ], 2);
}
var Sizes = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-ps/packages/components/pagination/src/components/sizes.vue"]]);

exports["default"] = Sizes;
//# sourceMappingURL=sizes.js.map
