| 1 | import { Archive } from "lucide-react"; |
| 2 | import type { SessionMeta } from "../lib/types"; |
| 3 | import { useT } from "../lib/i18n"; |
| 4 | import { ManagementPageShell } from "./ManagementPageShell"; |
| 5 | import { ArchivedSessionsList } from "./ArchivedSessionsList"; |
| 6 | import "./TrashPage.css"; |
| 7 | |
| 8 | export function TrashPage({ active, onBack, list, restore, purge, onOpenSession }: { |
| 9 | onOpenSession: React.ComponentProps<typeof ArchivedSessionsList>["onOpenSession"]; |
| 10 | active: boolean; onBack: () => void; list: () => Promise<SessionMeta[]>; |
| 11 | restore: (path: string) => Promise<void>; purge: (path: string) => Promise<void>; |
| 12 | }) { |
| 13 | const t = useT(); |
| 14 | return <ManagementPageShell active={active} onBack={onBack} className="trash-center" |
| 15 | title={t("history.trashTitle")} description={t("history.archiveExplanation")}> |
| 16 | <div className="trash-center__heading"> |
| 17 | <div><span className="trash-center__eyebrow"><Archive size={16} />{t("history.trashTitle")}</span> |
| 18 | <h2>{t("history.archivedConversations")}</h2> |
| 19 | <p>{t("history.archiveExplanation")}</p> |
| 20 | </div> |
| 21 | </div> |
| 22 | <div className="trash-center__body"> |
| 23 | <ArchivedSessionsList active={active} onOpenSession={onOpenSession} legacyList={list} legacyRestore={restore} legacyPurge={purge} /> |
| 24 | </div> |
| 25 | </ManagementPageShell>; |
| 26 | } |
| 27 |