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

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

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

{% block contextMenu %}
    {% include "seomatic/settings/_includes/sites-menu.twig" %}
{% 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:social") %}
        <div id="tab-content-social">
            <div class="field">
                <div class="heading">
                    <h2>{{ subSectionTitle ~ " Settings"|t("seomatic") }}</h2>
                </div>
                <div class="instructions">
                    <p>
                        {{ "The social media settings connect your website to its other points of pressence on the Internet. They also facilitate attaching your branding to social media posts via Twitter Cards and Facebook OpenGraph."|t("seomatic") |md }}
                    </p>
                </div>
            </div>
            {% include "seomatic/settings/site/_includes/tab-social.twig" %}
        </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 %}
