import { jsx as o } from "react/jsx-runtime";
import { useState as N, useMemo as x, createElement as O } from "react";
import { c as S, s as b, a as C } from "../tools/tools.js";
import { P as m } from "./pagination-item.js";
import { P as d } from "./pagination-link.js";
import { P } from "./pagination-nav.js";
import { P as I } from "./pagination-span.js";
const L = (e = []) => e.map((i, n) => ({
  ...i,
  id: i.id ?? n
})), s = function(i) {
  const {
    alignment: n,
    as: f = "ul",
    className: r,
    dropOldClass: l,
    navProps: g,
    options: u,
    size: t,
    style: p,
    variables: c,
    ...y
  } = i, [v] = N(L(u)), h = x(() => {
    const a = S(
      !l && "pagination",
      t && `pagination-${t}`,
      n && `justify-content-${n}`,
      r
    ), k = b((j, B) => ({ tKey: C(B) }), c, p);
    return {
      className: a,
      style: k
    };
  }, [n, r, l, t, p, c]);
  return /* @__PURE__ */ o(P, { ...g, children: /* @__PURE__ */ o(f, { ...y, ...h, children: v.map((a) => /* @__PURE__ */ O(m, { ...a.itemProps, active: a.active, disabled: a.disabled, key: a.id }, /* @__PURE__ */ o(d, { href: a.href, ...a.linkProps, children: a.link }))) }) });
};
s.Item = m;
s.Nav = P;
s.Link = d;
s.Span = I;
s.displayName = "BRL.PaginationBasic";
export {
  s as P
};
//# sourceMappingURL=pagination-basic.js.map
