@extends('layouts.super-Admin')
@section('edit')

<div class="pagetitle">

    <div class="row">

        <h1 class="col">Ajouter un policier</h1>

        <nav>
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="{{ route('admins.index') }}">liste des policiers</a></li>
                <li class="breadcrumb-item">ajout policier</li>
                <h1 class="col-11 text-end">
                    <a href="{{ route('admins.index') }}">
                        <button type="button" class="btn btn-success">Retour</button>
                    </a>
                </h1>
            </ol>

        </nav>

    </div>

    <nav>
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="#"></a></li>
        </ol>
    </nav>
</div><!-- End Page Title -->

<section class="section">
    <div class="row">
        <div class="col-lg-9 " style="margin-left: 80px">
            <div class="card">
                <div class="card-body mt-5">
                    <form action="{{ route('admins.store') }}" method="POST"enctype="multipart/form-data">
                        @csrf

                        <div class="row">
                            <div class="col-sm-6">
                                <label for="inputNom" class="form-label">Nom</label>
                                <input type="text" name="nom" class="form-control"
                                    id="inputNom">
                            </div>
                            <div class="col-sm-6">
                                <label for="inputPrenom" class="form-label">Prenoms</label>
                                <input type="text"  name="prenoms" class="form-control"
                                    id="inputPrenom">
                            </div>
                        </div>
                        <div class="row mt-3">
                            <div class="col-sm-6">
                                <label for="inputDate" class="form-label"> Date Naissance </label>
                                <input type="date"  name="dateNaissance"
                                    class="form-control" id="inputDate">
                            </div>
                            <div class="col-sm-6">
                                <label for="inputLieu" class="form-label">Lieu Naissance</label>
                                <input type="text"  name="VilleNaissance"
                                    class="form-control" id="inputLieu">
                            </div>
                        </div>
                        <div class="row mt-3">
                            <div class="col-sm-6">
                                <label for="inputSexe" class="form-label">Sexe</label>
                                <select class="form-select" name="sexe" value="M"
                                    aria-label="Default select example">
                                    <option selected>Choisir le sexe</option>
                                    @foreach ( $sexes as $sexe)
                                           <option value="{{ $sexe->nom }}">{{ $sexe->nom }}</option>
                                    @endforeach

                                </select>
                            </div>
                            <div class="col-sm-6">
                                <label for="inputTaille" class="form-label">Taille</label>
                                <input type="number" name="taille"  class="form-control"
                                    id="inputTaille">
                            </div>
                        </div>
                        <div class="row mt-3">
                            <div class="col-sm-6">
                                <label for="inputCouleur" class="form-label">Couleur des Yeux</label>
                                <select class="form-select" name="couleurYeux"
                                    aria-label="Default select example">
                                    <option selected>Choisir la couleur des yeux</option>
                                        @foreach ($couleurYeux as $couleurYeuxs )
                                        <option value="{{ $couleurYeuxs->nom }}">{{ $couleurYeuxs->nom }}</option>
                                        @endforeach
                                </select>
                            </div>
                            <div class="col-sm-6">

                                <label for="inputCouleur" class="form-label">Groupe Sanguin</label>
                                <select class="form-select" name="groupeSanguin"
                                    aria-label="Default select example">
                                    <option selected>Choisir le groupe sanguin</option>
                                    @foreach ($groupeSanguin as $groupeSanguins )
                                    <option value="{{ $groupeSanguins->nom }}">{{ $groupeSanguins->nom }}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="row mt-3">
                            <div class="col-sm-6">
                                <label for="inputTelephone" class="form-label">Telephone</label>
                                <input type="text"  name="telephone"
                                    class="form-control" id="inputTelephone">
                            </div>
                            <div class="col-sm-6">
                                <label for="inputEmail" class="form-label">Email</label>
                                <input type="email"    name="email"
                                    class="form-control" id="inputEmail">
                            </div>
                        </div>
                        <div class="row mt-3">
                            <div class="col-sm-6">
                                <label for="inputSigne" class="form-label">Signe Particulier</label>
                                <input type="text" name="signePart"  class="form-control" id="inputSigne" >
                            </div>
                            <div class="col-sm-6">
                                <label for="inputGrade" class="form-label">Grade</label>
                                <input type="text"    name="grade"
                                    class="form-control" id="inputTaille">
                            </div>
                        </div>
                        <div class="row mt-3">
                            <div class="col-sm-6">
                                <label for="formMatricule" class="form-label">Matricule</label>
                                <input type="text" class="form-control"
                                    name="matricule" id="formMatricule">
                            </div>
                            <div class="col-sm-6">
                                <label for="inputCorps" class="form-label">Corps</label>
                                <input type="text"  name="corps"
                                    class="form-control" id="inputCorps">
                            </div>
                        </div>
                        <div class="col-sm">
                            <label for="photo" class="form-label">Image</label>
                            <input id="photo" name="photo" type="file" class="form-control">

                        </div>


                        <div class="row mt-3">
                            <div class="col-sm-12 text-end">
                                <button class="btn btn-color" type="submit">Valider</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</section>
@endsection
