'use client' import { useNoteEditorContext } from './note-editor-context' import { TitleSuggestions } from '@/components/title-suggestions' import { Loader2, Sparkles } from 'lucide-react' import { useLanguage } from '@/lib/i18n' import { cn } from '@/lib/utils' import { toast } from 'sonner' export function NoteTitleBlock() { const { state, actions, readOnly, fullPage } = useNoteEditorContext() const { t } = useLanguage() if (fullPage) { // Adaptive font size: short = big editorial, long = smaller but still premium const titleLen = (state.title || '').length const titleSizeClass = titleLen === 0 ? 'text-5xl md:text-6xl' : titleLen < 40 ? 'text-5xl md:text-6xl' : titleLen < 70 ? 'text-4xl md:text-5xl' : titleLen < 100 ? 'text-3xl md:text-4xl' : 'text-2xl md:text-3xl' return (