import { jsx as e, jsxs as a } from "react/jsx-runtime";
import { a as w } from "./index.CfQlFjZU.js";
import { n as o } from "./index.B0wX8xO7.js";
import { I as u } from "./index.dWlEA7uO.js";
import { A as v } from "./a.DFzW7QIZ.js";
import { L as f } from "./LoadingState.BcrOPPws.js";
import { a as S } from "./Status.BXXhAgWr.js";
import { a as k } from "./Tag.Bk_lQM4l.js";
import { M as z } from "./MoreMenu.D8ne9cF5.js";
import { B } from "./Button.CpTwUWVr.js";
import { c as H } from "./index.CfM2L_w0.js";
const y = "creator_button_6-oDm", M = "creator_wrapper_L9j0G", j = "creator_fixedHeight_iwBlc", A = "creator_leftSection_C3gvB", C = "creator_rightSection_AIKqT", G = "creator_title_mrGe8", L = "creator_icon_EGqlz", T = "creator_content_hTl-V", t = { button: y, wrapper: M, fixedHeight: j, leftSection: A, rightSection: C, title: G, icon: L, content: T };
function b({
  button: i,
  loading: c,
  menu: n,
  onClickPrevious: s,
  previousPageUrl: h,
  statusDetails: l,
  tagDetails: m,
  title: r,
  height: d = "fixed"
}) {
  return {
    button: i,
    contentClassName: t.content,
    iconClassName: t.icon,
    leftSectionClassName: t.leftSection,
    loading: !!c,
    menu: n,
    onClickPrevious: s,
    previousPageUrl: h,
    rightSectionClassName: t.rightSection,
    statusDetails: l,
    tagDetails: m,
    title: r,
    titleClassName: t.title,
    wrapperClassName: H(t.wrapper, {
      [t.fixedHeight]: d === "fixed"
    })
  };
}
function q({
  button: i,
  contentClassName: c,
  iconClassName: n,
  leftSectionClassName: s,
  loading: h,
  menu: l,
  onClickPrevious: m,
  previousPageUrl: r,
  rightSectionClassName: d,
  statusDetails: p,
  tagDetails: _,
  title: g,
  titleClassName: x,
  wrapperClassName: N
}) {
  return h ? /* @__PURE__ */ e("div", { className: N, children: /* @__PURE__ */ a("div", { className: c, children: [
    /* @__PURE__ */ a("div", { className: s, children: [
      /* @__PURE__ */ e(
        o,
        {
          value: r,
          then: /* @__PURE__ */ e(
            v,
            {
              className: n,
              to: r,
              onClick: m,
              "data-testid": "arrow-back-icon",
              children: /* @__PURE__ */ e(u, { size: 24 })
            }
          )
        }
      ),
      /* @__PURE__ */ e(f, { type: "skeleton", size: "xlarge" })
    ] }),
    /* @__PURE__ */ a("div", { className: d, children: [
      /* @__PURE__ */ e(f, { type: "skeleton", size: "medium" }),
      /* @__PURE__ */ e(f, { type: "skeleton", size: "medium" })
    ] })
  ] }) }) : /* @__PURE__ */ e("div", { className: N, children: /* @__PURE__ */ a("div", { className: c, children: [
    /* @__PURE__ */ a("div", { className: s, children: [
      /* @__PURE__ */ e(
        o,
        {
          value: r,
          then: /* @__PURE__ */ e(
            v,
            {
              className: n,
              to: r,
              onClick: m,
              "data-testid": "arrow-back-icon",
              children: /* @__PURE__ */ e(u, { size: 24 })
            }
          )
        }
      ),
      /* @__PURE__ */ e("h1", { className: x, children: g }),
      /* @__PURE__ */ e(o, { value: _, then: /* @__PURE__ */ e(k, { ..._ }) })
    ] }),
    /* @__PURE__ */ a("div", { className: d, children: [
      /* @__PURE__ */ e(o, { value: !!l, then: /* @__PURE__ */ e(z, { ...l }) }),
      /* @__PURE__ */ e(o, { value: p, then: /* @__PURE__ */ e(S, { ...p }) }),
      i && /* @__PURE__ */ e(o, { value: i, then: /* @__PURE__ */ e(B, { ...i }) })
    ] })
  ] }) });
}
const X = w(q, b, "PageHeader");
export {
  X as P
};
