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