{{define "content"}}
<main class="py-10">
    <div class="max-w-3xl mx-auto px-4 sm:px-6 md:flex md:items-center md:justify-between md:space-x-5 lg:max-w-7xl lg:px-8">
        <div class="flex items-center space-x-5">
            <!-- <div class="flex-shrink-0">
                <div class="relative">
                    <img class="h-16 w-16 rounded-co" src="/app/beneficiaries/{{.ViewState.ID}}/picture" alt="">
                    <span class="absolute inset-0 shadow-inner rounded-full" aria-hidden="true"></span>
                </div>
            </div> -->
            <div>
                <h1 class="text-2xl font-bold text-gray-900">{{.ViewState.group.Data.name}}</h1>
            </div>
        </div>
        <div
            class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
            <!-- <button type="button"
                class="inline-flex items-center justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-2xl text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Supprimer</button>
            <a href="/app/administration/groups/{{.ViewState.group.ID}}/update" class="inline-flex"><button type="button"
                    class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Modifier</button></a> -->
        </div>
    </div>
    <div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-6 sm:px-6 lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-3">
        <div class="space-y-6 lg:col-start-1 lg:col-span-2">
            <section aria-labelledby="beneficiary-information-title">
                <div class="bg-white shadow sm:rounded-lg">
                    <div class="px-4 py-5 sm:px-6">
                        <h2 id="beneficiary-information-title" class="text-lg leading-6 font-medium text-gray-900">
                            Paramètres de l'organisation</h2>
                        <p class="mt-1 max-w-2xl text-sm text-gray-500">Paramètres généraux de l'organisation</p>
                    </div>
                    {{template "groups_members" .}}

                    <div class="px-2 py-4">
                        <form class="flex" method="POST" action="/app/group/settings/invite-member">
                        <div class="pr-2 flex-1">
                            <input type="text" name="username" id="username"
                            class="mt-1 border-gray-300 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm  rounded-2xl"
                            placeholder="Email">
                        </div>
                        <button class="px-1 py-1 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Ajouter un membre</button>
                        
                        </form>
                        
                    </div>

                    {{template "groups_admins" .}}
                </div>
            </section>
        </div>
        <section aria-labelledby="modules-title" class="lg:col-start-3 lg:col-span-1">
            <div class="bg-white px-4 py-5 shadow sm:rounded-lg sm:px-6">
                <h2 id="modules-title" class="text-lg font-medium text-gray-900">Modules activés</h2>
                
                <fieldset>
                    <div class="mt-4 space-y-4">
                        <div class="flex items-start">
                            <div class="h-5 flex items-center">
                                <input id="beneficiaries" name="modules.beneficiaries" type="checkbox" disabled {{if .ViewState.group.Data.modules.beneficiaries}} checked{{end}}
                                    class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
                            </div>
                            <div class="ml-3 text-sm">
                                <label for="modules.beneficiaries" class="font-medium text-gray-700">Bénéficiaires</label>
                                <p class="text-gray-500">Gestion des bénéficiaires assignés à sa propre organisation.
                                </p>
                            </div>
                        </div>
                        <div class="flex items-start">
                            <div class="flex items-center h-5">
                                <input id="journeys" name="modules.journeys" type="checkbox" disabled {{if .ViewState.group.Data.modules.journeys}} checked{{end}}
                                    class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
                            </div>
                            <div class="ml-3 text-sm">
                                <label for="modules.journeys" class="font-medium text-gray-700">Déplacements</label>
                                <p class="text-gray-500">Trouver des solutions et organiser les déplacements de ses bénéficiaires.</p>
                            </div>
                        </div>
                        <div class="flex items-start">
                            <div class="flex items-center h-5">
                                <input id="vehicles" name="modules.vehicles" type="checkbox" disabled {{if .ViewState.group.Data.modules.vehicles}} checked{{end}}
                                    class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
                            </div>
                            <div class="ml-3 text-sm">
                                <label for="modules.vehicles" class="font-medium text-gray-700">Véhicules</label>
                                <p class="text-gray-500">Trouver et réserver des véhicules pour ses bénéficiaires.
                                </p>
                            </div>
                        </div>
                        <div class="flex items-start">
                            <div class="flex items-center h-5">
                                <input id="vehicles_management" name="modules.vehicles_management" type="checkbox" disabled {{if .ViewState.group.Data.modules.vehicles_management}} checked{{end}}
                                    class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
                            </div>
                            <div class="ml-3 text-sm">
                                <label for="modules.vehicles_management" class="font-medium text-gray-700">Gestion des véhicules</label>
                                <p class="text-gray-500">Gérer les véhicules et réservations (pour les gestionnaires de flottes)
                                </p>
                            </div>
                        </div>
                        <div class="flex items-start">
                            <div class="flex items-center h-5">
                                <input id="events" name="modules.events" type="checkbox" disabled {{if .ViewState.group.Data.modules.events}} checked{{end}}
                                    class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
                            </div>
                            <div class="ml-3 text-sm">
                                <label for="modules.events" class="font-medium text-gray-700">Agenda dispositifs</label>
                                <p class="text-gray-500">Agenda des dispositifs pour les bénéficiaires (sessions permis, événements, ...)
                                </p>
                            </div>
                        </div>
                        <div class="flex items-start">
                            <div class="flex items-center h-5">
                                <input id="events" name="modules.events" type="checkbox" disabled {{if .ViewState.group.Data.modules.administration}} checked{{end}}
                                    class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
                            </div>
                            <div class="ml-3 text-sm">
                                <label for="modules.events" class="font-medium text-gray-700">Administration</label>
                                <p class="text-gray-500">Administration générale de la plateforme PARCOURSMOB. Créer, ajouter des organisations et administrateurs.
                                </p>
                            </div>
                        </div>
                    </div>
                </fieldset>
            </div>
            
        </section>
    </div>
</main>
{{end}}