import { useRef, useState } from "react"; import { downloadBlob } from "../../lib/download"; import { useCopy } from "../../ui/copy"; import { channelErrorPresentation } from "../../components/error-presentation"; import { roomRestoreRecovery, type RoomRestoreRecovery } from "../hosting-api"; import { ChannelAction } from "./ChannelAction"; import { ChannelSettingsError } from "./ChannelSettingsDialog"; import { useSettingsAction } from "../../ui/use-settings-action"; export function RoomRestoreResult({ message, unconfirmed = false, onClose }: { message: string; unconfirmed?: boolean; onClose?: () => void; }) { const { t } = useCopy(); return
{message}
{onClose &&{t(kind === "domain" ? "channel.backupControls.siteScopeNote" : "channel.backupControls.roomScopeNote")}
{available && !file &&{file.name}
{kind === "domain" ? t("channel.backupControls.confirmSiteRestore") : replacing ? t("channel.backupControls.confirmRoomReplace") : t("channel.backupControls.confirmRoomRestore")}
{message}
}