{# @copyright   Copyright (C) 2010-2024 Combodo SAS #}
{# @license     http://opensource.org/licenses/AGPL-3.0 #}
{% extends 'base/components/panel/layout.html.twig' %}

{% block iboPanelMetaData %}
    data-object-class="{{ oUIBlock.GetClassName() }}"
    data-object-id="{{ oUIBlock.GetObjectId() }}"
    data-object-mode="{{ oUIBlock.GetObjectMode() }}"
    {% if oUIBlock.HasStatus() %}data-object-state="{{ oUIBlock.GetStatusCode() }}"{% endif %}
    data-role="{{ oUIBlock.GetBlockCode() }}"
{% endblock %}

{% block iboPanelSubTitle %}
    {% if oUIBlock.GetStatusLabel() is not empty %}
        <span class="ibo-object-details--status" data-role="ibo-object-details--status" data-status-code="{{ oUIBlock.GetStatusCode() }}">
            <span class="ibo-object-details--status-dot" data-role="ibo-object-details--status-dot" style="background-color: {{ oUIBlock.GetStatusColor() }};"></span>
            <span class="ibo-object-details--status-label" data-role="ibo-object-details--status-label">{{ oUIBlock.GetStatusLabel() }}</span>
        </span>
    {% endif %}
    <span class="ibo-object-details--object-class" data-role="ibo-object-details--object-class">
        {% if is_backoffice_menu_enabled('DataModelMenu') %}
            <a href="{{ get_absolute_url_app_root() }}pages/schema.php?operation=details_class&class={{ oUIBlock.GetClassName() }}" target="_blank" data-tooltip-content="{{ 'UI:Layout:ObjectDetails:DatamodelSchemaLink:Tooltip' | dict_s }}" data-tooltip-html-enabled="true">{{ oUIBlock.GetClassLabel() }}</a>
        {% else %}
            {{ oUIBlock.GetClassLabel() }}
        {% endif %}
    </span>
    {{ parent() }}
{% endblock %}