<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>OpenKDS &raquo; Edit <%= item.name %></title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    
    <style>
        
        body {
            background-color: #f8f9fa;
        }
        
        
        
        
    </style>
    
</head>
<body>
    
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <a class="navbar-brand" href="#">OpenKDS</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item">
                    <a class="nav-link" href="/web/dashboard">Dashboard</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/web/stations">Stations</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/web/stationtypes">Station Types</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/web/orders">Orders</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link active" href="/web/items">Menu Items</a>
                </li>
            </ul>
        </div>
    </nav>
    
    <div class="container">
        <div class="row">
            <div class="col-12">
                <a href="/web/items" class="btn btn-primary">Back to Items</a>
            </div>
        </div>
        <div class="row">
            <div class="col-12">
                <h1>Edit <%=item.name %>.</h1>
                <p>Edit the item <%= item.name%>. This item is currently a <%= stationtype.name %> item.</p>
            </div>
        </div>
    </div>
    
    <hr />
    
    <div class="container">
        <h2>
            Item Details
        </h2>
        <p>Manage the item details.</p>
        <div class="name">
            <label for="itemName">Station Type Name</label>
            <input type="text" name="name" id="itemName" placeholder="Item Name" value="<%= item.name %>">
        </div>

        <div class="price">
            <label for="itemPrice">Item Price</label>
            <input type="text" name="price" id="itemPrice" placeholder="Item Price" value="<%= item.price %>">
        </div>

        <div class="stationType">
            <label for="itemStationType">Station Type</label>
            <select name="stationType" id="itemStationType">
                <% for (var i = 0; i < stationtypes.length; i++) { %>
                    <option value="<%= stationtypes[i].id %>" <% if (stationtypes[i].id == stationtype.id) { %> selected <% } %>><%= stationtypes[i].name %></option>
                <% } %>
            </select>
        </div>

        <div class="save">
            <button class="btn btn-primary">Save Changes</button>
        </div>

        

       

        <h2>Destructive Actions</h2>
        <p>These actions are destructive and cannot be undone.</p>
        <div class="row">
            <div class="col-12">
                <a href="/web/stations/<%= stationtype.id %>/delete" class="btn btn-danger">Delete Station</a>
            </div>
        </div>  



        
        
    </div>
    
    
</body>
</html>