import type { HTMLAttributes, ReactNode } from "react"; import { ProgressBar, type ProgressBarProps } from "./ProgressBar.js"; import { cn } from "./cn.js"; export interface ResourceRowProps extends Omit, "title"> { title: ReactNode; icon?: ReactNode; description?: ReactNode; metadata?: ReactNode; status?: ReactNode; statusPlacement?: "leading" | "trailing"; actions?: ReactNode; progress?: Pick; } /** Compact resource presentation extracted from Mission Core AI Inference. * Actions stay canonical controls; the row itself is not a nested button. */ export function ResourceRow({ title, icon, description, metadata, status, statusPlacement = "trailing", actions, progress, className, ...props }: ResourceRowProps) { const leadingStatus = !progress && !!status && statusPlacement === "leading"; return
{icon ? : null} {leadingStatus ?
{status}
: null}
{title} {description ? {description} : null} {metadata ? {metadata} : null}
{progress ? : null} {!progress && status && statusPlacement === "trailing" ?
{status}
: null} {actions ?
{actions}
: null}
; } export function ResourceList({ className, children, ...props }: HTMLAttributes) { return
    {children}
; }