<div class="modal fade" id="agregarEmpleadoModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h1 class="modal-title fs-5 titulo_modal">Registrar Nuevo Empleado</h1>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form id="formularioEmpleado" action="" method="POST" enctype="multipart/form-data" autocomplete="off">
                    <div class="mb-3">
                        <label class="form-label">Nombre</label>
                        <input type="text" name="nombre" class="form-control" required />
                    </div>
                    <div class="mb-3">
                        <label class="form-label">Cédula (NIT)</label>
                        <input type="text" name="cedula" class="form-control" required />
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <label class="form-label">Seleccione la edad</label>
                            <select class="form-select" name="edad" required>
                                <option value="">Seleccione</option>
                                <?php for ($i = 18; $i <= 50; $i++) {
                                    echo "<option value='$i'>$i</option>";
                                } ?>
                            </select>
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">Sexo</label>
                            <div class="form-check">
                                <input class="form-check-input" type="radio" name="sexo" id="sexo_m" value="Masculino" checked>
                                <label class="form-check-label" for="sexo_m">Masculino</label>
                            </div>
                            <div class="form-check">
                                <input class="form-check-input" type="radio" name="sexo" id="sexo_f" value="Femenino">
                                <label class="form-check-label" for="sexo_f">Femenino</label>
                            </div>
                        </div>
                    </div>

                    <div class="mb-3">
                        <label class="form-label">Teléfono</label>
                        <input type="number" name="telefono" class="form-control" required />
                    </div>
                    
                   <div class="mb-3">
                        <label class="form-label">Seleccione el Tipo de Usuario</label>
                        <select name="tipousuario" class="form-select" required>
                            <option selected value="">Seleccione</option>
                            <?php
                            // Array asociativo para tipo de usuario con valor clave
                            $tipousuarios = array(
                                "S" => "Super-Admin",
                                "A" => "Administrador",
                                "E" => "Evaluador"
                            );
                    
                            foreach ($tipousuarios as $valor => $tipousuario) {
                                echo "<option value='$valor'>$tipousuario</option>";
                            }
                            ?>
                        </select>
                    </div>

                          <div class="mb-3">
                            <label class="form-label">E-mail</label>
                            <input type="email" name="correo" id="correo" class="form-control" required />
                        </div>
                    
                    <div class="mb-3">
                        <label class="form-label">Usuario</label>
                        <input type="text" name="usuario" class="form-control" required />
                    </div>
                    
                    <div class="mb-3">
                        <label class="form-label">Contraseña</label>
                        <input type="password" name="contrasena" class="form-control" required />
                    </div>
                    
                      
                    
                    <div class="mb-3">
                        <label class="form-label">Seleccione el Idioma</label>
                        <select name="Idioma" class="form-select" required>
                            <option selected value="">Seleccione</option>
                            <?php
                            $Idiomas = array(
                                "Inglés, Español, Portugués",
                                "Inglés y Español",
                                "Inglés y Portugués",
                                "Español y Portugués",
                                "Español",
                                "Portugués",
                                "Inglés"
                            );
                            foreach ($Idiomas as $Idioma) {
                                echo "<option value='$Idioma'>$Idioma</option>";
                            }
                            ?>
                        </select>
                    </div>
                    
                    <div class="mb-3">
                        <label class="form-label">Seleccione las Áreas</label>
                        <select name="areas" class="form-select" required>
                            <option selected value="">Seleccione</option>
                            <?php
                            $Vareas = array(
                                "ILA,ILB,ILC,ILD,ILE,ILF,ILG,ILH,ILI,ILJ,ILK,ILL,ILM,ILN,ILO,ILP,ILQ,PLA,PLB,PLC,PLD,PLE,PLF,PLG,PLH,PLI,PLJ,PLK,PLL,PLM,PLN,PLO,PLP,PLQ,SLA,SLB,SLC,SLD,SLE,SLF,SLG,SLH,SLI,SLJ,SLK,SLL,SLM,SLN,SLO,SLP,SLQ",
                                "SLA,SLB,SLC,SLD,SLE,SLF,SLG,SLH,SLI,SLJ,SLK,SLL,SLM,SLN,SLO,SLP,SLQ,ILA,ILB,ILC,ILD,ILE,ILF,ILG,ILH,ILI,ILJ,ILK,ILL,ILM,ILN,ILO,ILP,ILQ",
                                "ILA,ILB,ILC,ILD,ILE,ILF,ILG,ILH,ILI,ILJ,ILK,ILL,ILM,ILN,ILO,ILP,ILQ,PLA,PLB,PLC,PLD,PLE,PLF,PLG,PLH,PLI,PLJ,PLK,PLL,PLM,PLN,PLO,PLP,PLQ",
                                "SLA,SLB,SLC,SLD,SLE,SLF,SLG,SLH,SLI,SLJ,SLK,SLL,SLM,SLN,SLO,SLP,SLQ",
                                "PLA,PLB,PLC,PLD,PLE,PLF,PLG,PLH,PLI,PLJ,PLK,PLL,PLM,PLN,PLO,PLP,PLQ",
                                "ILA,ILB,ILC,ILD,ILE,ILF,ILG,ILH,ILI,ILJ,ILK,ILL,ILM,ILN,ILO,ILP,ILQ",
                                "PLA,PLB,PLC,PLD,PLE,PLF,PLG,PLH,PLI,PLJ,PLK,PLL,PLM,PLN,PLO,PLP,PLQ,SLA,SLB,SLC,SLD,SLE,SLF,SLG,SLH,SLI,SLJ,SLK,SLL,SLM,SLN,SLO,SLP,SLQ"
                            );
                            foreach ($Vareas as $areas) {
                                echo "<option value='$areas'>$areas</option>";
                            }
                            ?>
                        </select>
                    </div>

                 
                    
                 <div class="col-md-6">
                    <label class="form-label">Estado</label>
                    <div class="form-check">
                        <input class="form-check-input" type="radio" name="activo" id="activo_1" value="1" checked>
                        <label class="form-check-label" for="activo_1">Activo</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="radio" name="activo" id="activo_0" value="0">
                        <label class="form-check-label" for="activo_0">Inactivo</label>
                    </div>
                </div>

                    
            

                    <div class="mb-3 mt-4">
                        <label class="form-label">Cambiar Foto del usuario</label>
                        <input class="form-control form-control-sm" type="file" name="avatar" accept="image/png, image/jpeg" />
                    </div>

                    <div class="d-grid gap-2">
                        <button type="submit" class="btn btn-primary btn_add" onclick="registrarEmpleado(event)">
                            Registrar nuevo usuario
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>