import { j as o } from "../../node_modules/react/jsx-runtime.mjs";
import { useState as l } from "react";
import { isMobile as S } from "../../node_modules/react-device-detect/dist/lib.mjs";
import "./index.less.mjs";
import { useTranslation as j } from "../../node_modules/react-i18next/dist/es/useTranslation.mjs";
import x from "../../node_modules/antd/es/pagination/Pagination.mjs";
let n = !0;
const $ = ({ pageSizeOptions: g = [10, 20, 50, 100], total: h = 0, dataSource: s = [], formPage: p, paginationEmit: i = () => {
}, direction: u = "end" }) => {
  const { t: a } = j(), [r, m] = l(p || 1), [f, z] = l(10), c = (e, t) => {
    m(e), n && i(e, t);
  }, C = (e, t) => {
    n = !1, z(t), setTimeout(() => {
      m(1), i(1, t), setTimeout(() => {
        n = !0;
      }, 100);
    }, 100);
  };
  return o.jsx(o.Fragment, { children: (s == null ? void 0 : s.length) != 0 && !S && o.jsx("div", { className: "bitzPaginationBlock", style: { justifyContent: u }, children: o.jsx(x, { size: "small", total: h, defaultCurrent: r, current: r, pageSize: f, showSizeChanger: !0, showQuickJumper: !0, pageSizeOptions: g, showTotal: (e) => `${a("System_Total", "共")} ${e} ${a("System_Data", "条数据")}`, onChange: c, onShowSizeChange: C }) }) });
};
export {
  $ as default
};
