"use client"; import { InfoBanner, SectionDivider, Toggle, } 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 { RefreshCw } from "@/components/icons/platform-icons"; import { cn } from "@/lib/utils"; type UpdatesSectionProps = { data: SettingsBackend["updates"]; capabilities: SettingsBackend["capabilities"]["updates"]; onCheckForUpdates: () => void; onApplyUpdate: () => void; autoCheckEnabled: boolean; onToggleAutoCheck: (enabled: boolean) => void; }; export function UpdatesSection({ data, capabilities, onCheckForUpdates, onApplyUpdate, autoCheckEnabled, onToggleAutoCheck, }: UpdatesSectionProps) { const hasUpdate = data.updateAvailable && !!data.latestVersion; const lastCheckedLabel = data.checkedAt ? new Date(data.checkedAt).toLocaleString() : "Never"; return (