{# Requirements #}
{# Render #}
{% extends "./layout/default.j2" %}
{% block name %}{{ global.location.entity.id.asString() }} Documentation{% endblock %}
{% block type %}documentation{% endblock %}
{% block menu %}
    <a href="{{ global.urls.resolveEntityId(global.location.entity.id, '/examples') }}" class="navigation examples" data-tooltip="Show examples" data-position="bottom left">
        <i class="desktop icon"></i>
    </a>
    <div class="navigation documentation active">
        <i class="file text outline icon"></i>
    </div>
{% endblock %}
{% block content %}
    {% set documentation = global.location.entity.properties.get('documentation') %}
    {% if documentation and documentation.confluence %}
        <iframe class="external documentation" src="{{ documentation.confluence }}"/>
    {% else %}
        <div class="internal documentation">
            {{ global.location.entity.documentation.getFirstByType(DocumentationType.TEXT)|markdown }}
        </div>
    {% endif %}
{% endblock %}
{% block bottom %}
{% endblock %}
