/* Copyright 2026 Marimo. All rights reserved. */ import type { PropsWithChildren } from "react"; import type { DisplayConnectionNotice } from "@/core/network/useConnectionNotice"; import { cn } from "@/utils/cn"; import { ConnectionStatusIcon, hasStartupStages, StartupProgress, } from "./startup-progress"; export function ConnectionErrorOutput({ error }: { error: string }) { return (
      {error}
    
); } export function ConnectionDetails({ notice, surface = "sidebar", children, }: PropsWithChildren<{ notice: DisplayConnectionNotice; surface?: "notebook" | "sidebar"; }>) { const showSteps = hasStartupStages(notice); const failed = !notice.pending && !notice.ready; return (
{showSteps ? ( ) : (

{notice.title}

)} {(failed || (!showSteps && surface === "notebook")) && (

{notice.description}

)} {notice.error && (surface === "sidebar" || !notice.sandbox) && ( )} {children}
); }