function connectionStatus(options) {
  const state = options || {};
  if (state.connectionsEnabled === false) {
    return 'Paused';
  }
  const connectedCount = Math.max(0, Number(state.connectedCount || 0));
  if (connectedCount === 1) {
    return 'Connected to 1 Mac';
  }
  if (connectedCount > 1) {
    return `Connected to ${connectedCount} Macs`;
  }
  return 'Ready';
}

module.exports = {
  connectionStatus,
};
