import { type MouseEvent as ReactMouseEvent, type ReactElement, useRef } from 'react' import { IconArrowRight, IconArrowUpRight, IconBrowserPlus, IconMessageChatbot, IconUsersGroup, IconX } from '@tabler/icons-react' import claudeIcon from '@/client/assets/claude.svg' import floppyDisk from '@/client/assets/floppy-disk.webp' import openaiIcon from '@/client/assets/openai.svg' import { Button, buttonVariants } from '@/client/components/ui/button' import { Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger } from '@/client/components/ui/dialog' import { useAppConfig } from '@/client/api/app-config' type DemoDialogProps = { // Trigger-owned (uncontrolled) or controlled via open/onOpenChange — the // create-workspace buttons use the former, programmatic opens the latter. trigger?: ReactElement open?: boolean onOpenChange?: (open: boolean) => void } // Shown in the cloud demo wherever a workspace would be created: the demo is // limited to its built-in workspaces, with login opening the full app. export function DemoDialog({ trigger, open, onOpenChange }: DemoDialogProps) { return ( {trigger && } ) } type FloppyArtworkProps = { demoInstallUrl: string } const FLOPPY_POINTER_TRAVEL = 2 function FloppyArtwork({ demoInstallUrl }: FloppyArtworkProps) { const floppyRef = useRef(null) const moveFloppyOppositePointer = (event: ReactMouseEvent) => { if (!floppyRef.current) return const bounds = event.currentTarget.getBoundingClientRect() const x = (event.clientX - bounds.left) / bounds.width - 0.5 const y = (event.clientY - bounds.top) / bounds.height - 0.5 floppyRef.current.style.setProperty('--floppy-x', `${x * -2 * FLOPPY_POINTER_TRAVEL}px`) floppyRef.current.style.setProperty('--floppy-y', `${y * -2 * FLOPPY_POINTER_TRAVEL}px`) } const resetFloppyPosition = () => { floppyRef.current?.style.removeProperty('--floppy-x') floppyRef.current?.style.removeProperty('--floppy-y') } return (
About Moi
) } function DemoDialogContent() { const { demoInstallUrl } = useAppConfig() return (
{/* Film grain keeps the illustration gradient from banding. */}
Set up your personal Moi This is a demo workspace. Sign in and connect your agent to unlock all features.
  • Create without limits building as many workspaces as you want
  • Share what you've built with anyone
  • Use your{' '} Claude {' '} or{' '} ChatGPT {' '} subscription and app connectors
} /> ) }