import { j as s } from "./jsx-runtime-BbD0H88J.js";
import { C as e } from "./css-BkBrZtKZ.js";
import { a as m } from "./Box-DLO7l9hM.js";
import { B as u } from "./Button-DLtxKGH5.js";
import { useMemo as d } from "react";
import { c as p } from "./Text-XeD58Fq8.js";
import { T as x } from "./Editable-DjQORuR1.js";
import { a as f } from "./types-B5-Tni3G.js";
const h = ({ children: r = [], ...t }) => /* @__PURE__ */ s.jsx(
  m,
  {
    x: !0,
    gap: "small",
    align: "center",
    className: e.BE("header", "actions"),
    ...t,
    children: r
  }
), [j, n] = p({
  defaultValue: { divided: !1, level: "h1" },
  displayName: "Header.Context"
}), B = ({
  className: r,
  level: t = "p",
  divided: a = !1,
  bordered: o = !0,
  padded: l = !1,
  ...i
}) => {
  const c = d(() => ({ level: t, divided: a }), [t, a]);
  return /* @__PURE__ */ s.jsx(j, { value: c, children: /* @__PURE__ */ s.jsx(
    m,
    {
      el: "header",
      x: !0,
      align: "center",
      justify: "between",
      className: e(
        e.B("header"),
        o && e.bordered("bottom"),
        a && e.BM("header", "divided"),
        l && e.BM("header", "padded"),
        r
      ),
      ...i
    }
  ) });
}, b = ({
  children: r = "",
  className: t,
  onClick: a,
  ...o
}) => {
  const { level: l } = n();
  return /* @__PURE__ */ s.jsx(
    u,
    {
      variant: "text",
      size: f[l],
      onClick: a,
      className: e(e.B("header-button-title"), t),
      sharp: !0,
      ...o,
      children: r
    }
  );
}, v = ({
  className: r,
  level: t,
  ...a
}) => {
  const { level: o } = n();
  return /* @__PURE__ */ s.jsx(
    x,
    {
      className: e(e.BE("header", "text"), r),
      level: t ?? o,
      gap: 1.5,
      ...a
    }
  );
}, y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Actions: h,
  ButtonTitle: b,
  Header: B,
  Title: v,
  useContext: n
}, Symbol.toStringTag, { value: "Module" }));
export {
  y as e
};
