const DEFAULT_LINKS = {
  primary: "https://t.me/binbhai",
  backup: "https://t.me/notyoursnaruto"
};

function applyAnchor(anchor, href) {
  if (!anchor) {
    return;
  }

  anchor.href = href;
  anchor.rel = "noopener noreferrer";
}

export function applyTelegramLinks(rootDocument = document) {
  applyAnchor(rootDocument.getElementById("telegramHeaderLink"), DEFAULT_LINKS.primary);
  applyAnchor(rootDocument.getElementById("telegramFooterLink1"), DEFAULT_LINKS.primary);
  applyAnchor(rootDocument.getElementById("telegramFooterLink2"), DEFAULT_LINKS.backup);
}
