import { j as r } from "../../../../../_virtual/jsx-runtime.js";
import { a as m } from "../../../../sdk/dist/shared/chunk-5X5SX5N7.js";
import "../../../../sdk/dist/shared/chunk-6PGAWO4H.js";
import "../../../../sdk/dist/shared/chunk-F4JNKU7J.js";
import "@sinclair/typebox";
import "../../../../sdk/dist/shared/chunk-7UBMXMNJ.js";
import "../../../../sdk/dist/shared/chunk-JRCVYDCD.js";
import { useBrickStyle as c } from "../hooks/use-brick-style.js";
import s from "../components/TextContent.js";
import { tx as i } from "../../../../style-system/dist/twind.js";
import { isTextContentEmpty as l } from "../utils/text-content.js";
import x from "../components/BrickRoot.js";
import { useBrickProps as f } from "../hooks/use-brick-props.js";
function P(n) {
  const { brick: t, editable: o, selected: p } = n, e = f(n), a = c(t);
  return /* @__PURE__ */ r.jsxs(
    x,
    {
      brick: t,
      editable: o,
      manifest: m,
      className: i("flex-col gap-[1.5rem] flex-grow", Object.values(a)),
      children: [
        /* @__PURE__ */ r.jsx(
          s,
          {
            as: "h1",
            propPath: "content",
            brickId: t.id,
            content: e.content,
            rawContent: t.props.content,
            className: i("prose xl:prose-xl"),
            textSizeMode: "hero",
            editable: o,
            noTextType: !0
          }
        ),
        /* @__PURE__ */ r.jsx(
          s,
          {
            as: "p",
            propPath: "tagline",
            className: i(
              "tagline text-2xl font-bold text-balance",
              // When editing, hide tagline if empty but show it on hover
              o && l(e.tagline) && !p ? "opacity-0 hover:opacity-80" : "opacity-80"
            ),
            brickId: t.id,
            content: e.tagline,
            rawContent: t.props.tagline,
            editable: o
          }
        )
      ]
    }
  );
}
export {
  P as default
};
//# sourceMappingURL=hero.js.map
