"use client" import { useEffect, useMemo, useState } from "react" import { SECURITY_PRESETS, getSecurityPreset, type OpenShellPolicyShape, type SecurityPresetId } from "../lib/securityPresets" type LandlockCompatibility = "best_effort" | "hard_requirement" type EndpointProtocol = "" | "rest" type EndpointTls = "" | "terminate" | "passthrough" type EndpointEnforcement = "" | "enforce" | "audit" type EndpointAccess = "" | "read-only" | "read-write" | "full" interface NetworkRule { method: string; path: string } interface NetworkEndpoint { host: string; port: string; protocol: EndpointProtocol; tls: EndpointTls; enforcement: EndpointEnforcement; access: EndpointAccess; rules: NetworkRule[] } interface NetworkBinary { path: string } interface NetworkPolicyBlock { key: string; name: string; endpoints: NetworkEndpoint[]; binaries: NetworkBinary[] } type OpenShellPolicy = OpenShellPolicyShape type BlueprintOption = { id: string label: string description: string type: "blueprint" | "custom" source: string supportsTailscale?: boolean } interface ConfigurationPanelProps { sandboxId: string mode?: 'existing' | 'create' onCreateSuccess?: (sandboxId: string) => void | Promise } function FieldHelp({ text }: { text: string }) { return ?{text} } function Badge({ children, tone }: { children: React.ReactNode; tone: "dynamic" | "static" | "danger" }) { const cls = tone === "dynamic" ? "bg-[rgba(118,185,0,0.12)] text-[var(--nvidia-green)] border-[rgba(118,185,0,0.35)]" : tone === "danger" ? "bg-[rgba(220,38,38,0.12)] text-red-400 border-[rgba(220,38,38,0.35)]" : "bg-[rgba(245,158,11,0.10)] text-amber-400 border-[rgba(245,158,11,0.35)]" return {children} } function TextListEditor({ label, tooltipText, value, onChange, placeholder }: { label: string; tooltipText: string; value: string[]; onChange: (v: string[]) => void; placeholder: string }) { return