<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
{% block sw_landing_page_detail_base %}
<div class="sw-landing-page-detail-base">

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_landing_page_detail_base_information %}
    <sw-card
        position-identifier="sw-landing-page-detail-base"
        :title="$tc('sw-landing-page.base.general.headlineInformationCard')"
        :is-loading="isLoading"
    >
        <sw-container
            columns="repeat(auto-fit, minmax(150px, 1fr))"
            gap="0px 30px"
        >

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_landing_page_detail_base_information_name %}
            <sw-text-field
                v-model:value="landingPage.name"
                required
                name="landingPageName"
                validation="required"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.general.labelName')"
                :placeholder="placeholder(landingPage, 'name')"
                :error="landingPageNameError"
            />
            {% endblock %}

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_landing_page_detail_base_information_active %}
            <sw-switch-field
                v-model:value="landingPage.active"
                class="sw-landing-page-detail-base__active"
                name="landingPageActive"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.general.isActiveLabel')"
            />
            {% endblock %}
        </sw-container>

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_landing_page_detail_base_seo_form_sales_channel %}
        <sw-entity-multi-select
            v-model:entityCollection="landingPage.salesChannels"
            required
            class="sw-landing-page-detail-base__sales_channel"
            entity-name="sales_channel"
            :disabled="!acl.can('landing_page.editor')"
            :label="$tc('sw-landing-page.base.seo.labelSalesChannel')"
            :placeholder="$tc('sw-landing-page.base.seo.placeholderSalesChannel')"
            :error="landingPageSalesChannelsError"
        />
        {% endblock %}

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_landing_page_detail_base_information_tags %}
        <sw-entity-tag-select
            v-if="landingPage && !isLoading"
            v-model:entity-collection="landingPage.tags"
            class="sw-landing-page-detail-base__tags"
            :label="$tc('sw-landing-page.base.general.labelTags')"
            :placeholder="$tc('sw-landing-page.base.general.labelTagsPlaceholder')"
            :disabled="!acl.can('landing_page.editor')"
        />
        {% endblock %}
    </sw-card>
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_landing_page_detail_base_seo %}
    <sw-card
        position-identifier="sw-landing-page-detail-seo"
        :title="$tc('sw-landing-page.base.seo.title')"
        :is-loading="isLoading"
    >
        <sw-alert
            v-if="!isLayoutSet"
            variant="warning"
        >
            {{ $tc('sw-landing-page.base.seo.notification.noLayoutAssigned') }}
        </sw-alert>

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_landing_page_detail_base_seo_form %}
        <div class="sw-landing-page-detail-base__seo-form">

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_landing_page_detail_base_seo_form_meta_title %}
            <sw-text-field
                v-model:value="landingPage.metaTitle"
                maxlength="255"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.seo.labelMetaTitle')"
                :help-text="$tc('sw-landing-page.base.seo.helpTextMetaTitle')"
                :placeholder="placeholder(landingPage, 'metaTitle', $tc('sw-landing-page.base.seo.placeholderMetaTitle'))"
            />
            {% endblock %}

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_landing_page_detail_base_seo_form_meta_description %}
            <sw-textarea-field
                v-model:value="landingPage.metaDescription"
                maxlength="255"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.seo.labelMetaDescription')"
                :help-text="$tc('sw-landing-page.base.seo.helpTextMetaDescription')"
                :placeholder="placeholder(landingPage, 'metaDescription', $tc('sw-landing-page.base.seo.placeholderMetaDescription'))"
            />
            {% endblock %}

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_landing_page_detail_base_seo_form_keywords %}
            <sw-text-field
                v-model:value="landingPage.keywords"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.seo.labelKeywords')"
                :placeholder="placeholder(landingPage, 'keywords', $tc('sw-landing-page.base.seo.placeholderKeywords'))"
            />
            {% endblock %}

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_landing_page_detail_base_seo_form_url %}
            <sw-text-field
                v-model:value="landingPage.url"
                required
                name="landingPageUrl"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.seo.labelUrl')"
                :placeholder="placeholder(landingPage, 'url', $tc('sw-landing-page.base.seo.placeholderUrl'))"
                :error="landingPageUrlError"
            />
            {% endblock %}

        </div>
        {% endblock %}

    </sw-card>
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_landing_page_detail_base_attribute_sets %}
    <sw-card
        v-if="customFieldSetsArray.length > 0"
        position-identifier="sw-landing-page-detail-attribute-sets"
        :title="$tc('sw-settings-custom-field.general.mainMenuItemGeneral')"
        :is-loading="isLoading"
    >
        <sw-custom-field-set-renderer
            :entity="landingPage"
            :sets="customFieldSetsArray"
        />
    </sw-card>
    {% endblock %}
</div>
{% endblock %}
