import { jsx as o, jsxs as d, Fragment as g } from "react/jsx-runtime";
import w from "../features/icons/ArrowLeftPrimaryIcon.js";
import B from "../features/icons/CrossSecondaryIcon.js";
import x from "../features/icons/PlusSecondaryIcon.js";
import { Button as k, chakra as S, Center as e, Flex as h, SkeletonCircle as p, SkeletonText as y } from "@chakra-ui/react";
import { useTranslation as m } from "react-i18next";
import "./Typography.js";
import { useNavigateBack as u } from "../hooks/useNavigateBack.js";
import { H5 as v } from "./typography.generated.js";
const a = 14, C = S(h, {
  baseStyle: {
    alignItems: "center",
    bottom: "initial",
    h: a,
    px: 3,
    py: 2,
    transitionProperty: "background",
    transitionDuration: "fast",
    flexShrink: 0,
    zIndex: 1
  }
}), s = ({ children: t, ...n }) => /* @__PURE__ */ o(k, { color: "icon-secondary", colorScheme: "transparent", padding: "1.5", fontSize: "xl", size: "auto", rounded: "full", ...n, children: t }), O = (t) => {
  const { t: n } = m(), r = u();
  return /* @__PURE__ */ o(s, { "aria-label": n("navigationBar.back"), onClick: r, ...t, children: /* @__PURE__ */ o(w, {}) });
}, D = (t) => {
  const { t: n } = m(), r = u();
  return /* @__PURE__ */ o(s, { "aria-label": n("navigationBar.close"), onClick: r, ...t, children: /* @__PURE__ */ o(B, {}) });
}, q = (t) => /* @__PURE__ */ o(s, { "aria-label": "add", ...t, children: /* @__PURE__ */ o(x, {}) }), E = ({ isAbsolute: t, leftButton: n, rightButton: r, title: i, scroll: c, children: f, ...b }) => {
  const l = ((c == null ? void 0 : c.scrollTop) ?? 0) <= 16;
  return /* @__PURE__ */ d(C, { bg: l ? "transparent" : "surface-default", boxShadow: l ? "none" : "menu", position: t ? "absolute" : "relative", w: "full", ...b, children: [
    i && /* @__PURE__ */ o(e, { position: "absolute", left: a, right: a, top: 0, bottom: 0, children: typeof i == "string" ? /* @__PURE__ */ o(v, { w: "full", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", textAlign: "center", children: i }) : /* @__PURE__ */ o(g, { children: i }) }),
    n && /* @__PURE__ */ o(e, { position: "absolute", left: 3, top: 2, bottom: 2, children: n }),
    r && /* @__PURE__ */ o(e, { position: "absolute", right: 3, top: 2, bottom: 2, children: r }),
    f
  ] });
}, G = () => /* @__PURE__ */ d(h, { alignItems: "center", justifyContent: "space-between", px: 3, py: 2, height: a, children: [
  /* @__PURE__ */ o(e, { w: 8, h: 8, children: /* @__PURE__ */ o(p, { w: 5, h: 5 }) }),
  /* @__PURE__ */ o(y, { h: 2, w: "33.3%", noOfLines: 1 }),
  /* @__PURE__ */ o(e, { w: 8, h: 8, children: /* @__PURE__ */ o(p, { w: 5, h: 5 }) })
] });
export {
  q as BarAddButton,
  O as BarBackButton,
  D as BarCloseButton,
  s as BarIconButton,
  E as NavigationBar,
  a as NavigationBarHeight,
  G as NavigationBarSkeleton
};
