"use client"; import { InfoBanner, SectionDivider } from "@/modules/settings/components/panel/controls"; import { SETTINGS_PANEL_INSET } from "@/modules/settings/components/panel/surface"; import type { SettingsBackend } from "@/modules/settings/components/panel/types"; import { cn } from "@/lib/utils"; type DockerSectionProps = { data: SettingsBackend["docker"]; capabilities: SettingsBackend["capabilities"]["docker"]; onPruneImages: () => Promise; onPruneVolumes: () => Promise; }; function StatCard({ label, value, valueClass }: { label: string; value: number | string; valueClass?: string }) { return (
{value} {label}
); } function InfoRow({ label, value, mono }: { label: string; value: string; mono?: boolean }) { return (
{label} {value}
); } function MaintenanceRow({ label, description, pending, disabled, disabledReason, onClick, }: { label: string; description: string; pending: boolean; disabled: boolean; disabledReason?: string; onClick: () => void; }) { return (
{label}
{description}
); } export function DockerSection({ data, capabilities, onPruneImages, onPruneVolumes }: DockerSectionProps) { return (
{data.warning && ( )} {/* ── Engine Status ── */}
{/* ── Maintenance ── */} {data.pruneImages.error && } {data.pruneVolumes.error && }
void onPruneImages()} /> void onPruneVolumes()} />
); }