{{define "content"}}
<main class="py-10">
    <!-- Page header -->
    <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.admins.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.admins.Data.first_name}}
                    {{.ViewState.admins.Data.last_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">
            {{if eq .UserID .ViewState.admins.ID}}
            <a href="/app/members/{{.ViewState.admins.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>
            {{end}}
    </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="admins-information-title">
                <div class="bg-white shadow sm:rounded-lg">
                    <div class="px-4 py-5 sm:px-6">
                        <h2 id="admins-information-title" class="text-lg leading-6 font-medium text-gray-900">
                            Informations personnelles</h2>
                        <p class="mt-1 max-w-2xl text-sm text-gray-500">Informations générales sur le conseiller.</p>
                    </div>
                    <div class="border-t border-gray-200 px-4 py-5 sm:px-6">
                       
                        <dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
                            {{if .ViewState.admins.Data.email}}
                            <div class="sm:col-span-1">
                                <dt class="text-sm font-medium text-gray-500">Email</dt>
                                <dd class="mt-1 text-sm text-gray-900">{{.ViewState.admins.Data.email}}</dd>
                            </div>
                            {{end}}
                            {{if .ViewState.admins.Data.phone_number}}
                            <div class="sm:col-span-1">
                                <dt class="text-sm font-medium text-gray-500">Télephone</dt>
                                <dd class="mt-1 text-sm text-gray-900">{{.ViewState.admins.Data.phone_number}}
                               </dd>
                            </div>
                            {{end}}
                            
                            <div class="sm:col-span-1">
                                <dt class="text-sm font-medium text-gray-500">Nom</dt>
                                <dd class="mt-1 text-sm text-gray-900">{{.ViewState.admins.Data.first_name}}</dd>
                            </div>
                            <div class="sm:col-span-1">
                                <dt class="text-sm font-medium text-gray-500">Prénom</dt>
                                <dd class="mt-1 text-sm text-gray-900">{{.ViewState.admins.Data.last_name}}
                               </dd>
                            </div>
                            <div class="sm:col-span-1">
                                <dt class="text-sm font-medium text-gray-500">Organisations</dt>
                                {{range .ViewState.groups}}
                                <dd class="mt-1 text-sm text-gray-900">{{.}} 
                               </dd>
                               {{end}}
                            </div>
                            
                        </dl>
                    </div>
                </div>
            </section>
        </div>

    </div>
</main>
{{end}}