import React from "react"; import { Testimonial, TestimonialsProps } from "../../types"; import { cn } from "../../lib/utils"; import { Star, Play, ExternalLink, X, Maximize2 } from "lucide-react"; import * as Avatar from "@radix-ui/react-avatar"; import * as Dialog from "@radix-ui/react-dialog"; import { motion } from "framer-motion"; import { Card, CardContent } from "../ui/card"; interface TestimonialCardProps { testimonial: Omit; theme?: "light" | "dark" | "gradient" | "minimal"; index?: number; variant?: "default" | "compact" | "detailed"; } export function TestimonialCard({ testimonial, theme = "light", index = 0, variant = "default", }: TestimonialCardProps) { const isVideo = testimonial.type === "VIDEO"; const [isFullscreen, setIsFullscreen] = React.useState(false); const getThemeClasses = () => { switch (theme) { case "dark": return "bg-gray-900 text-white border-gray-700"; case "gradient": return "bg-gradient-to-br from-blue-50 to-indigo-100 border-blue-200"; case "minimal": return "bg-white border-gray-100 shadow-none"; default: return "bg-white border-gray-300"; } }; const renderStars = () => { if (!testimonial.stars) return null; return (
{Array.from({ length: 5 }).map((_, i) => ( ))} {testimonial.stars}/5
); }; return ( {renderStars()} {isVideo ? (
{/* Controls (Close + Fullscreen) */}
{/* Video */}
) : ( testimonial.content && (
"{testimonial.content}"
) )}
{testimonial.giverName .split(" ") .map((n) => n[0]) .join("")}

{testimonial.giverName}

{testimonial.socialLink && ( )}
{(testimonial.role || testimonial.company) && (

{testimonial.role} {testimonial.role && testimonial.company && " at "} {testimonial.company}

)}
); }