{% requirePermission "seomatic:site-settings:creator" %}

{% extends "seomatic/_layouts/siteSettings.twig" %}

{% block header %}
    {{ block('pageTitle') }}

    <div class="flex-grow"></div>
    <div class="flex-grow"></div>
    {{ block('copyFromMenu') }}
    {{ block('actionButton') }}
{% endblock %}

{% block copyFromMenu %}
    {% include "seomatic/settings/_includes/copy-settings-menu.twig" %}
{% endblock %}

{% block content %}

    <input type="hidden" name="action" value="seomatic/settings/save-site">
    <input type="hidden" name="siteId" value="{{ currentSiteId }}">
    {{ redirectInput("seomatic/site/#{currentSubSection}/#{currentSiteHandle}") }}

    {% if currentUser.can("seomatic:site-settings:creator") %}
        <div id="tab-content-creator">
            <div class="field">
                <div class="heading">
                    <h2>{{ subSectionTitle ~ " Settings"|t("seomatic") }}</h2>
                </div>
                <div class="instructions">
                    <p>
                        {{ "The information on this page is used to create [JSON-LD Structured Data](https://developers.google.com/search/docs/guides/intro-structured-data) that _can_ appear as [Rich Snippets](https://developers.google.com/search/docs/guides/mark-up-content) on Google Search Engine Results Pages (SERP). JSON-LD Structured Data helps computers understand context and relationships, and is also read by other social media sites and apps."|t("seomatic") |md }}
                    </p>
                </div>
            </div>
            {% include "seomatic/settings/site/_includes/tab-creator.twig" with {
                "genericImageElements": creatorImageElements,
            } %}
        </div>
    {% endif %}

    {% include "seomatic/_includes/footer-message.twig" with {
        message: "Any text fields can include double-bracket tags that output Seomatic properties, such as `{{ seomatic.meta.seoTitle }}`."
    } %}
{% endblock %}
