"use client"; import { Fragment } from "react"; import MediaContent from "@/components/shared/MediaContent"; import TextAnimation from "@/components/text/TextAnimation"; import Button from "@/components/button/Button"; import { cls } from "@/lib/utils"; import { getButtonProps } from "@/lib/buttonUtils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import type { ButtonConfig } from "@/types/button"; interface HeroShowcaseSplitOverlayProps { title: string; description: string; tags: string[]; buttons: ButtonConfig[]; showcaseImageSrc?: string; showcaseVideoSrc?: string; showcaseImageAlt?: string; showcaseVideoAriaLabel?: string; imageSrc?: string; videoSrc?: string; imageAlt?: string; videoAriaLabel?: string; showDimOverlay?: boolean; ariaLabel?: string; className?: string; containerClassName?: string; titleClassName?: string; descriptionClassName?: string; tagsContainerClassName?: string; tagClassName?: string; buttonContainerClassName?: string; buttonClassName?: string; buttonTextClassName?: string; showcaseWrapperClassName?: string; showcaseImageClassName?: string; mediaWrapperClassName?: string; imageClassName?: string; dimOverlayClassName?: string; } const HeroShowcaseSplitOverlay = ({ title, description, tags, buttons, showcaseImageSrc, showcaseVideoSrc, showcaseImageAlt = "", showcaseVideoAriaLabel = "Showcase video", imageSrc, videoSrc, imageAlt = "", videoAriaLabel = "Hero video", showDimOverlay = false, ariaLabel = "Hero section", className = "", containerClassName = "", titleClassName = "", descriptionClassName = "", tagsContainerClassName = "", tagClassName = "", buttonContainerClassName = "", buttonClassName = "", buttonTextClassName = "", showcaseWrapperClassName = "", showcaseImageClassName = "", mediaWrapperClassName = "", imageClassName = "", dimOverlayClassName = "", }: HeroShowcaseSplitOverlayProps) => { const theme = useTheme(); return (
{/* Background Media with mask fade */}
{showDimOverlay && (
)}
{/* Mobile Layout */}
{buttons.slice(0, 2).map((button, index) => (
{tags.slice(0, 4).map((tag, index) => ( {tag} {index < Math.min(tags.length, 4) - 1 && ( ยท )} ))}
{/* Desktop Layout */}
); }; HeroShowcaseSplitOverlay.displayName = "HeroShowcaseSplitOverlay"; export default HeroShowcaseSplitOverlay;