// Copyright (C) 2026 Stefy Lanza <stefy@nexlab.net>
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyleft: this program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
const statusEl = document.getElementById('status');
setTimeout(() => {
  chrome.runtime.sendMessage({type:'ping'}, resp => {
    statusEl.textContent = resp.connected ? '● Connected to Hermes Node' : '○ Not connected (node agent not running)';
    statusEl.style.background = resp.connected ? '#e8f5e9' : '#fff3e0';
    statusEl.style.color = resp.connected ? '#2e7d32' : '#ef6c00';
  });
}, 500);
