{% extends "FOSUserBundle::layout.html.twig" %}

{% import "PackagistWebBundle::macros.html.twig" as macros %}

{% block fos_user_content %}
<section class="col-md-9">
    {%- if app.user.apiToken %}
        <h3 class="font-normal profile-title">Your API Token</h3>

        <div class="input-group api-token-group clearfix">
            <input id="api-token" type="text" class="form-control" value="" data-api-token="{{ app.user.apiToken }}" readonly="readonly">
            <span class="input-group">
                <button class="btn btn-success btn-show-api-token" type="button">Show API Token</button>
            </span>
        </div>

        <p>You can use your API token to interact with the Packagist API, see details in <a href="{{ path('about') }}#how-to-update-packages">the docs</a>.</p>

        <hr>
    {%- endif %}

    {% embed "PackagistWebBundle:Web:list.html.twig" with {noLayout: 'true', showAutoUpdateWarning: true} %}
        {% block content_title %}
            <h3 class="font-normal">Your packages</h3>
        {% endblock %}
    {% endembed %}
</section>
{% endblock %}
