{% extends 'base.html.twig' %}

{% block title %}Administration{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    <link rel="stylesheet" href="{{ asset('styles/globals/bulles.css') }}">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tom-select@2.3.1/dist/css/tom-select.min.css">
    <link rel="stylesheet" href="{{ asset('styles/globals/form.css') }}">
{% endblock %}

{% block titlePage %}
    <div class="bulle-container">
        <div class="bulle bulle-all-col bulle-nohover bulle-header">
            <h1 class="bulle-title">Administration : Mods</h1>
        </div>
    </div>
{% endblock %}

{% block main %}
    <div class="bulle-container">
        {{ form_start(form, { attr: { class: 'bulle bulle-all-col form-wrapper' } }) }}

                <div class="form-group">
                    {{ form_label(form.nom, "", { label_attr: { class: 'form-label' } }) }}
                    {{ form_widget(form.nom, { attr: { class: 'form-input' } }) }}
                    {{ form_errors(form.nom) }}
                </div>

                <div class="form-group">
                    {{ form_label(form.version, "", { label_attr: { class: 'form-label' } }) }}
                    {{ form_widget(form.version, { attr: { class: 'form-input' } }) }}
                    {{ form_errors(form.version) }}
                </div>

                <div class="form-group">
                    {{ form_label(form.uri, "", { label_attr: { class: 'form-label' } }) }}
                    {{ form_widget(form.uri, { attr: { class: 'form-file' } }) }}
                    {{ form_errors(form.uri) }}
                </div>

                <div class="form-group">
                    {{ form_label(form.dependances, "", { label_attr: { class: 'form-label' } }) }}
                    {{ form_widget(form.dependances, { attr: {
                            class: 'form-tom-select-input',
                            'data-controller': 'tom-select',

                        } } ) }}
                    {{ form_errors(form.dependances) }}
                </div>

        <div class="form-wrapper__footer">
            <a href="{{ path('app_admin_mods') }}" class="form-btn form-btn--cancel">Annuler</a>
            <button type="submit" class="form-btn">Enregistrer</button>
        </div>
        {{ form_end(form) }}
    </div>
{% endblock %}
