import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, Fragment, renderList, createBlock } from 'vue';
import { PsSelect, PsOption } from '../../../select/index.mjs';
import '../../../../hooks/index.mjs';
import '../../../../utils/index.mjs';
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
import { buildProps, definePropType } from '../../../../utils/vue/props.mjs';
import { mutable } from '../../../../utils/typescript.mjs';
import { useLocale } from '../../../../hooks/use-locale/index.mjs';
import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';

const paginationSizesProps = buildProps({
  pageSize: {
    type: Number,
    required: true
  },
  pageSizes: {
    type: definePropType(Array),
    default: () => mutable([10, 20, 30, 40, 50, 100])
  },
  popperClass: {
    type: String,
    default: ""
  },
  disabled: Boolean,
  size: {
    type: String,
    default: "default"
  }
});
const _sfc_main = defineComponent({
  name: "PsPaginationSizes",
  components: {
    PsSelect,
    PsOption
  },
  props: paginationSizesProps,
  setup(props) {
    const { t } = useLocale();
    const ns = useNamespace("pagination");
    const innerPageSize = ref(props.pageSize);
    const innerPagesizes = computed(() => props.pageSizes);
    return {
      ns,
      innerPagesizes,
      innerPageSize,
      t
    };
  }
});
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_ps_option = resolveComponent("ps-option");
  const _component_ps_select = resolveComponent("ps-select");
  return openBlock(), createElementBlock("span", {
    class: normalizeClass(_ctx.ns.e("sizes"))
  }, [
    createVNode(_component_ps_select, {
      "model-value": _ctx.innerPageSize,
      disabled: _ctx.disabled,
      "popper-class": _ctx.popperClass,
      size: _ctx.size
    }, {
      default: withCtx(() => [
        (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.innerPagesizes, (item) => {
          return openBlock(), 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__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-ps/packages/components/pagination/src/components/sizes.vue"]]);

export { Sizes as default };
//# sourceMappingURL=sizes.mjs.map
