@extends('layouts.dashboard.app')

@section('content')
    <div class="container-fluid mt-2 ">
        <div class="row">
            <div class="col-12">
                <form action="{{ route('Contradictoire.store') }}" method="post">
                    @csrf
                    <div class="card">
                        <div class="card-body mt-1">
                            <input type="hidden" value="{{ $id }}" name="dossier_id">
                            <div class="row">
                                <h3 class="text-dark" >Adversaire</h3>

                                {{-- <div class="form-group col-4 mb-2">
                                    <label for="adverse_id">Nom Expert Adverse</label>
                                    <input type="text" name="adverse_id" value="{{ old('adverse_id') }}"
                                        class="form-control @error('adverse_id') is-invalid @enderror">
                                    @error('adverse_id')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div> --}}
                                <div class="form-group col-4 mb-2">
                                    <label for="adverse_id">Nom Expert Adverse</label>
                                   <select class="form-select @error('adverse_id') is-invalid @enderror" name="adverse_id" id="adverse_id">
                                    @foreach ($experts as $expert)
                                    <option value="{{ $expert->id }}">{{ $expert->name }}</option>
                                    @endforeach
                                   </select>
                                    @error('adverse_id')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                                <div class="form-group col-4 mb-2">
                                    <label for="date_reception_adverse">Date Reception Adverse</label>
                                    <input type="date" name="date_reception_adverse"
                                        value="{{ old('date_reception_adverse') }}"
                                        class="form-control @error('date_reception_adverse') is-invalid @enderror">
                                    @error('date_reception_adverse')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                                <div class="form-group col-4 mb-2">
                                    <label for="adverse_montant_accord">Adverse Montant Accord</label>
                                    <input type="number" name="adverse_montant_accord"
                                        value="{{ old('adverse_montant_accord') }}"
                                        class="form-control @error('adverse_montant_accord') is-invalid @enderror">
                                    @error('adverse_montant_accord')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                                <div class="form-group col-4 mb-2">
                                    <label for="libelle">Date Accord Adverse</label>
                                    <input type="date" name="date_accord_adverse"
                                        value="{{ old('date_accord_adverse') }}"
                                        class="form-control @error('date_accord_adverse') is-invalid @enderror">
                                    @error('date_accord_adverse')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>
                            <hr>
                            <h3 class="text-dark" >Arbitrage</h3>
                            <div class="row">
                                <div class="form-group col-4 mb-2">
                                    <label for="arbitre_id">Nom Expert Arbitre</label>
                                   <select class="form-select @error('arbitre_id') is-invalid @enderror" name="arbitre_id" id="">
                                     <option value="">Aucun</option>
                                    @foreach ($experts as $expert)
                                    <option value="{{ $expert->id }}">{{ $expert->name }}</option>
                                    @endforeach
                                   </select>
                                    @error('arbitre_id')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                                <div class="form-group col-4 mb-2">
                                    <label for="date_reception_arbitre">Date Reception Arbitre</label>
                                    <input type="date" name="date_reception_arbitre"
                                        value="{{ old('date_reception_arbitre') }}"
                                        class="form-control @error('date_reception_arbitre') is-invalid @enderror">
                                    @error('date_reception_arbitre')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                                <div class="form-group col-4 mb-2">
                                    <label for="arbitre_montant_accord">Arbitre Montant Accord</label>
                                    <input type="number" name="arbitre_montant_accord"
                                        value="{{ old('arbitre_montant_accord') }}"
                                        class="form-control @error('arbitre_montant_accord') is-invalid @enderror">
                                    @error('arbitre_montant_accord')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                                <div class="form-group col-4 mb-2">
                                    <label for="libelle">Date Accord Arbitre</label>
                                    <input type="date" name="date_accord_arbitre"
                                        value="{{ old('date_accord_arbitre') }}"
                                        class="form-control @error('date_accord_arbitre') is-invalid @enderror">
                                    @error('date_accord_arbitre')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>

                        </div>
                        <div class="modal-footer">
                            <button type="submit" class="btn btn-primary">Créer</button>
                        </div>
                </form>
            </div>
        </div>
    </div>
    </div>
@endsection
