"use client"; import Image from "next/image"; import Link from "next/link"; import { memo } from "react"; import { useTranslation } from "../../../contexts/MessagesContext"; import ContentContainer from "../../content/ContentContainer"; import Rule from "../../cards/Rule"; import { getAssetPath, guideBannerLogoArrowPath, } from "../../../../lib/assetUtils"; import type { ContentBannerViewProps } from "./ContentBanner.types"; /** * Figma: ContentBanner on content page template (22078:791901) — left column * title + description; logo mark (22078:806960) in right column. */ function ContentBannerGuideView({ post, }: Pick) { const { title, description } = post.frontmatter; return (

{title}

{description ? (

{description}

) : null}
{/* eslint-disable-next-line @next/next/no-img-element */}
); } function ContentBannerArticleView({ post, leadingImageSrc, leadingImageAlt, backgroundImageSm, backgroundImageMd, }: ContentBannerViewProps) { if (!backgroundImageSm || !backgroundImageMd) { return null; } return (
); } /** * Figma: use case detail ContentBanner (22015:42621) — copy left, Rule preview right. */ function ContentBannerUseCaseView({ post, rulePreview, contentTone = "inverse", leadingImageSrc, leadingImageAlt, }: Pick< ContentBannerViewProps, | "post" | "rulePreview" | "contentTone" | "leadingImageSrc" | "leadingImageAlt" >) { const t = useTranslation("pages.useCasesCompletedRule"); if (!rulePreview) { return null; } const { title } = post.frontmatter; return (
{rulePreview.href ? ( } /> ) : ( } /> )}
); } function ContentBannerView(props: ContentBannerViewProps) { if (props.variant === "guide") { return ; } if (props.variant === "useCase") { return ; } return ; } ContentBannerView.displayName = "ContentBannerView"; export default memo(ContentBannerView);