import React from "react"; import { Button } from "../button"; import { ImagePromoBarProps } from "./types"; import { Checklist } from "@shared/components/checklist"; import { Image } from "@shared/components/image"; import { Link } from "@shared/components/link"; import { NextImage } from "@shared/components/next-image"; import { Text } from "@shared/components/text"; import { VideoLink } from "@shared/components/video-link"; import { cx } from "@shared/utils"; export const ImagePromoBar: React.FC = ({ brow, enableHeading, title, subTitle, ctaDisclaimer, disclaimer, description, image, imageLinks, mediaPosition = true, checklist, secondaryCta, cta, videoLink, maxWidth = true, color = "light", imageWidth = 660, imageHeight = 660, useOriginalImageAspectRatio = false, isAboveTheFold = false, onModalButtonClick, onClick, renderCheckPlans, enableAnimation = false, }) => { const hasVideoLink = Boolean(videoLink); return (
{brow && ( {brow} )} {title && ( {title} )} {subTitle && ( {subTitle} )}
{/* Content Section */} {description && ( {description} )} {/* Checklist Rendering */} {checklist.length > 0 && ( )} {ctaDisclaimer &&
{ctaDisclaimer}
} {imageLinks.length > 0 && (
{/* Image Links Collection */} {imageLinks?.map( (link: { url: string; image: string }, index: number) => (
icon-link
) )}
)} {/* CTAs and Disclaimers */} {(cta || secondaryCta) && (
{cta && (
)} {secondaryCta && (
)}
)}
{disclaimer && (
{disclaimer}
)}
); }; export default ImagePromoBar;