<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
{% block sw_condition_and_container %}
<div
    class="sw-condition-and-container"
    :class="containerRowClass"
>
    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_condition_and_container_children %}
    <template
        v-for="(child, index) in condition[childAssociationField]"
        :key="index"
    >
        <div
            v-if="index > 0"
            class="condition-content__spacer--and"
        >
            {{ $tc('global.sw-condition.condition.and') }}
        </div>

        <sw-condition-tree-node
            :parent-condition="condition"
            :condition="child"
            :disabled="disabled || undefined"
            :level="level + 1"
        />
    </template>
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_condition_and_container_actions %}
    <div class="sw-condition-and-container__actions">
        <sw-button
            v-tooltip.bottom="getNoPermissionsTooltip('product_stream.editor')"
            variant="ghost"
            size="small"
            class="sw-condition-and-container__actions--and"
            :disabled="disabled"
            @click="onAddPlaceholder"
        >
            {{ $tc('global.sw-condition.condition.AddAndCondition') }}
        </sw-button>

        <sw-button
            v-tooltip.bottom="getNoPermissionsTooltip('product_stream.editor')"
            variant="ghost"
            size="small"
            class="sw-condition-and-container__actions--sub"
            :disabled="disabled"
            @click="onAddOrContainer"
        >
            {{ $tc('global.sw-condition.condition.AddSubCondition') }}
        </sw-button>

        <sw-button
            v-tooltip.bottom="getNoPermissionsTooltip('product_stream.editor')"
            size="small"
            class="sw-condition-and-container__actions--delete"
            :disabled="disabled"
            @click="onDeleteAll"
        >
            {{ $tc('global.sw-condition.condition.deleteConditions') }}
        </sw-button>
    </div>
    {% endblock %}
</div>
{% endblock %}
