"use client"; import { Button, Group, Loader, Paper, Stack, Text, ThemeIcon } from "@mantine/core"; import { useReducedMotion } from "@mantine/hooks"; import { IconAlertTriangle, IconCheck, IconDatabaseImport, IconRefresh } from "@tabler/icons-react"; import { useI18n } from "@homarr/translation/client"; export type RestoreProgressStatus = "restoring" | "restarting" | "timedOut"; interface RestoreProgressPanelProps { active: boolean; status: RestoreProgressStatus; onRetry: () => void; onReload: () => void; } export const RestoreProgressPanel = ({ active, status, onRetry, onReload }: RestoreProgressPanelProps) => { const t = useI18n("management.page.tool.backup.restore"); const tCommon = useI18n("common"); const reduceMotion = useReducedMotion(); if (!active) return null; const isRestoring = status === "restoring"; const isTimedOut = status === "timedOut"; const statusLabel = isRestoring ? t("progress.title") : isTimedOut ? t("timeout.message") : t("progress.restarting"); return ( {isTimedOut ? ( ) : !isRestoring ? ( ) : reduceMotion ? ( ) : ( {isTimedOut ? ( ) : null} ); };