{% comment %}
    Partial for definitions to be displayed inline in the sidebar
{% endcomment %}
<div id="{{node.markup_id}}" class="open-definition" tabindex="0">
    <header class="group">
       <h4 tabindex="0">Defined Term</h4>
       <a href="#" tabindex="0" class="close-button">
           <span class="icon-text">Close definition</span>
       </a>
    </header>

    {% comment %}
        Used to display scope warnings
    {% endcomment %}
    <div class="definition-warning hidden group">
        <span class="cf-icon cf-icon-error icon-warning"></span>
        <div class="msg">
        </div>
    </div>

    <div class="definition-text">
        {% if node.children %}
            <p>
                This definition is best viewed in its original location.
            </p>
        {% elif node.marked_up %}
            <p>
                {{node.marked_up|safe}}
            </p>
        {% endif  %}

        <a  href="{% url 'chrome_section_view' node.section_id version %}#{{node.label_id}}"
            class="full-def internal"
            data-linked-section="{{node.label_id}}">{{formatted_label}}</a>

        {% if not node.children %}
            {% if node.interp %}
                {% with interp=node.interp.interps.0 %}
                <a  href="{% url 'chrome_subterp_view' interp.section_id version %}#{{ interp.label_id }}"
                    data-linked-subsection="{{ interp.label_id }}"
                    data-linked-section="{{ interp.section_id }}"
                    class="internal interp">Official Interpretation</a>
                {% endwith %}
            {% endif %}
        {% endif %}
    </div>

</div>
