'use client' import { useNoteEditorContext } from './note-editor-context' import { LabelBadge } from '../label-badge' import { GhostTags } from '../ghost-tags' import { cn } from '@/lib/utils' export function NoteMetadataSection() { const { state, actions, readOnly, globalLabels } = useNoteEditorContext() const getLabelType = (name: string): 'ai' | 'user' => { const found = globalLabels.find(l => l.name.toLowerCase() === name.toLowerCase()) return (found as any)?.type === 'ai' ? 'ai' : 'user' } return (