<div class="flex-none p-6 text-center">
    <span class="inline-flex size-14 items-center justify-center rounded-full bg-gray-500 outline -outline-offset-1 outline-black/5 dark:bg-gray-800 dark:outline-white/10">
      <span class="text-xl font-medium text-white">{{ item.firstname|slice(0, 1)|upper }}{{ item.lastname|slice(0, 1)|upper }}</span>
    </span>
    <h2 class="mt-3 font-semibold text-gray-900 dark:text-white">{{ item.name }}</h2>
    <p class="text-sm/6 text-gray-500 dark:text-gray-400">Benutzerkonto</p>
</div>
<div class="flex flex-auto flex-col justify-between p-6">
    <dl class="grid grid-cols-1 gap-x-6 gap-y-3 text-sm text-gray-700 dark:text-gray-300">
        <dt class="col-end-1 font-semibold text-gray-900 dark:text-white">Email</dt>
        <dd>{{ item.email }}</dd>
        {% if item.phone|default %}
            <dt class="col-end-1 font-semibold text-gray-900 dark:text-white">Telefon</dt>
            <dd>{{ item.phone }}</dd>
        {% endif %}
        {% if item.participants is not empty %}
            <dt class="col-end-1 font-semibold text-gray-900 dark:text-white">Teilnehmende</dt>
            <dd>{{ item.participants|map(p => p.firstname)|join(', ') }}</dd>
        {% endif %}
        {% if item.hosts is not empty %}
            <dt class="col-end-1 font-semibold text-gray-900 dark:text-white">Veranstaltende</dt>
            <dd>{{ item.hosts|map(h => h.name)|join(', ') }}</dd>
        {% endif %}
    </dl>
    <div class="mt-6 flex gap-3">
        <twig:Admin:Button href="{{ path('admin_accounts_password', {uuid: item.uuid.toBase58}) }}" variant="primary" class="w-full whitespace-nowrap truncate">Passwort zurücksetzen</twig:Admin:Button>
        {% if 'ROLE_MEMBER' in item.roles %}
            <form action="{{ path('admin_frontend_preview', {username: item.userIdentifier}) }}" method="post" class="w-full" data-turbo="false">
                <input type="hidden" name="_token" value="{{ csrf_token('submit') }}">
                <twig:Admin:Button variant="primary" class="w-full" type="submit">Anmelden als</twig:Admin:Button>
            </form>
        {% else %}
            <form action="{{ path('admin_index') }}" method="post" class="w-full" data-turbo="false">
                <input type="hidden" name="_switch_user" value="{{ item.userIdentifier }}">
                <twig:Admin:Button variant="primary" class="w-full" type="submit">Anmelden als</twig:Admin:Button>
            </form>
        {% endif %}
    </div>
</div>
