<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
{% block sw_order_state_card_entry %}
<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
<div class="sw-order-state-history-card-entry">
    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_order_state_card_entry_headline %}
    <div>
        <h2 v-if="title">
            {{ title }}
        </h2>
    </div>
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_order_state_card_entry_history %}
    <div
        v-for="(entry, index) in history"
        :key="index"
        class="sw-order-state-card__history-entry"
        :class="`sw-order-state-history__entry--${index}`"
    >
        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_order_state_card_entry_icon %}
        <sw-label
            appearance="circle"
            :class="getBackgroundColorFromState(entry.state.technicalName)"
        >
            <sw-icon
                :name="getIconFromState(entry.state.technicalName)"
                :class="getIconColorFromState(entry.state.technicalName)"
                size="16"
            />
        </sw-label>
        {% endblock %}

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_order_state_card_entry_description %}
        <span class="sw-order-state-card__text">{{ entry.state.translated.name }}</span>
        {% endblock %}

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_order_state_card_entry_date %}
        <span
            v-tooltip="{
                showDelay: 300,
                message:userDisplayName(entry.user)
            }"
            class="sw-order-state-card__date"
        >
            {{ dateFilter(entry.createdAt, { hour: '2-digit', minute: '2-digit' }) }}
        </span>
        {% endblock %}

    </div>
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_order_state_card_entry_state_select %}
    <sw-order-state-select
        :transition-options="transitionOptions"
        :disabled="disabled"
        v-on="listeners"
    />
    {% endblock %}

</div>
{% endblock %}
