import Image from "next/image"; import Link from "next/link"; import type { StaticImageItem } from "@/lib/meshkee/types"; import { imageSubtext, imageTitleEn, imageTitleFa, } from "@/lib/meshkee/static-slots"; export function SlotBanner({ image, fallbackEyebrow, fallbackTitle, fallbackText, className = "banner", }: { image?: StaticImageItem | null; fallbackEyebrow?: string; fallbackTitle: string; fallbackText: string; className?: string; }) { const titleFa = imageTitleFa(image) || fallbackTitle; const titleEn = imageTitleEn(image) || fallbackEyebrow || ""; const subtext = imageSubtext(image) || fallbackText; const style = image?.url ? { backgroundImage: `linear-gradient(135deg, rgba(0, 35, 75, 0.72), rgba(136, 63, 63, 0.62)), url(${image.url})`, backgroundSize: "cover", backgroundPosition: "center", } : undefined; const content = ( <> {titleEn ?
{titleEn}
: null}{subtext}
> ); if (image?.linkUrl) { return ( {content} ); } return (