import { defineComponent, ref, resolveComponent, mergeProps, useSSRContext } from "vue";
import { ssrRenderAttrs, ssrRenderStyle, ssrInterpolate, ssrRenderComponent, ssrRenderAttr } from "vue/server-renderer";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "pagination",
  __ssrInlineRender: true,
  props: {
    data: Object
  },
  emits: [],
  setup(__props, { emit: __emit }) {
    const emit = __emit;
    const props = __props;
    const data = ref({});
    data.value = props.data;
    function handleCurrentChange(val) {
      emit("pagination", val);
      data.value.count = val;
    }
    return (_ctx, _push, _parent, _attrs) => {
      const _component_el_pagination = resolveComponent("el-pagination");
      if (data.value.total) {
        _push(`<div${ssrRenderAttrs(mergeProps({ class: "news-content-section pt-60" }, _attrs))}><div class="container"><div class="row newBox"><div class="col-lg-12 col-md-12 content"><div class="page mt-30 mb-30"><div class="d-flex justify-content-center align-items-end cannot_selected" style="${ssrRenderStyle({ "position": "relative" })}"><div class="page-des align-items-start cannot_selected">共<span>${ssrInterpolate(Math.ceil(data.value.total / data.value.size))}</span>页，共<span>${ssrInterpolate(data.value.total)}</span>条信息</div>`);
        _push(ssrRenderComponent(_component_el_pagination, {
          "prev-text": "上一页",
          "next-text": "下一页",
          "page-size": data.value.size,
          "current-page": data.value.count,
          background: "",
          layout: "prev, pager, next",
          total: data.value.total,
          onCurrentChange: handleCurrentChange
        }, null, _parent));
        _push(`<div class="page-des2 align-items-end cannot_selected pc">前往第 <input${ssrRenderAttr("value", data.value.count)} class="previous"> 页 </div></div></div></div></div></div></div>`);
      } else {
        _push(`<!---->`);
      }
    };
  }
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/layout/pagination.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export {
  _sfc_main as _
};
