@extends('layouts.app')

@section('content')

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

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

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

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

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

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

                            <div class="col-4">
                                <label for="">Catégorie</label>
                                <select class="form-control" name="categorie" required>
                                    <option value="20">Maison</option>
                                    <option value="9">Demeure</option>
                                    <option value="10">Fermette</option>
                                    <option value="11">Habitation de loisirs</option>
                                    <option value="12">Hôtel particulier</option>
                                    <option value="13">Maison individuelle</option>
                                    <option value="14">Maison de campagne</option>
                                    <option value="15">Maison neuve</option>
                                    <option value="16">Pavillon</option>
                                    <option value="17">Villa</option>
                                    <option value="18">Mas</option>
                                    <option value="19">Maison de village</option>
                                </select>
                            </div>

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

                        <div class="row">
                            <div class="col-4">
                                <label for="">Etat intérieur</label>
                                @include('references.demeure.etat_interieur')
                            </div>

                            <div class="col-4">
                                <label for="">Etat extérieur</label>
                                @include('references.demeure.etat_exterieur')
                            </div>

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

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

                            <div class="col-6">
                                <label for="">Type habitat</label>
                                <input class="form-control " type="text" name="type_habitat" required>
                            </div>
                        </div>

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

@endsection