import { Card } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Download, ExternalLink, Star, GitFork } from "lucide-react"; import { Link } from "react-router-dom"; interface TemplateCardProps { id: string; name: string; description: string; category: string; language: string; stars?: number; downloads?: number; author: string; difficulty: "beginner" | "intermediate" | "advanced"; tags: string[]; githubUrl?: string; demoUrl?: string; } const difficultyColors = { beginner: "bg-green-500/10 text-green-500 border-green-500/20", intermediate: "bg-yellow-500/10 text-yellow-500 border-yellow-500/20", advanced: "bg-red-500/10 text-red-500 border-red-500/20", }; export function TemplateCard({ id, name, description, category, language, stars = 0, downloads = 0, author, difficulty, tags, githubUrl, demoUrl, }: TemplateCardProps) { return (

{name}

{description}

{category} {language} {difficulty}
{tags.slice(0, 4).map((tag) => ( {tag} ))} {tags.length > 4 && ( +{tags.length - 4} more )}
{stars} {downloads} by {author}
{demoUrl && ( )} {githubUrl && ( )}
); }