/* Copyright 2026 Marimo. All rights reserved. */ import { useAtom, useAtomValue } from "jotai"; import { ChevronDownIcon } from "lucide-react"; import { connectionNoticeAtom } from "@/core/network/connection-notice"; import { sandboxAtom } from "@/core/packages/sandbox-state"; import { cn } from "@/utils/cn"; import type { PanelSection } from "./panel-context"; import { sandboxDetailsExpandedAtom } from "./sandbox-details-state"; export function SandboxToggle({ section }: { section: PanelSection }) { const sandbox = useAtomValue(sandboxAtom); const notice = useAtomValue(connectionNoticeAtom); const [expanded, setExpanded] = useAtom(sandboxDetailsExpandedAtom); if (!sandbox?.backend) { return null; } const status = notice ? (notice.pending ? "pending" : "error") : "healthy"; return ( ); }