import { Collapsible } from "@kobalte/core/collapsible" import { type ComponentProps, type JSX, Show, createMemo, splitProps } from "solid-js" import "./tool-error-card-v2.css" function BanIcon() { return ( ) } /** duo-progress-25: faint track ring + ~25% solid arc (Figma OpenCode DS) */ function LoaderIcon() { const r = 5.9 return ( ) } function ChevronIcon() { return ( ) } export interface ToolErrorCardV2Props extends Omit, "children" | "title"> { title: JSX.Element | string subtitle: JSX.Element | string suffix?: JSX.Element | string loading?: boolean open?: boolean defaultOpen?: boolean onOpenChange?: (open: boolean) => void /** When set, subtitle renders as a link (clicks do not toggle expand). */ subtitleHref?: string } export function ToolErrorCardV2(props: ToolErrorCardV2Props) { const [local, rest] = splitProps(props, [ "title", "subtitle", "suffix", "loading", "open", "defaultOpen", "onOpenChange", "subtitleHref", "class", "classList", ]) const hasSuffix = createMemo(() => { const s = local.suffix if (s == null) return false if (typeof s === "string") return s.length > 0 return true }) return ( }>
{local.title} {local.subtitle}} > e.stopPropagation()} onPointerDown={(e) => e.stopPropagation()} > {local.subtitle}
{local.suffix}
) }