import g from "../../../@ant-design/icons/es/icons/DoubleLeftOutlined.mjs";
import x from "../../../@ant-design/icons/es/icons/DoubleRightOutlined.mjs";
import b from "../../../@ant-design/icons/es/icons/LeftOutlined.mjs";
import N from "../../../@ant-design/icons/es/icons/RightOutlined.mjs";
import F from "../../../classnames/index.mjs";
import q from "../../../rc-pagination/es/Pagination.mjs";
import A from "../../../rc-pagination/es/locale/en_US.mjs";
import * as e from "react";
import "../config-provider/index.mjs";
import G from "../config-provider/hooks/useSize.mjs";
import H from "../grid/hooks/useBreakpoint.mjs";
import { MiniSelect as J, MiddleSelect as K } from "./Select.mjs";
import Q from "./style/index.mjs";
import "../../../@ant-design/cssinjs/es/extractStyle.mjs";
import "../../../@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
import "../../../@ant-design/cssinjs/es/StyleContext.mjs";
import "../../../@ant-design/cssinjs/es/theme/createTheme.mjs";
import "../../../rc-util/es/warning.mjs";
import "../../../@ant-design/cssinjs/es/theme/ThemeCache.mjs";
import "../../../@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
import "../../../@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
import "../../../@ant-design/cssinjs/es/hooks/useHMR.mjs";
import "../../../@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
import U from "../theme/useToken.mjs";
import W from "./style/bordered.mjs";
import { ConfigContext as X } from "../config-provider/context.mjs";
import Y from "../locale/useLocale.mjs";
var Z = globalThis && globalThis.__rest || function(l, a) {
  var i = {};
  for (var o in l)
    Object.prototype.hasOwnProperty.call(l, o) && a.indexOf(o) < 0 && (i[o] = l[o]);
  if (l != null && typeof Object.getOwnPropertySymbols == "function")
    for (var s = 0, o = Object.getOwnPropertySymbols(l); s < o.length; s++)
      a.indexOf(o[s]) < 0 && Object.prototype.propertyIsEnumerable.call(l, o[s]) && (i[o[s]] = l[o[s]]);
  return i;
};
const E = (l) => {
  const {
    prefixCls: a,
    selectPrefixCls: i,
    className: o,
    rootClassName: s,
    style: S,
    size: y,
    locale: O,
    selectComponentClass: h,
    responsive: c,
    showSizeChanger: m
  } = l, P = Z(l, ["prefixCls", "selectPrefixCls", "className", "rootClassName", "style", "size", "locale", "selectComponentClass", "responsive", "showSizeChanger"]), {
    xs: $
  } = H(c), [, p] = U(), {
    getPrefixCls: f,
    direction: r,
    pagination: n = {}
  } = e.useContext(X), t = f("pagination", a), [v, z, j] = Q(t), k = m ?? n.showSizeChanger, w = e.useMemo(() => {
    const C = /* @__PURE__ */ e.createElement("span", {
      className: `${t}-item-ellipsis`
    }, "•••"), R = /* @__PURE__ */ e.createElement("button", {
      className: `${t}-item-link`,
      type: "button",
      tabIndex: -1
    }, r === "rtl" ? /* @__PURE__ */ e.createElement(N, null) : /* @__PURE__ */ e.createElement(b, null)), T = /* @__PURE__ */ e.createElement("button", {
      className: `${t}-item-link`,
      type: "button",
      tabIndex: -1
    }, r === "rtl" ? /* @__PURE__ */ e.createElement(b, null) : /* @__PURE__ */ e.createElement(N, null)), V = /* @__PURE__ */ e.createElement("a", {
      className: `${t}-item-link`
    }, /* @__PURE__ */ e.createElement("div", {
      className: `${t}-item-container`
    }, r === "rtl" ? /* @__PURE__ */ e.createElement(x, {
      className: `${t}-item-link-icon`
    }) : /* @__PURE__ */ e.createElement(g, {
      className: `${t}-item-link-icon`
    }), C)), B = /* @__PURE__ */ e.createElement("a", {
      className: `${t}-item-link`
    }, /* @__PURE__ */ e.createElement("div", {
      className: `${t}-item-container`
    }, r === "rtl" ? /* @__PURE__ */ e.createElement(g, {
      className: `${t}-item-link-icon`
    }) : /* @__PURE__ */ e.createElement(x, {
      className: `${t}-item-link-icon`
    }), C));
    return {
      prevIcon: R,
      nextIcon: T,
      jumpPrevIcon: V,
      jumpNextIcon: B
    };
  }, [r, t]), [I] = Y("Pagination", A), L = Object.assign(Object.assign({}, I), O), u = G(y), d = u === "small" || !!($ && !u && c), _ = f("select", i), D = F({
    [`${t}-mini`]: d,
    [`${t}-rtl`]: r === "rtl",
    [`${t}-bordered`]: p.wireframe
  }, n == null ? void 0 : n.className, o, s, z, j), M = Object.assign(Object.assign({}, n == null ? void 0 : n.style), S);
  return v(/* @__PURE__ */ e.createElement(e.Fragment, null, p.wireframe && /* @__PURE__ */ e.createElement(W, {
    prefixCls: t
  }), /* @__PURE__ */ e.createElement(q, Object.assign({}, w, P, {
    style: M,
    prefixCls: t,
    selectPrefixCls: _,
    className: D,
    selectComponentClass: h || (d ? J : K),
    locale: L,
    showSizeChanger: k
  }))));
};
process.env.NODE_ENV !== "production" && (E.displayName = "Pagination");
const $e = E;
export {
  $e as default
};
