import { fp as h, at as r, Y as a, O as n, bS as s, v as p, ad as S, a as u, w, fq as z } from "./603b75d9.js";
import "react";
import "react-dom";
const g = 5;
function b(t, e, i, o) {
  return t ? o || i[0] || g : e || g;
}
const C = function() {
  const t = {
    showQuickJumper: n,
    showSizeChanger: n,
    hideOnSinglePage: n,
    changeablePageSize: s(p(5), Number),
    pageSize: S,
    total: S,
    pageNo: u(1),
    pageSizeOptions: w(z, "[5, 10, 20, 50]")
  };
  return new h(t, (e, i) => ({
    showQuickJumper: e.showQuickJumper,
    showSizeChanger: e.showSizeChanger,
    total: e.total,
    hideOnSinglePage: e.hideOnSinglePage,
    pageSize: b(e.showSizeChanger, e.pageSize, e.pageSizeOptions, e.changeablePageSize),
    current: e.pageNo,
    pageSizeOptions: e.pageSizeOptions,
    onChange: (o, l) => {
      e.showSizeChanger && l !== e.changeablePageSize && i(r("changeablePageSize", l, !0)), o !== e.pageNo && i(r("pageNo", o, !1));
    }
  })).setPropertyViewFn((e) => [e.showQuickJumper.propertyView({
    label: a("table.showQuickJumper")
  }), e.hideOnSinglePage.propertyView({
    label: a("table.hideOnSinglePage")
  }), e.showSizeChanger.propertyView({
    label: a("table.showSizeChanger")
  }), e.showSizeChanger.getView() ? e.pageSizeOptions.propertyView({
    label: a("table.pageSizeOptions")
  }) : e.pageSize.propertyView({
    label: a("table.pageSize"),
    placeholder: String(g)
  }), e.total.propertyView({
    label: a("table.total"),
    tooltip: a("table.totalTooltip")
  })]).build();
}();
class P extends C {
  getOffset() {
    const e = this.getView();
    return (e.current - 1) * e.pageSize;
  }
}
export {
  P as PaginationControl,
  C as PaginationTmpControl,
  b as getPageSize
};
