{"size": 551, "ext": "js", "max_stars_repo_path": "permon/frontend/browser/src/status.js", "max_stars_repo_name": "bminixhofer/permon", "max_stars_repo_stars_event_min_datetime": "2018-04-03T00:26:57.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-08T12:05:07.000Z", "max_issues_repo_path": "permon/frontend/browser/src/status.js", "max_issues_repo_name": "bminixhofer/permon", "max_issues_repo_issues_event_min_datetime": "2018-03-31T11:57:00.000Z", "max_issues_repo_issues_event_max_datetime": "2021-03-08T23:04:38.000Z", "max_forks_repo_path": "permon/frontend/browser/src/status.js", "max_forks_repo_name": "bminixhofer/permon", "max_forks_repo_forks_event_min_datetime": "2018-04-18T19:18:52.000Z", "max_forks_repo_forks_event_max_datetime": "2020-08-29T05:54:22.000Z"}
{"max_stars_count": 25, "max_issues_count": 13, "max_forks_count": 6, "avg_line_length": 26.2380952381, "max_line_length": 62, "alphanum_fraction": 0.7295825771}
const statusBadge = document.querySelector('.status-badge');
const errorMessage = document.querySelector('.error-message');

export function setStatus(connected) {
  if (connected) {
    statusBadge.textContent = 'Connected';
    statusBadge.classList.add('connected');
  } else {
    statusBadge.textContent = 'Not Connected';
    statusBadge.classList.remove('connected');
  }
}

export function setErrorMessage(message) {
  errorMessage.textContent = `Error: ${message}`;
}

export function clearErrorMessage() {
  errorMessage.textContent = '';
}
