"use client"; import Image from "next/image"; import Link from "next/link"; import { memo } from "react"; 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 */}
); } /** * Figma: Content page Template (19003:23305) — ContentBanner article instances. * Horizontal thumbnail below md; Section SVG (1920×672) at md+. */ function ContentBannerArticleView({ post, leadingImageSrc, leadingImageAlt, backgroundImageHorizontal, backgroundImageSection, }: ContentBannerViewProps) { if (!backgroundImageHorizontal || !backgroundImageSection) { return null; } return (
{/* eslint-disable-next-line @next/next/no-img-element */}
{/* eslint-disable-next-line @next/next/no-img-element */}
); } /** * Figma: use case detail ContentBanner (22015:42621) — copy left, Rule preview right. */ function ContentBannerUseCaseView({ post, rulePreview, contentTone = "inverse", leadingImageSrc, leadingImageAlt, ruleCardLinkAriaLabel, }: Pick< ContentBannerViewProps, | "post" | "rulePreview" | "contentTone" | "leadingImageSrc" | "leadingImageAlt" | "ruleCardLinkAriaLabel" >) { 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);