{% load i18n %}
<script>
    define('resource-layer-info', [], function () {
        return {
            "all": {
                id: "all",
                icon: "mega-octicon octicon-location arches-layer-icon",
                name: "{% trans 'HistoricPlacesLA Resources' %}",
                description: "{% trans 'All HistoricPlacesLA resources...' %}",
                categories: [
                    "{% trans 'resource' %}"
                ],
                onMap: true,
                vectorColor: "#C4171D",
                iconColor: "#C4171D"
            },
            {% for type, type_data in resource_types %}
            {% if type_data.has_layer %}
            "{{type}}": {
                id: "{{type_data.resourcetypeid}}",
                icon: "mega-octicon octicon-location arches-layer-icon",
                name: "{{type_data.name}}",
                description: "{{type_data.description}}",
                categories: [
                    {% for category in type_data.categories %}
                    "{{category}}"
                    {% endfor %}
                ],
                {% if type_data.on_map %}
                onMap: true,
                {% else %}
                onMap: false,
                {% endif %}
                vectorColor: "{{type_data.vector_color}}",
                iconColor: "{{type_data.vector_color}}"
            },
            {% endif %}
            {% endfor %}
        };
    });
</script>