import { AnimatePresence, motion } from 'motion/react'; import type { ReactNode } from 'react'; import { CHROME_ICONS, getNineSliceStyle, UI_CHROME } from '../uiAssets'; import { PixelIcon } from './PixelIcon'; interface CustomWorldCreatorModalProps { isOpen: boolean; draft: string; onDraftChange: (value: string) => void; onClose: () => void; onSubmit: () => void; isGenerating: boolean; progress: number; progressLabel: string; error: string | null; } interface CharacterDraftModalProps { isOpen: boolean; characterLabel: string; draftName: string; draftBackstory: string; onNameChange: (value: string) => void; onBackstoryChange: (value: string) => void; onClose: () => void; onConfirm: () => void; error: string | null; } function ModalShell({ isOpen, title, subtitle, onClose, disableClose = false, children, }: { isOpen: boolean; title: string; subtitle?: string; onClose: () => void; disableClose?: boolean; children: ReactNode; }) { return ( {isOpen && ( event.stopPropagation()} >
{title}
{subtitle ? (
{subtitle}
) : null}
{children}
)}
); } export function CustomWorldCreatorModal({ isOpen, draft, onDraftChange, onClose, onSubmit, isGenerating, progress, progressLabel, error, }: CustomWorldCreatorModalProps) { return (