/* Copyright 2026 Marimo. All rights reserved. */
import { AlertCircleIcon, CheckIcon, CircleIcon } from "lucide-react";
import type { ReactNode } from "react";
import { Spinner } from "@/components/icons/spinner";
import { cn } from "@/utils/cn";
export type ProgressState = "waiting" | "running" | "succeeded" | "failed";
export interface ProgressStage {
id: string;
state: ProgressState;
title: string;
description: string;
details?: ReactNode;
}
export function ProgressStatusIcon({
state,
variant = "icon",
}: {
state: ProgressState;
variant?: "icon" | "dot";
}) {
if (variant === "dot") {
return (
);
}
const Icon = {
waiting: CircleIcon,
running: Spinner,
succeeded: CheckIcon,
failed: AlertCircleIcon,
}[state];
return (
{stage.description}
{stage.details}