<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
{% block sw_settings_logging_entry_info_tab_items %}

<sw-tabs-item
    class="sw-settings-logging-mail-sent-info__tab-item"
    :active="activeTab === 'html'"
    @click="activeTab = 'html'"
>
    {{ $tc('sw-settings-logging.mailInfo.tabHTML') }}
</sw-tabs-item>

<sw-tabs-item
    class="sw-settings-logging-mail-sent-info__tab-item"
    :active="activeTab === 'plain'"
    @click="activeTab = 'plain'"
>
    {{ $tc('sw-settings-logging.mailInfo.tabPlain') }}
</sw-tabs-item>

{% parent() %}
{% endblock %}

<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
{% block sw_settings_logging_entry_info_content %}

{% parent() %}

<template v-if="activeTab === 'html' || activeTab === 'plain'">
    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_settings_logging_mail_sent_content_recipients %}
    <div class="sw-settings-logging-mail-sent-info__recipients">
        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_settings_logging_mail_sent_content_recipients_title %}
        <span>{{ $tc('sw-settings-logging.mailInfo.recipientsTitle') }}: {{ recipientString }}</span>
        {% endblock %}
    </div>
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_settings_logging_mail_sent_content_mailbody %}
    <div>
        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_settings_logging_mail_sent_content_mailbody_title %}
        <span>{{ $tc('sw-settings-logging.mailInfo.contentsTitle') }}:</span>
        {% endblock %}

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_settings_logging_mail_sent_content_mailbody_html %}
        <div
            v-if="activeTab === 'html'"
            class="sw-settings-logging-mail-sent-info__mail-content"
            v-html="logEntry.context.additionalData.contents['text/html']"
        ></div>
        {% endblock %}

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_settings_logging_mail_sent_content_mailbody_plain %}
        <div
            v-if="activeTab === 'plain'"
            class="sw-settings-logging-mail-sent-info__mail-content"
        >
            {{ logEntry.context.additionalData.contents['text/plain'] }}
        </div>
        {% endblock %}
    </div>
    {% endblock %}
</template>

{% endblock %}
