@extends('layouts.app')

@section('content')

<div class="container-fluid">
    <div class="row">
        <div class="col">
            <div class="card">
                <div class="card-header">
                    Informations de l'appartement
                </div>
                <div class="card-body">
                    <form action="{{ route('appartement.store',$bienId) }}" method="post">
                        @csrf
                        <div class="row">
                            <div class="col-6">
                                <label for="">Surface habitable</label>
                                <input class="form-control " required
                                name="surface_habitable" type="number">
                            </div>

                            <div class="col-6">
                                <label for="">Surface séjour</label>
                                <input class="form-control " required
                                name="surface_sejour" type="number" >
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-6">
                                <label for="">Nombre de pièces</label>
                                <input required class="form-control " type="number" name="nbre_pieces">
                            </div>

                            <div class="col-6">
                                <label for="">Nombre de chambres</label>
                                <input required class="form-control " type="number" name="nbre_chambres">
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-4">
                                <label for="">Année de construction</label>
                                <input type="number" class="form-control" min="1900" max="2099" step="1" value="2022" name="annee_construction"/>
                            </div>

                            <div class="col-4">
                                <label for="">Nombre de niveaux</label>
                                <input required class="form-control " type="number" name="nbre_niveaux">
                            </div>

                            <div class="col-4">
                                <label for="">Catégorie</label>
                                <select required class="form-control" name="categorie">
                                    <option value="1">Appartement</option>
                                    <option value="2">Appartement rénové</option>
                                    <option value="3">Habitation de loisir</option>
                                    <option value="4">Appartement ancien</option>
                                    <option value="5">Appartement bourgeois</option>
                                    <option value="6">Appartement neuf</option>
                                    <option value="7">Appartement récent</option>
                                    <option value="8">Appartement à rénover</option>
                                </select>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-4">
                                <label for="">Etat général</label>
                                @include('references.generales.etat_general')
                            </div>

                            <div class="col-4">
                                <label for="">Nombre de salle de bain</label>
                                <input required class="form-control " type="number" name="nbre_salle_bain">
                            </div>

                            <div class="col-4">
                                <label for="">Le bien est meublé</label>
                                <select name="meuble" id="" class="form-control">
                                    <option value="1">Oui</option>
                                    <option value="0">Non</option>
                                </select>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-12">
                                <button class="btn btn-primary" type="submit">Etape suivante</button>
                            </div>
                        </div>

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

@endsection