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

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>GhostKitchen App</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
    integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
</head>

<body>
  <main>
    <div class="container">
      <div>
        <h3>
          GhostKitchen App
        </h3>
      </div>
      <div class="p-4">
        <div class="display-4">
          Your Order
        </div>
        <hr />
        <div class="col-4">
          <form action="/user/brands/<%= brandID %>/menu/order/create/" method="POST">
            <div class="display-6 text-capitalize">
              <%= meal.meal_name %>
            </div>
            <br />
            <div class="lead">
              <%= meal.meal_desc %>
            </div>
            <br />
            <div>
              <label for="quantity-select" style="font-weight: bold;">Quantity:</label>
              <select class="form-control" id="quantity-select" name="quantity">
                <% for (let i=1; i<=20; i++) {%>
                  <option value="<%= i %>" <% if(i===1) { %> selected <% } %>
                      >
                      <%= i %>
                  </option>
                  <% } %>
              </select>
            </div>
            <br />
            <div>
              <label for="pickup-select" style="font-weight: bold;">Pickup Type:</label>
              <select class="form-control" id="pickup-select" name="pickup_id">
                <% pickups.forEach(function (f) {%>
                  <option value="<%= f.id %>">
                    <%= f.type %>
                  </option>
                  <% }) %>
              </select>
            </div>
            <br />
            <div>
              <label for="location-select" style="font-weight: bold;">Location:</label>
              <select class="form-control" id="location-select" name="location_id">
                <% locations.forEach(function (f) {%>
                  <option value="<%= f.id %>">
                    <%= f.address%>, <%= f.state%>
                  </option>
                  <% }) %>
              </select>
            </div>
            <br />
            <div>
              <button type="submit" class="btn btn-primary" style="width: 100%;" name="meal_id"
                value="<%= meal._id %>">Checkout</button>
            </div>
          </form>
        </div>
      </div>
    </div>
  </main>

</body>

</html>
