// VA-P23 interim-UI (AD-28) — mailbox connect settings screen composed from // ~/ui: PageShell header, provider connect actions, mailbox cards with status // badge, initial-sync progress and Klartext errors. Presentational; the route // owns loader/action, mutations POST via plain Forms (csrf prop, same pattern // as CalendarConnectionsPage). Final Subframe optics = tracked design-nachzug. import { Form } from "react-router"; import { useTranslation } from "react-i18next"; import { FeatherMail, FeatherPlus } from "@subframe/core"; import type { EmailMailboxListVM, EmailMailboxRow, EmailMailboxStatus } from "@hivegrid/view-models"; import { Alert } from "~/ui/components/Alert"; import { BadgeFeedback } from "~/ui/components/BadgeFeedback"; import { Button } from "~/ui/components/Button"; import { EmptyState } from "~/ui/components/EmptyState"; import { useLocaleFormatters } from "~/locale/format"; import { PAGE_HEADER_ICON_CLASS, PageBackLink, PageBody, PageHeader, PageIntro, PageShell } from "../shared/PageShell"; export type EmailMailboxSettingsPageProps = { vm: EmailMailboxListVM; csrf: string | null; flash: "connected" | "error" | null; /** Path back to the integrations catalog (settings/integrations). */ backHref: string; /** Inside the Erweiterungen hub (AK-SET-01) the hub owns the header. */ embedded?: boolean; }; function statusBadgeTone(status: EmailMailboxStatus): "subtle-positive" | "subtle-negative" | "subtle-neutral" { if (status === "active") return "subtle-positive"; if (status === "error" || status === "revoked") return "subtle-negative"; return "subtle-neutral"; } function MailboxCard({ row, csrf }: { row: EmailMailboxRow; csrf: string | null }) { const { t } = useTranslation(); const formatters = useLocaleFormatters(); return (