From 8452cfa422f0db1252482510a254f0089dd970b7 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 30 Sep 2025 21:26:35 +0000 Subject: [PATCH] Add RealmSwitcher component cgen-3453ecff00934a6d9a77f4246e188c1b --- client/components/settings/RealmSwitcher.tsx | 281 +++++++++++++++++++ 1 file changed, 281 insertions(+) create mode 100644 client/components/settings/RealmSwitcher.tsx diff --git a/client/components/settings/RealmSwitcher.tsx b/client/components/settings/RealmSwitcher.tsx new file mode 100644 index 00000000..a1a58c11 --- /dev/null +++ b/client/components/settings/RealmSwitcher.tsx @@ -0,0 +1,281 @@ +import { memo } from "react"; +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 { + GamepadIcon, + BriefcaseIcon, + UsersIcon, + ShoppingCartIcon, + Rocket, + Compass, + ArrowRight, + Check, +} from "lucide-react"; +import { cn } from "@/lib/utils"; + +export type RealmKey = + | "game_developer" + | "client" + | "community_member" + | "customer"; + +export interface RealmOption { + id: RealmKey; + name: string; + title: string; + description: string; + icon: React.ComponentType<{ className?: string }>; + gradient: string; + route: string; + routeLabel: string; + highlights: string[]; +} + +export const REALM_OPTIONS: RealmOption[] = [ + { + id: "game_developer", + name: "Development Forge", + title: "Game Developer", + description: + "Build immersive experiences, collaborate with other creators, and unlock our full suite of development tools.", + icon: GamepadIcon, + gradient: "from-neon-purple to-aethex-500", + route: "/game-development", + routeLabel: "Game Development", + highlights: [ + "Advanced tooling and workflows", + "Collaborative project spaces", + "Mentors and technical reviews", + ], + }, + { + id: "client", + name: "Strategist Nexus", + title: "Client", + description: + "Engage AeThex teams for bespoke solutions, product consulting, and strategic execution across every milestone.", + icon: BriefcaseIcon, + gradient: "from-neon-blue to-aethex-400", + route: "/consulting", + routeLabel: "Consulting", + highlights: [ + "Project leadership & delivery", + "End-to-end service orchestration", + "Outcome-driven partnership", + ], + }, + { + id: "community_member", + name: "Innovation Commons", + title: "Community Member", + description: + "Connect with innovators, share discoveries, and access exclusive research, events, and community resources.", + icon: UsersIcon, + gradient: "from-neon-green to-aethex-600", + route: "/community", + routeLabel: "Community", + highlights: [ + "Curated knowledge streams", + "Collaborative guilds & events", + "Access to experimental features", + ], + }, + { + id: "customer", + name: "Experience Hub", + title: "Customer", + description: + "Discover AeThex products, manage licenses, and access tailored support for every experience you launch.", + icon: ShoppingCartIcon, + gradient: "from-amber-400 to-aethex-700", + route: "/get-started", + routeLabel: "Get Started", + highlights: [ + "Personalized product journeys", + "Priority support & updates", + "Insight dashboards", + ], + }, +]; + +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) { + return ( +
+
+

+ + Realm & Path +

+

+ Tailor your AeThex experience. Choose the realm that matches your goals and align the path difficulty that fits your craft. +

+
+ +
+ {REALM_OPTIONS.map((realm, index) => { + const Icon = realm.icon; + const isActive = selectedRealm === realm.id; + return ( + +
+ +
+
+ +
+
+ + {realm.title} + + + {realm.name} + +
+
+

+ {realm.description} +

+ + Suggested route: {realm.routeLabel} + +
+ +
    + {realm.highlights.map((highlight, highlightIndex) => ( +
  • + + {highlight} +
  • + ))} +
+
+ + +
+
+ + ); + })} +
+ +
+
+

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. +

+ +
+
+ ); +}); + +export default RealmSwitcher;