<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
{% block sw_sales_channel_detail_analytics %}
<sw-card
    position-identifier="sw-sales-channel-detail-analytics"
    :title="$tc('sw-sales-channel.detail.analytics.cardTitle')"
    :is-loading="isLoading"
>
    <template v-if="salesChannel && salesChannel.analytics">
        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_sales_channel_detail_analytics_headline %}
        <div class="sw-sales-channel-detail-analytics__headline-text">
            {{ $tc('sw-sales-channel.detail.analytics.headline') }}
        </div>
        {% endblock %}

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_sales_channel_detail_analytics_description %}
        <p
            class="sw-sales-channel-detail-analytics__description"
            v-html="$tc('sw-sales-channel.detail.analytics.description')"
        ></p>
        {% endblock %}

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_sales_channel_detail_analytics_fields_tracking_id %}
        <sw-text-field
            v-model:value="salesChannel.analytics.trackingId"
            :label="$tc('sw-sales-channel.detail.analytics.fields.trackingId.label')"
            :placeholder="$tc('sw-sales-channel.detail.analytics.fields.trackingId.placeHolder')"
            name="trackingId"
            :disabled="!acl.can('sales_channel.editor')"
            :help-text="$tc('sw-sales-channel.detail.analytics.fields.trackingId.helpText')"
        />
        {% endblock %}

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_sales_channel_detail_analytics_fields_container %}
        <sw-container
            columns="repeat(auto-fit, minmax(250px, 1fr))"
            gap="0 30px"
        >
            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_sales_channel_detail_analytics_fields_active %}
            <sw-switch-field
                v-model:value="salesChannel.analytics.active"
                :label="$tc('sw-sales-channel.detail.analytics.fields.active.label')"
                name="analyticsActive"
                :disabled="!acl.can('sales_channel.editor')"
            />
            {% endblock %}

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_sales_channel_detail_analytics_fields_track_orders %}
            <sw-switch-field
                v-model:value="salesChannel.analytics.trackOrders"
                :label="$tc('sw-sales-channel.detail.analytics.fields.trackOrders.label')"
                name="trackOrders"
                :disabled="!acl.can('sales_channel.editor')"
            />
            {% endblock %}

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_sales_channel_detail_analytics_fields_anonymize_ip %}
            <sw-switch-field
                v-model:value="salesChannel.analytics.anonymizeIp"
                :label="$tc('sw-sales-channel.detail.analytics.fields.anonymizeIp.label')"
                name="anonymizeIp"
                :disabled="!acl.can('sales_channel.editor')"
            />
            {% endblock %}
        </sw-container>
        {% endblock %}
    </template>
</sw-card>
{% endblock %}
