"use client"; import { memo } from "react"; import AutoCarousel from "@/components/cardStack/layouts/carousels/AutoCarousel"; import TestimonialAuthor from "@/components/shared/TestimonialAuthor"; 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 { CardAnimationType, ButtonConfig, TitleSegment, TextboxLayout, InvertedBackground } from "@/components/cardStack/types"; type Testimonial = { id: string; name: string; handle: string; testimonial: string; imageSrc?: string; imageAlt?: string; icon?: LucideIcon; }; interface TestimonialCardSixProps { testimonials: Testimonial[]; animationType: CardAnimationType; title: string; titleSegments?: TitleSegment[]; description: string; textboxLayout: TextboxLayout; useInvertedBackground: InvertedBackground; tag?: string; tagIcon?: LucideIcon; buttons?: ButtonConfig[]; speed?: number; topMarqueeDirection?: "left" | "right"; ariaLabel?: string; className?: string; containerClassName?: string; carouselClassName?: string; bottomCarouselClassName?: string; cardClassName?: string; testimonialClassName?: string; imageWrapperClassName?: string; imageClassName?: string; iconClassName?: string; nameClassName?: string; handleClassName?: string; textBoxClassName?: string; textBoxTitleClassName?: string; textBoxTitleImageWrapperClassName?: string; textBoxTitleImageClassName?: string; textBoxDescriptionClassName?: string; textBoxTagClassName?: string; textBoxButtonContainerClassName?: string; textBoxButtonClassName?: string; textBoxButtonTextClassName?: string; } interface TestimonialCardProps { testimonial: Testimonial; useInvertedBackground: "noInvert" | "invertDefault"; cardClassName?: string; testimonialClassName?: string; imageWrapperClassName?: string; imageClassName?: string; iconClassName?: string; nameClassName?: string; handleClassName?: string; } const TestimonialCard = memo(({ testimonial, useInvertedBackground, cardClassName = "", testimonialClassName = "", imageWrapperClassName = "", imageClassName = "", iconClassName = "", nameClassName = "", handleClassName = "", }: TestimonialCardProps) => { const Icon = testimonial.icon || Quote; const theme = useTheme(); const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); return (
{testimonial.testimonial}