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

{% block title %}Creer un acheteur{% endblock %}

{% block body %}
<div class="mb-8">
    <h1 class="text-3xl font-black uppercase tracking-tighter italic heading-page">Creer un acheteur</h1>
    <p class="font-bold text-gray-500 italic">Le mot de passe sera genere aleatoirement.</p>
</div>

<div class="max-w-[36rem]">
    <div class="admin-card">
        <form method="post" action="{{ path('app_admin_create_buyer') }}" class="flex flex-col gap-6">
            <div class="flex flex-wrap gap-6">
                <div class="flex-1 min-w-[150px]">
                    <label for="buyer_last_name" class="admin-form-label-lg font-black uppercase text-gray-400">Nom</label>
                    <input type="text" id="buyer_last_name" name="last_name" required
                        class="admin-form-input-lg"
                        placeholder="Dupont">
                </div>
                <div class="flex-1 min-w-[150px]">
                    <label for="buyer_first_name" class="admin-form-label-lg font-black uppercase text-gray-400">Prenom</label>
                    <input type="text" id="buyer_first_name" name="first_name" required
                        class="admin-form-input-lg"
                        placeholder="Jean">
                </div>
            </div>

            <div>
                <label for="buyer_email" class="admin-form-label-lg font-black uppercase text-gray-400">Email</label>
                <input type="email" id="buyer_email" name="email" required
                    class="admin-form-input-lg"
                    placeholder="jean.dupont@exemple.fr">
            </div>

            <div class="flex items-center gap-3">
                <input type="checkbox" id="buyer_verify" name="verify_now" value="1"
                    class="admin-form-checkbox">
                <label for="buyer_verify" class="text-sm font-bold cursor-pointer">Marquer l'email comme verifie immediatement</label>
            </div>

            <div class="flex gap-3">
                <button type="submit"
                    class="admin-btn-lg font-black uppercase text-sm tracking-widest hover:bg-green-500 hover:text-white transition-all">
                    Creer l'acheteur
                </button>
                <a href="{{ path('app_admin_buyers') }}"
                    class="admin-btn-lg-outline inline-flex items-center font-black uppercase text-sm tracking-widest bg-white hover:bg-gray-100 transition-all">
                    Annuler
                </a>
            </div>
        </form>
    </div>
</div>
{% endblock %}
