import Button from "@/components/ui/Button"; import TextAnimation from "@/components/ui/TextAnimation"; import ImageOrVideo from "@/components/ui/ImageOrVideo"; import ScrollReveal from "@/components/ui/ScrollReveal"; import { cls } from "@/lib/utils"; type Avatar = { name: string; } & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); const TestimonialAvatarCard = ({ tag, title, primaryButton, secondaryButton, avatars, }: { tag: string; title: string; primaryButton?: { text: string; href: string }; secondaryButton?: { text: string; href: string }; avatars: Avatar[]; }) => { const visibleAvatars = avatars.slice(0, 5); const remainingCount = avatars.length - visibleAvatars.length; return (

{tag}

{(primaryButton || secondaryButton) && (
{primaryButton &&
)}
{visibleAvatars.map((avatar, index) => (
0 && "-ml-5")} style={{ zIndex: visibleAvatars.length - index }} >
))} {remainingCount > 0 && (
+{remainingCount}
)}
); }; export default TestimonialAvatarCard;