function whatsAppWidget({ status, url, position }) {
  if (typeof status === 'undefined') {
    return;
  }

  const a = document.createElement('a');
  a.href = url;
  a.classList.add('footer-whatsapp', position);
  a.target = '_blank';
  a.style.zIndex = 100;

  const i = document.createElement('i');
  i.classList.add('fab', 'fa-whatsapp');

  a.append(i);
  document.body.append(a);
}

export default whatsAppWidget;
