<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Account</title>
    <script src="https://www.gstatic.com/firebasejs/9.0.2/firebase-app.js"></script>
    <script src="https://www.gstatic.com/firebasejs/9.0.2/firebase-auth.js"></script>
    <script src="https://www.gstatic.com/firebasejs/9.0.2/firebase.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
     <link rel="stylesheet" href="/stylesheets/register.css">
     
  </head>
  <body>

    <style>
      @media only screen and (max-width: 600px) {
  .full-page{
      display: none;
  }
}
      body{
        display: flex;
      }
      .reg-container{
        width: 50vw;
      }
    </style>
   <div class="full-page" >


    <div class="reg-container">
      <form action="/register" method="post">

        <div class="mb-3">
            <label for="exampleInputEmail1" class="form-label">Name</label>
            <input type="text" name="name" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
          </div>

        <div class="mb-3">
          <label for="exampleInputEmail1" class="form-label">Email</label>
          <input type="email" name="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
        </div>

        <div class="mb-3">
            <label for="exampleInputEmail1" class="form-label">Mobile Number</label>
            <input type="number" name="mobile" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
          </div>

          <div class="mb-3">
            <label for="exampleInputEmail1" class="form-label">Address</label>
            <input type="text" name="address" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
          </div>

          <div class="mb-3">
            <label for="exampleInputEmail1" class="form-label">Area Pin</label>
            <input type="number" name="postal" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
          </div>

        <div class="mb-3">
          <label for="exampleInputPassword1" class="form-label">Password</label>
          <input type="password" name="password" class="form-control" id="exampleInputPassword1">
        </div>

        <button type="submit" class="btn btn-primary" id="registerButton">Register</button>
        <span id="al-reg">already an account?, Please <span id="lgin">Login</span> Your account</span>
        <br> <span style="color: red; position: relative; left: 30%;"><%=error%></span>
      <!-- <button googleSignin()>Gooogle Button</button> -->
      </form>
    </div>

    <!-- Login page -->
    <div class="login-container">
     <div class="shift">
      <form action="/login" method="post">

        <div class="mb-3">
          <label for="exampleInputEmail1" class="form-label">Email</label>
          <input type="email" name="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
        </div>

        <div class="mb-3">
          <label for="exampleInputPassword1" class="form-label">Password</label>
          <input type="password" name="password" class="form-control" id="exampleInputPassword1">
        </div>

        <button type="submit" class="btn btn-primary" id="registerButton">Login</button>
        <span id="al-reg">don't have an account?, Please <span id="crt">Create</span> Your account</span>
        <!-- <br> <button>Google Login</button> -->
       
      </form>
     </div>
    </div>

    <img src="/images/background.jpg" alt="">
    <div class="m-logo">
      <img src="/images/Amazon_logo.svg.png" alt="">
     </div>
   </div>

    
    <script src="/javascripts/reg.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>

     <script>
//     var provider = new firebase.auth.GoogleAuthProvider();

// function googleSignin() {
//    firebase.auth()
   
//    .signInWithPopup(provider).then(function(result) {
//       var token = result.credential.accessToken;
//       var user = result.user;
		
//       console.log(token)
//       console.log(user)
//    }).catch(function(error) {
//       var errorCode = error.code;
//       var errorMessage = error.message;
		
//       console.log(error.code)
//       console.log(error.message)
//    });
// }
     </script>

<script src="/javascripts/alert.js"></script>
  </body>
</html>