<div wire:ignore.self class="modal fade" tabindex="-1" role="dialog" id="theModalProfile">
    <div class="modal-dialog modal-lg" role="document" style="overflow-y:initial">
        <div class="modal-content">
            <div class="modal-header bg-primary">
                <h5 class="modal-title">
                <b>{{ $first_name }} {{ $last_name }}</b> | PERFIL
                </h5>
                <h6 class="text-center text-warning" wire:loading>ESPERE UN MOMENTO POR FAVOR</h6>
            </div>
            <div class="modal-body" style="height: 70vh; overflow-y: auto">
                <div class="row">
                    <div class="col-sm-6 col-md-12">
                        <div class="form-group">
                            <label>Cargo u Oficio que desempeñará</label>
                            <input type="text" wire:model.lazy="title_position" class="form-control" placeholder="ej: Jefe de Departamento" id="title_position"
                                maxlength="99">
                            @error('title_position')
                                <span class="text-danger er">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label>Salario Mensual Básico </label>
                            <input type="text" data-type="currency" wire:model.lazy="salary" class="form-control" placeholder="ej: $1.200.000.00">
                            @error('salary')
                                <span class="text-danger er">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label>Forma de Pago </label>
                            <select class="form-select" wire:model.lazy="payment_method">
                                <option value="">Seleccione una opción</option>
                                @foreach (DataTypePaymentMethod() as $key => $value)
                                    <option value="{{ $key }}">{{ $value }}</option>
                                @endforeach
                            </select>
                            @error('payment_method')
                                <span class="text-danger er">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label>Fecha de inicio de Labores </label>
                            <input type="date" wire:model.lazy="start_date_work" class="form-control digits">
                            @error('start_date_work')
                                <span class="text-danger er">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label>Fecha de término de Labores </label>
                            <input type="date" wire:model.lazy="end_date_work" class="form-control digits">
                            @error('end_date_work')
                                <span class="text-danger er">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label>Lugar donde ha sido contratado </label>
                            <input type="text" wire:model.lazy="place_hired" class="form-control" placeholder="ej: La Paz">
                            @error('place_hired')
                                <span class="text-danger er">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label>Lugar donde desempeñará labores </label>
                            <input type="text" wire:model.lazy="place_work" class="form-control" placeholder="ej: Los Cabos">
                            @error('place_work')
                                <span class="text-danger er">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label>Jornada laboral </label>
                            <select class="form-select" wire:model.lazy="work_day">
                                <option value="">Seleccione una opción</option>
                                @foreach (DataTypeWorkDay() as $key => $value)
                                    <option value="{{ $key }}">{{ $value }}</option>
                                @endforeach
                            </select>
                            @error('work_day')
                                <span class="text-danger er">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6">
                        <div class="form-group">
                            <label>Eps</label>
                            <select class="form-select" wire:model.lazy="eps_id">
                                <option value="">Seleccione una opción</option>
                                @foreach ($epss as $eps)
                                    <option value="{{ $eps->id }}">{{ $eps->name }}</option>
                                @endforeach
                            </select>
                            @error('eps_id')
                                <span class="text-danger er">{{ $message }}</span>
                            @enderror
                        </div>
                    </div>

                </div><!-- end row -->




            </div><!-- end modalbody -->
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" wire:click.prevent="resetUI()" data-bs-dismiss="modal">CERRAR</button>
                <button type="submit" class="btn btn-primary" wire:click.prevent="storeProfile()">GUARDAR</button>

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