import CodeBlock from "@/src/components/twui/elements/CodeBlock"; import Row from "@/src/components/twui/layout/Row"; import Span from "@/src/components/twui/layout/Span"; import Stack from "@/src/components/twui/layout/Stack"; import StatusDot, { type StatusTone } from "@/src/components/general/status-dot"; import type { FirewallRuleKind, FirewallRuleInfo, } from "@/src/functions/backend/firewall/grab-firewall-status"; const KIND_META: Record = { required: { label: "Active", tone: "success" }, temporary: { label: "Temporary", tone: "warning" }, orphaned: { label: "Orphaned", tone: "error" }, other: { label: "Unmanaged", tone: "neutral" }, }; type Props = { rule: FirewallRuleInfo; }; export default function FirewallRuleRow({ rule }: Props) { const meta = KIND_META[rule.kind]; return ( {rule.description} {rule.delete_command ? ( {`# remove rule\n${rule.delete_command}`} ) : null} ); }