<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
{% block sw_condition_base %}
<div class="sw-condition">
    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_condition_base_content %}
    <div
        class="sw-condition__container"
        :class="conditionClasses"
    >
        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_condition_base_field_condition %}
        <sw-condition-type-select
            v-bind="{ condition, availableTypes, hasError, availableGroups }"
            :disabled="disabled || undefined"
        />
        {% endblock %}

        <div class="sw-condition__value-content">
            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_condition_value_before_content %}

            {% endblock %}
            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_condition_value_content %}
            <sw-text-field
                class="sw-condition__placeholder"
                size="medium"
                :placeholder="$tc('global.sw-condition.condition.placeholder-warning')"
                :disabled="disabled || undefined"
            />
            {% endblock %}
        </div>

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_condition_base_field_actions %}
        <sw-context-button
            class="sw-condition__context-button"
            :disabled="disabled || undefined"
        >
            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_condition_base_field_create_before_action %}
            <sw-context-menu-item
                class="sw-condition__create-before-action"
                :disabled="disabled || undefined"
                @click="onCreateBefore"
            >
                {{ $tc('global.sw-condition.condition.createBefore') }}
            </sw-context-menu-item>
            {% endblock %}

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_condition_base_field_create_after_action %}
            <sw-context-menu-item
                class="sw-condition__create-after-action"
                :disabled="disabled || undefined"
                @click="onCreateAfter"
            >
                {{ $tc('global.sw-condition.condition.createAfter') }}
            </sw-context-menu-item>
            {% endblock %}

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_condition_base_field_delete_action %}
            <sw-context-menu-item
                :disabled="disabled || undefined"
                variant="danger"
                @click="onDeleteCondition"
            >
                {{ $tc('global.default.delete') }}
            </sw-context-menu-item>
            {% endblock %}
        </sw-context-button>
        {% endblock %}
    </div>
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_condition_base_error %}
    <sw-field-error :error="currentError" />
    {% endblock %}
</div>
{% endblock %}
