);
}
/**
* Bookings from forwarded mails that wait for the person: one row each with
* what TREK read, why it waits, the trip it suggests, and the ways out (add,
* choose a trip, keep the mail as a document, fill in the form, read again with
* AI, discard). Mounted once by the layout; opened from the account menu, the
* settings card or a notification.
*/
export default function MailInboxDialog(): ReactElement | null {
const { t } = useTranslation();
const inbox = useMailInbox();
const titleId = useId();
if (!inbox.open) return null;
const header = (
}
tint={NEUTRAL_TINT}
labelId={titleId}
onClose={inbox.close}
title={t('mailInbox.title')}
// The empty state below says it already; the head only counts what waits.
sub={inbox.pending > 0 ? t('mailInbox.pendingCount', { count: inbox.pending }) : undefined}
/>
);
return (
{inbox.picking ? (
) : inbox.preview ? (