<!DOCTYPE html>
<html lang="es">

<head>
  <%- include('tools/head'); %>
</head>

<body class="bg-gradient-primary">
  <div class="container">
    <!-- Outer Row -->
    <div class="row justify-content-center">
      <div class="col-xl-10 col-lg-12 col-md-9">
        <div class="card o-hidden border-0 shadow-lg my-5">
          <div class="card-body p-0">
            <!-- Nested Row within Card Body -->
            <div class="row">
              <div class="col-lg-6 d-none d-lg-block bg-login-image"></div>
              <div class="col-lg-6">
                <div class="p-5">
                  <div class="text-center">
                    <h1 class="h4 text-gray-900 mb-4">Inicio de Sesión</h1>
                  </div>
                  <form id="formLogin" action="/" method="POST">
                    <div class="form-group">
                      <label for="user">Numero de Identificación</label>
                      <input type="number" class="form-control form-control-user" id="user" name="user"
                        placeholder="Digite el Numero" />
                    </div>
                    <div class="form-group">
                      <label for="password">Contraseña</label>
                      <input placeholder="Escribe tu contraseña" type="password" class="form-control form-control-user"
                        name="pass" id="pass" />
                    </div>
                    <input type="submit" class="btn btn-primary btn-user btn-block" name="login" id="login"
                      value="ACEPTAR" />
                  </form>
                  <hr />
                  <!-- <div class="text-center">
                    <a class="small" href="forgot-password.html">¿Olvidaste tú contraseña?</a>
                  </div> -->
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <!-- Bootstrap core JavaScript-->
  <script src="/vendor/jquery/jquery.min.js"></script>
  <script src="/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

  <!-- Core plugin JavaScript-->
  <script src="/vendor/jquery-easing/jquery.easing.min.js"></script>

  <!-- Custom scripts for all pages-->
  <script src="/js/sb-admin-2.min.js"></script>

  <!-- Alert -->
  <script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  <% if(alert) { %>
    <script type="text/JavaScript">
      Swal.fire({
        title: '<%= alertTitle %>',
        text:'<%= alertMessage %>',
        icon:'<%= alertIcon %>',
        showConfirmButton: <%= showConfirmButton %>,
        timer: <%= timer %>
      }).then(()=>{
        window.location = '/<%= ruta %>'
      })
    </script>
    <% } %>
</body>

</html>