'use client' import { motion } from 'motion/react' import { Clock, ChevronRight, Play, PenLine } from 'lucide-react' import { useLanguage } from '@/lib/i18n' import { DashboardWidgetTitleRow } from '@/components/dashboard-widget-title-row' export interface ResumeNote { id: string title: string | null excerpt: string notebookName: string notebookColor: string updatedAt: string notebookId: string | null } export interface DashboardResumeHeroProps { notes: ResumeNote[] loading?: boolean onSelect: (id: string, notebookId: string | null) => void onCaptureFocus?: () => void formatRelativeTime: (date: string) => string prefersReducedMotion?: boolean } export function DashboardResumeHero({ notes, loading, onSelect, onCaptureFocus, formatRelativeTime, prefersReducedMotion, }: DashboardResumeHeroProps) { const { t } = useLanguage() const hero = notes[0] const rest = notes.slice(1, 6) if (loading) { return (
) } return (
} title={t('homeDashboard.continue')} className="mb-2" />
{!hero ? (

{t('homeDashboard.resumeEmptyHint')}

{onCaptureFocus && ( )}
) : ( <> onSelect(hero.id, hero.notebookId)} className="w-full text-start px-5 pb-3 group cursor-pointer" >
{hero.notebookName} {formatRelativeTime(hero.updatedAt)}

{hero.title || t('homeDashboard.untitled')}

{hero.excerpt ? (

{hero.excerpt}

) : null}
{t('homeDashboard.resumeOpen')}
{rest.length > 0 && (

{t('homeDashboard.resumeAlso')}

{rest.map(note => ( ))}
)} )}
) }