<div wire:ignore.self class="modal fade" tabindex="-1" role="dialog" id="theModal-LG">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header bg-primary">
                <h5 class="modal-title">
                    <b>{{ $componentName }}</b> | {{ $selected_LG_id > 0 ? 'EDITAR' : 'CREAR' }}
                </h5>
                <h6 class="text-center text-warning" wire:loading>ESPERE UN MOMENTO POR FAVOR</h6>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-sm-12 col-md-6">
                        <div class="form-group">
                            <label>Nivel de Estudios</label>
                            <select class="form-control form-select" wire:model.lazy="language_id" name="language_id">
                                <option value="Seleccionar">Seleccionar</option>
                                @foreach ($languages as $language)
                                    <option value="{{ $language->id }}">{{ $language->name }}</option>
                                @endforeach
                            </select>
                            @error('language_id')
                                <span class="text-danger er">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>

                    <div class="col-sm-12 col-md-6">
                        <div class="form-group">
                            <label>Nivel</label>
                            <select class="form-control form-select" wire:model.lazy="level_id" name="level_id">
                                <option value="Seleccionar">Seleccionar</option>
                                @foreach ($levels as $level)
                                    <option value="{{ $level->id }}">{{ $level->name }}</option>
                                @endforeach
                            </select>
                            @error('level_id')
                                <span class="text-danger er">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                </div><!-- row -->
            </div><!-- modal-body -->
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" wire:click.prevent="resetUI()"
                    data-bs-dismiss="modal">CERRAR</button>

                @if ($selected_LG_id < 1)
                    <button type="button" class="btn btn-primary close-modal"
                        wire:click.prevent="StoreLG()">GUARDAR</button>
                @else
                    <button type="button" class="btn btn-primary close-modal"
                        wire:click.prevent="UpdateLG()">ACTUALIZAR</button>
                @endif
            </div>
        </div><!-- modal-content -->

    </div>
</div>
