{% extends 'base.html' %}
{% load static %}

{% block content %}

    <div class="tab-content pt-2 extra-tab">
        <div id="app" class="tab-pane active">
        </div>
    </div>

{% endblock content %}

{% block javascript %}

    <script src="{% static 'js/surface_detail_app.bundle.js' %}"></script>
    <script>
        const params = new URLSearchParams(window.location.search);
        const surfaceId = Number.parseInt(params.get('surface'));
        const surfaceUrl = `${window.location.origin}/manager/api/surface/${surfaceId}/`;
        topobank.surface_detail_app.createSurfaceDetailApp('#app', '{{ csrf_token }}', {
            surfaceUrl: surfaceUrl
        });
    </script>

{% endblock javascript %}
