import { j as jsxRuntimeExports } from "../../../../../_virtual/jsx-runtime.js";
import { a as C } from "../../../../sdk/dist/shared/chunk-QX6OGRRT.js";
import "../../../../sdk/dist/shared/chunk-3YVJ2ELD.js";
import "../../../../sdk/dist/shared/chunk-AFVJZPLS.js";
import "@sinclair/typebox";
import "../../../../sdk/dist/shared/chunk-A3GF4PYW.js";
import "../../../../sdk/dist/shared/chunk-W33JMRRN.js";
import { useBrickStyle } from "../hooks/use-brick-style.js";
import TextContent from "../components/TextContent.js";
import { tx as D } from "../../../../style-system/dist/twind.js";
import { isTextContentEmpty } from "../utils/text-content.js";
import BrickRoot from "../components/BrickRoot.js";
import { useBrickProps } from "../hooks/use-brick-props.js";
function Hero(_props) {
  const { brick, editable, selected } = _props;
  const props = useBrickProps(_props);
  const styles = useBrickStyle(brick);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    BrickRoot,
    {
      brick,
      editable,
      manifest: C,
      className: D("flex-col gap-[1.5rem] flex-grow", Object.values(styles)),
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          TextContent,
          {
            as: "h1",
            propPath: "content",
            brickId: brick.id,
            content: props.content,
            rawContent: brick.props.content,
            className: D("prose xl:prose-xl"),
            textSizeMode: "hero",
            editable,
            noTextType: true
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          TextContent,
          {
            as: "p",
            propPath: "tagline",
            className: D(
              "tagline text-2xl font-bold text-balance",
              // When editing, hide tagline if empty but show it on hover
              editable && isTextContentEmpty(props.tagline) && !selected ? "opacity-0 hover:opacity-80" : "opacity-80"
            ),
            brickId: brick.id,
            content: props.tagline,
            rawContent: brick.props.tagline,
            editable
          }
        )
      ]
    }
  );
}
export {
  Hero as default
};
//# sourceMappingURL=hero.js.map
