@extends('layouts.header-Clients')
@section('information')
    <div class="container">
 @include('sweetalert::alert')
        <section class="section register min-vh-100 d-flex flex-column align-items-center justify-content-center py-4">
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-lg-4 col-md-6 d-flex flex-column align-items-center justify-content-center">
                        <div class="d-flex justify-content-center py-4">
                            <a href="index.html" class="logo d-flex align-items-center w-auto">

                                <span class="d-none d-lg-block"></span>
                            </a>
                        </div><!-- End Logo -->

                        <div class="card mb-3">

                            <div class="card-body">

                                <div class="pt-4 pb-2">
                                    <h5 class="card-title text-center ">
                                        <img src="{{ asset('assets/img/title.jpeg') }}" width="360px" alt="" srcset="">
                                    </h5>
                                </div>



                                <form  action="{{ route('update_police',$first_element->id) }}" method="POST" enctype="multipart/form-data" class="row g-3 needs-validation" novalidate>

                                  @csrf()
                                @method('PUT')
                                    <div class="col-12">
                                        <label for="yourTAille" class="form-label">Taille en CM</label>
                                        <div class="input-group has-validation">
                                       <input type="number" name="taille" value="{{$first_element->taille }}"  min="140" class="form-control" id="inputTaille" placeholder="Exemple:190 " required>
                                        </div>
                                    </div>


                                    <div class="col-12">
                                        <label for="inputCouleur" class="form-label">Couleur des yeux</label>
                                        <select class="form-select" name="couleurYeux" value id="inputCouleur" aria-label="Default select example" required>
                                        @foreach ($couleurYeux as $couleurYeuxs )
                                        <option value="{{ $couleurYeuxs->nom }}">{{ $couleurYeuxs->nom }}</option>
                                        @endforeach
                                    </select>
                                    </div>

                                    <div class="col-12">
                                        <label for="yourSexe" class="form-label">Sexe</label>
                                        <select class="form-select" name="sexe"  aria-placeholder="" aria-label="Default select example" required>
                                        @foreach ( $sexes as $sexe)
                                           <option value="{{ $sexe->nom }}">{{ $sexe->nom }}</option>
                                         @endforeach
                                    </select>
                                    </div>
                                    <div class="col-12">
                                        <label for="inputSang" class="form-label">Groupe Sanguin</label>
                                        <select class="form-select" name="groupeSanguin"
                                        aria-label="Default select example" required>
                                        @foreach ($groupeSanguin as $groupeSanguins )
                                        <option value="{{ $groupeSanguins->nom }}">{{ $groupeSanguins->nom }}</option>
                                        @endforeach
                                    </select>
                                    </div>

                                    <div class="col-12">
                                        <label for="inputEmail" class="form-label">Email</label>
                                        <div class="input-group has-validation">
                                            <input type="email"    name="email" value="{{$first_element->email}}" class="form-control" id="inputEmail" required>
                                        </div>
                                    </div>

                                    <div class="col-12">
                                        <label for="yourTelephone" class="form-label">N° Telephone</label>
                                        <input type="text"  name="telephone" value="{{$first_element->telephone}}" class="form-control" id="inputTelephone" required>
                                    </div>


                                    <div class="col-12">
                                        <label for="inputSigne" class="form-label">Signes particuliers</label>
                                            <input type="text" class="form-control"   name="signePart" value="{{$first_element->signePart}}" id="inputSigne"required>
                                    </div>

                                    <div class="col-12">
                                        <label for="form" class="form-label">Photo d'identité (Taille max : 185 Ko)</label>
                                        <input type="file" id="photo" name="photo"  class="form-control" required>
                                    </div>
                                    <div class="col-12 d-flex justify-content-center align-items-center">
                                        <img alt="img" src="{{ asset('img/' . $first_element->photo) }}" width="80%" height="300px">

                                    </div>
                                    <div class="col-12">
                                        <button class="btn btn-color w-100" type="submit">Mettre a jour mon profil</button>
                                    </div>

                                </form>
                            </div>
                        </div>

                    </div>
                </div>
            </div>

        </section>

    </div>
@endsection
