import React from 'react'; import PageContentBlock from '@/components/elements/PageContentBlock'; import { ArrowLeft, RefreshCw } from 'lucide-react'; import { cn } from '@/lib/cn'; import Button from '@/components/elements/Button'; import Icon from '@/components/elements/Icon'; import NotFoundSvg from '@/assets/images/not_found.svg'; import ServerErrorSvg from '@/assets/images/server_error.svg'; import ServerInstallSvg from '@/assets/images/server_installing.svg'; import ServerRestoreSvg from '@/assets/images/server_restore.svg'; /** The panel's illustrations for a `ScreenBlock`. */ export const screenImages = { error: ServerErrorSvg, installing: ServerInstallSvg, notFound: NotFoundSvg, restoring: ServerRestoreSvg, } as const; interface BaseProps { title: string; image: string; message: string; className?: string; onRetry?: () => void; onBack?: () => void; } interface PropsWithRetry extends BaseProps { onRetry?: () => void; onBack?: never; } interface PropsWithBack extends BaseProps { onBack?: () => void; onRetry?: never; } export type ScreenBlockProps = PropsWithBack | PropsWithRetry; const ActionButton = ({ className, ...props }: React.ComponentProps) => (