'use client'; /** * Canvas Area * * Central area where blocks appear. Shows empty state when no block is active. */ import { AnimatePresence, motion } from 'framer-motion'; import { useCortexStore } from '@/stores/cortex-store'; import type { BlockType, BlockPrefillData } from '@/stores/cortex-store'; import { DagnotatieBlock } from '../blocks/dagnotitie-block'; import { ZoekenBlock } from '../blocks/zoeken-block'; import { OverdrachtBlock } from '../blocks/overdracht-block'; import { IntakeStatusBlock } from '../blocks/intake-status-block'; import { RisicoBlock } from '../blocks/risico-block'; import { DiagnoseBlock } from '../blocks/diagnose-block'; import { PatientContextCard } from '../blocks/patient-context-card'; import { FallbackPicker } from '../blocks/fallback-picker'; export function CanvasArea() { const { activeBlock, prefillData, activePatient } = useCortexStore(); function renderBlock(blockType: BlockType, prefill: BlockPrefillData) { switch (blockType) { case 'dagnotitie': return ; case 'zoeken': return ; case 'overdracht': return ; // Intake blocks (MVP) case 'intake_status': return ; case 'risico_query': return ; case 'diagnose_query': return ; case 'fallback': return ; default: return null; } } // Block animations volgens UX specificatie (sectie 11.1): // Openen: Slide up + fade in (200ms), Scale: 0.95 → 1.0 // Sluiten: Slide down + fade out (200ms), Scale: 1.0 → 0.95 const blockAnimations = { initial: { opacity: 0, y: 20, scale: 0.95 }, animate: { opacity: 1, y: 0, scale: 1, transition: { duration: 0.2, ease: [0.4, 0, 0.2, 1] as [number, number, number, number], }, }, exit: { opacity: 0, y: 20, // Slide down (niet omhoog) scale: 0.95, transition: { duration: 0.2, ease: [0.4, 0, 0.2, 1] as [number, number, number, number], }, }, }; return (
{activeBlock ? ( {renderBlock(activeBlock, prefillData)} ) : activePatient ? ( ) : ( )}
); } function EmptyState() { return (

Wat wil je doen?

Typ of spreek je intentie

⌘K om te focussen

); } function ExampleCommand({ icon, text }: { icon: string; text: string }) { return (
{icon} "{text}"
); }