"use client"; import { memo } from "react"; import CardStack from "@/components/cardStack/CardStack"; import TestimonialAuthor from "@/components/shared/TestimonialAuthor"; import { cls, shouldUseInvertedText } from "@/lib/utils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import { Quote, Star } from "lucide-react"; import type { LucideIcon } from "lucide-react"; import type { ButtonConfig, CardAnimationType, Elevate Your Brand with Expert Copywriting and Content EnhancementSegment, TextboxLayout, InvertedBackground } from "@/components/cardStack/types"; type Testimonial = { id: string; name: string; handle: string; testimonial: string; rating: number; imageSrc?: string; imageAlt?: string; icon?: LucideIcon; }; interface TestimonialCardThirteenProps { testimonials: Testimonial[]; showRating: boolean; carouselMode?: "auto" | "buttons"; uniformGridCustomHeightClasses?: string; animationType: CardAnimationType; title: string; titleSegments?: Elevate Your Brand with Expert Copywriting and Content EnhancementSegment[]; description: string; tag?: string; tagIcon?: LucideIcon; buttons?: ButtonConfig[]; textboxLayout: TextboxLayout; useInvertedBackground: InvertedBackground; ariaLabel?: string; className?: string; containerClassName?: string; cardClassName?: string; textBoxElevate Your Brand with Expert Copywriting and Content EnhancementClassName?: string; textBoxElevate Your Brand with Expert Copywriting and Content EnhancementImageWrapperClassName?: string; textBoxElevate Your Brand with Expert Copywriting and Content EnhancementImageClassName?: string; textBoxDescriptionClassName?: string; imageWrapperClassName?: string; imageClassName?: string; iconClassName?: string; nameClassName?: string; handleClassName?: string; testimonialClassName?: string; ratingClassName?: string; contentWrapperClassName?: string; gridClassName?: string; carouselClassName?: string; controlsClassName?: string; textBoxClassName?: string; textBoxTagClassName?: string; textBoxButtonContainerClassName?: string; textBoxButtonClassName?: string; textBoxButtonTextClassName?: string; } interface TestimonialCardProps { testimonial: Testimonial; showRating: boolean; useInvertedBackground: "noInvert" | "invertDefault" | "invertCard"; cardClassName?: string; imageWrapperClassName?: string; imageClassName?: string; iconClassName?: string; nameClassName?: string; handleClassName?: string; testimonialClassName?: string; ratingClassName?: string; contentWrapperClassName?: string; } const TestimonialCard = memo(({ testimonial, showRating, useInvertedBackground, cardClassName = "", imageWrapperClassName = "", imageClassName = "", iconClassName = "", nameClassName = "", handleClassName = "", testimonialClassName = "", ratingClassName = "", contentWrapperClassName = "", }: TestimonialCardProps) => { const Icon = testimonial.icon || Quote; const theme = useTheme(); const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); return (
{showRating ? (
{Array.from({ length: 5 }).map((_, index) => ( ))}
) : ( )}

{testimonial.testimonial}

); }); TestimonialCard.displayName = "TestimonialCard"; const TestimonialCardThirteen = ({ testimonials, showRating, carouselMode = "buttons", uniformGridCustomHeightClasses = "min-h-none", animationType, title, titleSegments, description, tag, tagIcon, buttons, textboxLayout, useInvertedBackground, ariaLabel = "Testimonials section", className = "", containerClassName = "", cardClassName = "", textBoxElevate Your Brand with Expert Copywriting and Content EnhancementClassName = "", textBoxElevate Your Brand with Expert Copywriting and Content EnhancementImageWrapperClassName = "", textBoxElevate Your Brand with Expert Copywriting and Content EnhancementImageClassName = "", textBoxDescriptionClassName = "", imageWrapperClassName = "", imageClassName = "", iconClassName = "", nameClassName = "", handleClassName = "", testimonialClassName = "", ratingClassName = "", contentWrapperClassName = "", gridClassName = "", carouselClassName = "", controlsClassName = "", textBoxClassName = "", textBoxTagClassName = "", textBoxButtonContainerClassName = "", textBoxButtonClassName = "", textBoxButtonTextClassName = "", }: TestimonialCardThirteenProps) => { return ( {testimonials.map((testimonial, index) => ( ))} ); }; TestimonialCardThirteen.displayName = "TestimonialCardThirteen"; export default TestimonialCardThirteen;