"use client"; import { useState, useEffect } from "react"; import AvatarGroup from "@/components/shared/AvatarGroup"; import Tag from "@/components/shared/Tag"; import { cls, shouldUseInvertedText } from "@/lib/utils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import type { LucideIcon } from "lucide-react"; import type { InvertedBackground } from "@/providers/themeProvider/config/constants"; type Testimonial = { id: string; name: string; imageSrc: string; imageAlt?: string; }; interface TestimonialCardTwelveProps { testimonials: Testimonial[]; cardTitle: string; cardTag: string; cardTagIcon?: LucideIcon; useInvertedBackground: InvertedBackground; ariaLabel?: string; className?: string; containerClassName?: string; cardClassName?: string; avatarGroupClassName?: string; avatarClassName?: string; cardTitleClassName?: string; cardTagClassName?: string; } const TestimonialCardTwelve = ({ testimonials, cardTitle, cardTag, cardTagIcon, useInvertedBackground, ariaLabel = "Testimonials section", className = "", containerClassName = "", cardClassName = "", avatarGroupClassName = "", avatarClassName = "", cardTitleClassName = "", cardTagClassName = "", }: TestimonialCardTwelveProps) => { const theme = useTheme(); const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); const [isMobile, setIsMobile] = useState(false); useEffect(() => { const checkMobile = () => setIsMobile(window.innerWidth < 768); checkMobile(); window.addEventListener("resize", checkMobile); return () => window.removeEventListener("resize", checkMobile); }, []); const avatars = testimonials.map((testimonial) => ({ src: testimonial.imageSrc, alt: testimonial.imageAlt || testimonial.name, })); return (

{cardTitle}

); }; TestimonialCardTwelve.displayName = "TestimonialCardTwelve"; export default TestimonialCardTwelve;