import type { SetupCheckItem } from "../(partials)/setup-check-status-item"; import type { SystemSetupStatus } from "../(hooks)/use-system-setup-status"; type Params = { setup_status: SystemSetupStatus; }; export default function buildSetupRuntimeChecks({ setup_status }: Params): SetupCheckItem[] { return [ { key: "kernel-module", title: "WireGuard kernel module", subtitle: "/sys/module/wireguard", ok: setup_status.wg_module_loaded, ok_label: "Loaded", }, { key: "wg-quick-helper", title: "wg-quick manage helper", subtitle: `/var/lib/wgui/scripts/wg-quick-manage.sh`, ok: setup_status.wg_quick_helper_installed, ok_label: "Installed", }, ...setup_status.lib_dirs.map((dir) => ({ key: dir.path, title: `Runtime directory ยท ${dir.label}`, subtitle: dir.path, ok: dir.exists, ok_label: "Exists", })), ]; }