"use client"; import { memo } from "react"; import Image from "next/image"; import CardStack from "@/components/cardStack/CardStack"; import { cls, shouldUseInvertedText } from "@/lib/utils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import { Quote } from "lucide-react"; import type { LucideIcon } from "lucide-react"; import type { ButtonConfig, CardAnimationType, TitleSegment, TextboxLayout, InvertedBackground } from "@/components/cardStack/types"; type Testimonial = { id: string; name: string; role: string; testimonial: string; imageSrc?: string; imageAlt?: string; icon?: LucideIcon; }; interface TestimonialCardTwoProps { testimonials: Testimonial[]; carouselMode?: "auto" | "buttons"; uniformGridCustomHeightClasses?: string; animationType: CardAnimationType; title: string; titleSegments?: TitleSegment[]; description: string; tag?: string; tagIcon?: LucideIcon; buttons?: ButtonConfig[]; textboxLayout: TextboxLayout; useInvertedBackground: InvertedBackground; ariaLabel?: string; className?: string; containerClassName?: string; cardClassName?: string; textBoxTitleClassName?: string; textBoxTitleImageWrapperClassName?: string; textBoxTitleImageClassName?: string; textBoxDescriptionClassName?: string; imageWrapperClassName?: string; imageClassName?: string; iconClassName?: string; nameClassName?: string; roleClassName?: string; testimonialClassName?: string; gridClassName?: string; carouselClassName?: string; controlsClassName?: string; textBoxClassName?: string; textBoxTagClassName?: string; textBoxButtonContainerClassName?: string; textBoxButtonClassName?: string; textBoxButtonTextClassName?: string; } interface TestimonialCardProps { testimonial: Testimonial; shouldUseLightText: boolean; cardClassName?: string; imageWrapperClassName?: string; imageClassName?: string; iconClassName?: string; nameClassName?: string; roleClassName?: string; testimonialClassName?: string; } const TestimonialCard = memo(({ testimonial, shouldUseLightText, cardClassName = "", imageWrapperClassName = "", imageClassName = "", iconClassName = "", nameClassName = "", roleClassName = "", testimonialClassName = "", }: TestimonialCardProps) => { const Icon = testimonial.icon || Quote; return (
{testimonial.imageSrc ? ( {testimonial.imageAlt ) : ( )}
LinkedIn

{testimonial.name}

{testimonial.role}

{testimonial.testimonial}

); }); TestimonialCard.displayName = "TestimonialCard"; const TestimonialCardTwo = ({ testimonials, carouselMode = "buttons", uniformGridCustomHeightClasses = "min-h-none", animationType, title, titleSegments, description, tag, tagIcon, buttons, textboxLayout, useInvertedBackground, ariaLabel = "Testimonials section", className = "", containerClassName = "", cardClassName = "", textBoxTitleClassName = "", textBoxTitleImageWrapperClassName = "", textBoxTitleImageClassName = "", textBoxDescriptionClassName = "", imageWrapperClassName = "", imageClassName = "", iconClassName = "", nameClassName = "", roleClassName = "", testimonialClassName = "", gridClassName = "", carouselClassName = "", controlsClassName = "", textBoxClassName = "", textBoxTagClassName = "", textBoxButtonContainerClassName = "", textBoxButtonClassName = "", textBoxButtonTextClassName = "", }: TestimonialCardTwoProps) => { const theme = useTheme(); const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); return ( {testimonials.map((testimonial, index) => ( ))} ); }; TestimonialCardTwo.displayName = "TestimonialCardTwo"; export default TestimonialCardTwo;