<!-- edit_modal.blade.php -->

<div class="modal fade" id="editProjectModal" tabindex="-1" role="dialog" aria-labelledby="editProjectModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content border-0">
            <div class="modal-header bg-info text-white">
                <h5 class="modal-title text-white">Modifier le projet</h5>
                <button type="button" class="btn-close btn-close-white" data-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <!-- Formulaire d'édition -->
                <form id="editProjectForm">
                    @csrf
                    @method('PUT')

                    <!-- Ajoutez ici les champs du formulaire pour l'édition -->
                    <div class="mb-3">
                        <label class="mr-sm-2" for="edit-application_id">Selectionner le nom de l'application</label>
                        <select 
                        class="form-control form-select" 
                        id="edit-application_id" 
                        name="edit-application_id"
                        style="width: 100%; height: 36px"
                        >
                            <option  selected value="">Application..</option>
                            @foreach ($applications as $application)
                                <option value="{{ $application->id }}">{{ $application->libelle }}</option>
                            @endforeach
                        </select>
                        
                    </div>

                    <div class="mb-3">
                        <label for="edit-libelle" class="form-label">Libellé</label>
                        <input type="text" class="form-control" id="edit-libelle" name="libelle" required>
                    </div>

                    <div class="mb-3">
                        <label for="edit-sonStyle" class="form-label">Son Style</label>
                        <input type="text" class="form-control" id="edit-sonStyle" name="sonStyle">
                    </div>

                    <div class="mb-3 form-check">
                        <input type="checkbox" class="form-check-input" id="edit-isOffline" name="isOffline">
                        <label class="form-check-label" for="edit-isOffline">Hors ligne</label>
                    </div>

                    <button type="submit" class="btn btn-primary">Enregistrer les modifications</button>
                </form>
            </div>
        </div>
    </div>
</div>
