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