import { useT } from "../../i18n"; import type { DraftOut, RemoteDraftOut } from "../../lib/types"; function timeLabel(iso: string): string { const d = new Date(iso); const now = new Date(); if (d.toDateString() === now.toDateString()) return d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }); return d.toLocaleDateString([], { month: "short", day: "numeric" }); } function DraftRow({ recipients, subject, preview, time, badge, onClick, }: { recipients: string; subject: string; preview: string; time: string; badge?: string; onClick: () => void; }) { return ( ); } // The Drafts folder lists local drafts (the `drafts` table) plus drafts found in // the account's IMAP Drafts folder that were created on another client. export function DraftsList({ drafts, remoteDrafts, onOpen, onOpenRemote, }: { drafts: DraftOut[]; remoteDrafts: RemoteDraftOut[]; onOpen: (draft: DraftOut) => void; onOpenRemote: (draft: RemoteDraftOut) => void; }) { const t = useT(); if (drafts.length === 0 && remoteDrafts.length === 0) { return