import { useState } from "react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Link } from "react-router-dom"; import DocsLayout from "@/components/docs/DocsLayout"; import { Play, Clock, User, Star, BookOpen, Code, Gamepad2, Database, Palette, Brain, Rocket, Filter, Search, ChevronRight, Eye, Heart, } from "lucide-react"; interface DocsTutorial { id: string; title: string; description: string; category: string; difficulty: "beginner" | "intermediate" | "advanced"; duration: string; author: string; rating: number; views: number; likes: number; tags: string[]; isNew?: boolean; type: "video" | "article" | "interactive"; path: string; } const docsTutorials: DocsTutorial[] = [ { id: "1", title: "AeThex Platform Quick Start", description: "Get up and running with AeThex in under 10 minutes. Learn the basics of project creation, navigation, and core features.", category: "Getting Started", difficulty: "beginner", duration: "8 min", author: "AeThex Team", rating: 4.9, views: 5420, likes: 412, tags: ["platform", "basics", "quickstart"], isNew: true, type: "video", path: "/docs/getting-started", }, { id: "2", title: "Project Setup and Configuration", description: "Deep dive into project configuration, environment setup, and best practices for organizing your AeThex projects.", category: "Setup", difficulty: "beginner", duration: "15 min", author: "Sarah Chen", rating: 4.8, views: 3240, likes: 287, tags: ["setup", "configuration", "projects"], type: "article", path: "/docs/getting-started#setup-workflow", }, { id: "3", title: "Working with the AeThex API", description: "Comprehensive guide to integrating with AeThex APIs, authentication, rate limiting, and error handling.", category: "API Integration", difficulty: "intermediate", duration: "25 min", author: "Alex Rodriguez", rating: 4.7, views: 2156, likes: 198, tags: ["api", "integration", "authentication"], type: "interactive", path: "/docs/api", }, { id: "4", title: "Building Games with AeThex Tools", description: "Step-by-step tutorial for creating your first game using AeThex development tools and frameworks.", category: "Game Development", difficulty: "intermediate", duration: "45 min", author: "Mike Johnson", rating: 4.9, views: 4567, likes: 523, tags: ["games", "development", "tools"], type: "video", path: "/docs/examples#code-gallery", }, { id: "5", title: "Advanced Database Patterns", description: "Learn advanced database design patterns, optimization techniques, and performance tuning for AeThex applications.", category: "Database", difficulty: "advanced", duration: "35 min", author: "Emma Wilson", rating: 4.6, views: 1876, likes: 165, tags: ["database", "optimization", "patterns"], type: "article", path: "/docs/api#core-endpoints", }, { id: "6", title: "AI Integration Workshop", description: "Hands-on workshop for integrating AI and machine learning capabilities into your AeThex projects.", category: "AI/ML", difficulty: "advanced", duration: "60 min", author: "Dr. Lisa Park", rating: 4.8, views: 2943, likes: 334, tags: ["ai", "machine-learning", "integration"], isNew: true, type: "interactive", path: "/docs/examples#templates", }, ]; const categories = [ { id: "all", name: "All", icon: BookOpen }, { id: "getting-started", name: "Getting Started", icon: Rocket }, { id: "setup", name: "Setup", icon: Code }, { id: "api-integration", name: "API Integration", icon: Database }, { id: "game-development", name: "Game Development", icon: Gamepad2 }, { id: "database", name: "Database", icon: Database }, { id: "ai-ml", name: "AI/ML", icon: Brain }, ]; export default function DocsTutorials() { const [searchTerm, setSearchTerm] = useState(""); const [selectedCategory, setSelectedCategory] = useState("all"); const [selectedDifficulty, setSelectedDifficulty] = useState("all"); const [selectedType, setSelectedType] = useState("all"); const getDifficultyColor = (difficulty: string) => { switch (difficulty) { case "beginner": return "bg-green-500"; case "intermediate": return "bg-yellow-500"; case "advanced": return "bg-red-500"; default: return "bg-gray-500"; } }; const getTypeIcon = (type: string) => { switch (type) { case "video": return Play; case "article": return BookOpen; case "interactive": return Code; default: return BookOpen; } }; const getTypeColor = (type: string) => { switch (type) { case "video": return "text-red-400"; case "article": return "text-blue-400"; case "interactive": return "text-green-400"; default: return "text-gray-400"; } }; const filteredTutorials = docsTutorials.filter((tutorial) => { const matchesSearch = tutorial.title.toLowerCase().includes(searchTerm.toLowerCase()) || tutorial.description.toLowerCase().includes(searchTerm.toLowerCase()) || tutorial.tags.some((tag) => tag.toLowerCase().includes(searchTerm.toLowerCase()), ); const matchesCategory = selectedCategory === "all" || tutorial.category.toLowerCase().replace(/[\/\s]/g, "-") === selectedCategory; const matchesDifficulty = selectedDifficulty === "all" || tutorial.difficulty === selectedDifficulty; const matchesType = selectedType === "all" || tutorial.type === selectedType; return matchesSearch && matchesCategory && matchesDifficulty && matchesType; }); return (
{/* Header */}

Documentation Tutorials

Step-by-step guides and interactive tutorials to help you master AeThex

{/* Filters */}
setSearchTerm(e.target.value)} className="pl-10 bg-slate-800/50 border-slate-600 text-white" />
{/* Categories Sidebar */}
Categories {categories.map((category) => { const Icon = category.icon; return ( ); })}
{/* Tutorials Grid */}

Showing {filteredTutorials.length} tutorials

{filteredTutorials.map((tutorial) => { const TypeIcon = getTypeIcon(tutorial.type); return (
{tutorial.category} {tutorial.difficulty} {tutorial.isNew && ( New )}

{tutorial.title}

{tutorial.description}

{tutorial.duration}
{tutorial.author}
{tutorial.rating}
{tutorial.views}
{tutorial.likes}
); })}
{filteredTutorials.length === 0 && (

No tutorials found

Try adjusting your search terms or filters to find what you're looking for.

)}
); }