import { jsx as n, jsxs as l } from "react/jsx-runtime";
import "react";
import { Menu as i, Image as a, Label as m } from "semantic-ui-react";
function d(t) {
  const r = () => 10, o = t ? document.getElementById(t) : null;
  if (o) {
    const c = o.getBoundingClientRect().top + window.pageYOffset;
    window.scroll({
      top: c - r(),
      behavior: "smooth"
    });
  }
}
const f = function(t) {
  return t ? t.toString().replace(/&#(\d+);/g, function(r, o) {
    return String.fromCharCode(o);
  }) : "";
}, g = (t) => {
  const { contextRef: r, sections: o = [], navTitle: c, toTopLabel: s } = t;
  return /* @__PURE__ */ n("div", { className: "left navigator", children: /* @__PURE__ */ l(i, { vertical: !0, children: [
    /* @__PURE__ */ n(i.Item, { header: !0, children: c }),
    o.map((e) => /* @__PURE__ */ l(i.Item, { active: e.active, onClick: () => d(e.id), children: [
      e.iconComponent ? e.iconComponent : /* @__PURE__ */ n(a, { src: e.icon }),
      /* @__PURE__ */ n(m, { basic: !0, children: f(e.label) })
    ] }, e.label))
  ] }) });
};
export {
  g as default
};
