import { Link } from "react-router-dom"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; import { Badge } from "@/components/ui/badge"; import { Code, Rocket, Users, Trophy, Database, Sparkles, Shield, Compass, ArrowRight, Check, } from "lucide-react"; import { cn } from "@/lib/utils"; import { useAuth } from "@/contexts/AuthContext"; import { useMemo, memo, type ComponentType } from "react"; export type RealmKey = | "labs" | "gameforge" | "corp" | "foundation" | "devlink" | "nexus" | "staff"; export interface RealmOption { id: RealmKey; name: string; title: string; description: string; icon: ComponentType<{ className?: string }>; gradient: string; route: string; routeLabel: string; highlights: string[]; staffOnly?: boolean; } export const REALM_OPTIONS: RealmOption[] = [ { id: "labs", name: "Research & Development", title: "Labs", description: "Explore cutting-edge research, experimental features, and contribute to the future of AeThex technology.", icon: Code, gradient: "from-amber-400 to-amber-600", route: "/dashboard/labs", routeLabel: "Labs Dashboard", highlights: [ "Access experimental features", "Contribute to R&D projects", "Technical deep-dives", ], }, { id: "gameforge", name: "Game Development", title: "GameForge", description: "Build immersive experiences, collaborate with other creators, and unlock our full suite of game development tools.", icon: Rocket, gradient: "from-green-400 to-green-600", route: "/gameforge", routeLabel: "GameForge", highlights: [ "Advanced tooling and workflows", "Collaborative project spaces", "Mentors and technical reviews", ], }, { id: "corp", name: "Business & Consulting", title: "Corp", description: "Engage AeThex teams for bespoke solutions, product consulting, and strategic execution across every milestone.", icon: Users, gradient: "from-blue-400 to-blue-600", route: "/hub/client", routeLabel: "Client Hub", highlights: [ "Project leadership & delivery", "End-to-end service orchestration", "Outcome-driven partnership", ], }, { id: "foundation", name: "Education & Mentorship", title: "Foundation", description: "Access courses, mentorship programs, and educational resources to grow your skills and advance your career.", icon: Trophy, gradient: "from-red-400 to-red-600", route: "/foundation", routeLabel: "Foundation", highlights: [ "Structured learning paths", "Expert mentorship", "Achievement-based progression", ], }, { id: "devlink", name: "Developer Network", title: "Dev-Link", description: "Connect with developers, share knowledge, and collaborate on open-source projects across the AeThex ecosystem.", icon: Database, gradient: "from-cyan-400 to-cyan-600", route: "/dashboard/dev-link", routeLabel: "Dev-Link", highlights: [ "Developer networking", "Open-source collaboration", "API access and integrations", ], }, { id: "nexus", name: "Talent Marketplace", title: "Nexus", description: "Find opportunities, showcase your skills, and connect with projects seeking talented creators and developers.", icon: Sparkles, gradient: "from-purple-400 to-fuchsia-600", route: "/nexus", routeLabel: "Nexus Marketplace", highlights: [ "Job and contract opportunities", "Portfolio showcase", "Talent matching", ], }, { id: "staff", name: "Operations Command", title: "Staff", description: "Admin realm for site staff and employees: operations dashboards, moderation, and admin tooling.", icon: Shield, gradient: "from-violet-500 to-purple-700", route: "/staff/dashboard", routeLabel: "Staff Dashboard", highlights: [ "Moderation & triage", "Operational dashboards", "Internal tools & audits", ], staffOnly: true, }, ]; const EXPERIENCE_OPTIONS = [ { value: "beginner", label: "Pathfinder (Beginner)" }, { value: "intermediate", label: "Innovator (Intermediate)" }, { value: "advanced", label: "Visionary (Advanced)" }, { value: "expert", label: "Architect (Expert)" }, ]; interface RealmSwitcherProps { selectedRealm: RealmKey | null; onRealmChange: (realm: RealmKey) => void; selectedExperience: string; onExperienceChange: (value: string) => void; hasChanges: boolean; onSave: () => void; saving: boolean; } const RealmSwitcher = memo(function RealmSwitcher({ selectedRealm, onRealmChange, selectedExperience, onExperienceChange, hasChanges, onSave, saving, }: RealmSwitcherProps) { const { roles } = useAuth(); const canSeeStaff = useMemo( () => roles.some((r) => ["owner", "admin", "founder", "staff", "employee"].includes( r.toLowerCase(), ), ), [roles], ); const visibleOptions = useMemo( () => REALM_OPTIONS.filter((o) => (o.staffOnly ? canSeeStaff : true)), [canSeeStaff], ); return (
Tailor your AeThex experience. Choose the realm that matches your goals and align the path difficulty that fits your craft.
{realm.description}
Path difficulty
Tune the experience level that unlocks curated resources and challenges matched to your expertise.
Your realm influences recommendations, default routes, and collaboration invites. You can change it anytime.