{% load static sekizai_tags %}

{# Optionally load from the cdn #}
{#<script src="https://cc.cdn.civiccomputing.com/8/cookieControl-8.x.min.js"></script>#}

{% addtoblock 'js' %}
    <script async src="{% static 'django_cookie_control/cookie-control/cookieControl-8.x.min.js' %}"></script>
    <script async src="{% static 'django_cookie_control/js/cookie-enable-disable.js' %}"></script>
{% endaddtoblock %}


{% addtoblock 'js' %}
    {% if COOKIE_CONTROL_CONFIG %}
    <script type="text/javascript">
        $('document').ready(function() {
            var config = {{ COOKIE_CONTROL_CONFIG | safe }};
            CookieControl.load(config);
        });
   </script>
    {% endif %}
{% endaddtoblock %}
