{# @var craft \craft\web\twig\variables\CraftVariable #}
{% extends "_layouts/cp" %}

{% do view.registerAssetBundle("pennebaker\\architect\\assetbundles\\indexcpsection\\IndexCPSectionAsset") %}

{# Link for the ? icon at the bottom of the page #}
{% set docsUrl = "https://github.com/Pennebaker/craft-architect/blob/master/README.md" %}

{# The title of this CP section #}
{% set title = "Architect" %}

{# The URL to this plugin's base CP section #}
{% set pluginCpUrl = url('architect') %}

{% set importIcon = '@pennebaker/architect/assetbundles/indexcpsection/dist/img/import.svg' %}
{% set exportIcon = '@pennebaker/architect/assetbundles/indexcpsection/dist/img/export.svg' %}
{% set migrationIcon = '@pennebaker/architect/assetbundles/indexcpsection/dist/img/migrations.svg' %}

{% set sidebar %}

    <nav class="architect">
        <ul>
            {#<li class="heading"><span>{{"Export"|t('architect') }}</span></li>#}
            <li>
                <a  href="{{ cpUrl('architect/import') }}" {% if selectedSubnavItem|default('') == 'import' %}class="sel"{% endif %}><span class="icon icon-mask">{{ svg(importIcon) }}</span>&nbsp;{{"Import"|t('architect')}}
                </a>
            </li>
            <li>
                <a  href="{{ cpUrl('architect/export') }}" {% if selectedSubnavItem == 'export' %}class="sel"{% endif %}><span class="icon icon-mask">{{ svg(exportIcon) }}</span>&nbsp;{{"Export"|t('architect')}}
                </a>
            </li>
            <li>
                <a  href="{{ cpUrl('architect/blueprints') }}" {% if selectedSubnavItem == 'blueprints' %}class="sel"{% endif %}><span class="icon icon-mask">{{ svg(migrationIcon) }}</span>&nbsp;{{"Blueprints"|t('app')}}
                </a>
            </li>

        </ul>
    </nav>

{% endset %}


{# Get a URL to an image in our AssetBundle #}
{% set iconUrl = view.getAssetManager().getPublishedUrl('@pennebaker/architect/assetbundles/indexcpsection/dist', true) ~ '/img/Index-icon.svg' %}

{# Content that should appear in the page header#}
{% block contextMenu %}
    <img src="{{ iconUrl }}" height="32" width="32" />
{% endblock%}
