<div class="np-learning-path-completed-banner np-learning-path-banner">
  <img class="np-learning-path-banner-image" src="https://s3.amazonaws.com/static.northpass.com/images/stars-completed.svg" />
  <div class="np-learning-path-banner-content">
    <h3 class="np-learning-path-banner-headline">
      <span class="lang-en">Congratulations!</span>
      <span class="lang-es">¡Felicid  ades!</span>
    </h3>
    <p class="np-learning-path-banner-description">
      <span class="lang-en">You've completed this learning path.</span>
      <span class="lang-es">¡Has completado esta ruta de aprendizaje!</span>
    </p>
    <div class="np-learning-path-banner-actions">
      {% if learning_path.certificate_link %}
        <a href="{{ learning_path.certificate_link }}" class="np-learning-path-banner-action np-learning-path-banner-action--primary">
          <span class="lang-en">View Certificate</span>
          <span class="lang-es">Ver certificado</span>
        </a>
      {% endif %}
      <a href="/app/learning_paths" class="np-learning-path-banner-action np-learning-path-banner-action--secondary">
        <span class="lang-en">Explore More Learning Paths</span>
        <span class="lang-es">Explorar más rutas de aprendizaje</span>
      </a>
    </div>
  </div>
</div>

<script>
  document.addEventListener('DOMContentLoaded', function() {
    const url = window.location.href.split('/');
    const pathId = url[url.length - 2];
    if (pathId === '20f0173e-1d4d-4b46-b652-548277a21bf8') {
      fetch('https://webhooks.workato.com/webhooks/rest/a542031c-264f-4ab7-a43b-3d79da6e4def/carrot-academy-saw-completion', {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({
          path: pathId,
          user: '{{current_person.id}}'
        })
      });
    }
  });
</script>