import { Dialog, DialogContent } from "@/components/ui/dialog"; import type { Project } from "@/types"; import { useTranslation } from "react-i18next"; import { ExternalLink, X, Code2, Tag, Star } from "lucide-react"; import { motion } from "framer-motion"; const GithubIcon = ({ className }: { className?: string }) => ( ); interface ProjectModalProps { project: Project | null; open: boolean; onClose: () => void; } export function ProjectModal({ project, open, onClose }: ProjectModalProps) { const { i18n } = useTranslation(); const isArabic = i18n.language === "ar"; if (!project) return null; const title = isArabic ? project.titleAr : project.titleEn; const fullDesc = isArabic ? project.fullDescAr : project.fullDescEn; const category = isArabic ? project.categoryAr : project.categoryEn; const technologies = project.technologies.split(",").map((t) => t.trim()); return ( {/* Close Button */} {/* Cover Image */} {project.coverImage && (
{title}
{category} {project.featured && ( Featured )}

{title}

)} {/* Gallery */} {project.images.length > 0 && (
{project.images.map((img) => (
))}
)} {/* Content */}
{/* Description */}

{fullDesc}

{/* Technologies */}

{isArabic ? "التقنيات" : "Technologies"}

{technologies.map((tech, i) => ( {tech} ))}
{/* Action Buttons */}
{project.previewUrl && ( {isArabic ? "معاينة" : "Live Preview"} )} {project.githubUrl && ( GitHub )}
); }