/** Settings → Standby Helper: switches of the separate `ch-j-standby-helper` (menu entries, login, background). */
import { call } from "../transport";

export interface StandbyMonitor { enabled: boolean; intervalSecs: 30 | 60 | 300; check: "ssh" | "https" | "custom"; customPort: number; showAddresses: boolean }
export interface StandbySettings { enabled: boolean; startAtLogin: boolean; menu: { verify: boolean; sign: boolean }; monitor?: StandbyMonitor }
export interface StandbyState { settings: StandbySettings; status: Record<string, unknown> }

export const standby = Object.freeze({
  get: () => call<StandbyState>("core_standby_get", "standby:get"),
  set: (settings: StandbySettings) => call<StandbyState>("core_standby_set", "standby:set", settings)
});
