import { Check, Circle, Loader2 } from 'lucide-react' import { Card, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, cn } from 'ui' import { DATABASE_UPGRADE_STEPS } from './UpgradingState.constants' interface UpgradeStepsTableProps { /** * Current progress step (if actively upgrading) * When undefined, all steps are shown as pending */ progress?: string /** * Whether to show progress indicators * false = all steps pending (pre-upgrade view) * true = show current/completed step indicators */ showProgress: boolean } export const UpgradeStepsTable = ({ progress, showProgress }: UpgradeStepsTableProps) => { const progressStage = Number((progress || '').split('_')[0]) return ( Step Description Status {DATABASE_UPGRADE_STEPS.map((step, idx: number) => { const isCurrentStep = showProgress && step.key === progress const isCompletedStep = showProgress && progressStage > idx return (

{isCompletedStep && !isCurrentStep ? ( {step.title} ) : ( step.title )}

{step.offline && (

Project offline

)}
) })}
) } interface StepIndicatorProps { isCurrentStep: boolean isCompletedStep: boolean } const StepIndicator = ({ isCurrentStep, isCompletedStep }: StepIndicatorProps) => { if (isCurrentStep) { return (
) } if (isCompletedStep) { return (
) } return (
) }