// frontend/components/mail/MailList.tsx — 가운데 메일 목록 (헤더 + 검색 + 행) "use client"; import { Icon } from "@/components/Icon"; import type { EmailRow, MailAccount, Person } from "@/lib/types"; import { MailRow } from "./MailRow"; export function MailList({ title, metaLabel, count, folder, focusedUnread, othersUnread, onSelectTab, query, syncing, emails, people, accounts, selId, hasSel, selected, onToggleSelect, onClearSelected, onBulk, onQuery, onSync, onOpen, onStar, accColor, }: { title: string; metaLabel: string; count: number; folder: string; focusedUnread: number; othersUnread: number; onSelectTab: (slug: string) => void; query: string; syncing: boolean; emails: EmailRow[]; people: Record; accounts: Record; accColor: (id: string) => string; selId: string | null; hasSel: boolean; selected: Set; onToggleSelect: (id: string) => void; onClearSelected: () => void; onBulk: (action: string) => void; onQuery: (q: string) => void; onSync: () => void; onOpen: (id: string) => void; onStar: (id: string) => void; }) { const selCount = selected.size; // 받은편지함은 집중(Focused)/기타(Others) 탭으로 분할 — Gmail 기본/Outlook focused = 집중. const showTabs = folder === "inbox" || folder === "others"; return (
{title} {metaLabel} {count}통
{showTabs && (
)}
onQuery(e.target.value)} placeholder="메일 검색…" aria-label="메일 검색" />
{selCount > 0 && (
{selCount}개 선택
)}
{emails.map((m) => (
onOpen(m.id)} onStar={onStar} />
))} {emails.length === 0 && (

메일이 없어요

이 보기에 표시할 메일이 없습니다.

)}
); }