import { jsx as n } from "react/jsx-runtime";
import { useState as y, useMemo as C, useCallback as v } from "react";
import { c as x, s as O, a as h } from "../tools/tools.js";
import { B as k } from "./breadcrumb-basic.js";
import { B as N } from "./breadcrumb-item.js";
const I = (c = []) => c.map((a, r) => ({
  ...a,
  id: a.id ?? r
})), K = function(a) {
  const {
    as: r = "nav",
    className: i,
    dropOldClass: l,
    onClick: o,
    options: p,
    style: m,
    variables: d,
    ...u
  } = a, [e] = y(I(p)), B = C(() => {
    const s = x(!l && "", i), t = O((S, b) => ({ tKey: h(b) }), d, m);
    return {
      className: s,
      style: t
    };
  }, [i, l, m, d]), f = v(
    (s) => {
      const t = e[s];
      o == null || o(t.id);
    },
    [o, e]
  );
  return /* @__PURE__ */ n(r, { ...u, ...B, children: /* @__PURE__ */ n(k, { children: e.map((s, t) => /* @__PURE__ */ n(N, { active: s.active, onClick: () => f(t), children: s.title }, s.id)) }) });
};
K.displayName = "BRL.Breadcrumb";
export {
  K as B
};
//# sourceMappingURL=breadcrumb.js.map
