<% layout('layouts/customer-boilerplate')  -%>


    <div class="row ">
        <div class="col-md-6 offset-md-3 col-xl-4 offset-xl-4">
            <div class="card shadow">
                <!-- <img src="https://images.unsplash.com/photo-1488459716781-31db52582fe9?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="" class="card-img-top" /> -->

                <div class="card-body">
                    <h5 class="card-title">Add product: </h5>
                    <form action="/admin/products/add" method="POST" enctype="multipart/form-data">

                        <div class="mb-3">
                            <label class="form-label" for="name">Product name: </label>
                            <input class="form-control" type="text" id="name" name="name" required autofocus>
                        </div>
                        <div class="mb-3">
                            <label class="form-label" for="product_images">Product images: </label>
                            <input class="form-control" type="file" id="product_images" name="product_images" required multiple>
                        </div>
                        <div class="mb-3">
                            <label for="category" class="form-label mt-4">Select category: </label>
                            <select class="form-select" id="category" name="category" required>
                                <option disabled selected>Select here</option>
                                <option>fruits</option>
                                <option>vegetables</option>
                                <option>meat</option>
                                <option>spices</option>          
                            </select>
                        </div>

                        <div class="mb-3">
                            <label class="form-label" for="price">Price: </label>
                            <div class="input-group">
                                <div class="input-group-text">zl</div>
                                <input type="number" class="form-control" id="price" name="price" required>
                            </div>
                        </div>

                        <div class="mb-3">
                            <div class="form-check form-switch">
                                <input class="form-check-input" id="availabletag" type="checkbox" name="tags" value="Available" id="tags" checked>
                                <label class="form-check-label" for="tags">Available</label>
                            </div>
                            <input hidden class="form-check-input" id="availabletag" type="checkbox" name="tags" value="" id="tags" checked>
                            <div class="form-check form-switch">
                                <input class="form-check-input" id="onsaletag" type="checkbox" name="tags" value="OnSale" id="tags">
                                <label class="form-check-label" for="tags">OnSale</label>
                            </div>
                            <div class="form-check form-switch">
                                <input class="form-check-input" id="outofstocktag" type="checkbox" name="tags" value="Out-of-Stock" id="tags">
                                <label class="form-check-label" for="tags">Out-of-Stock</label>
                            </div>
                        </div>


                        <div class="mb-3">
                            <label class="form-label" for="quantity">Quantity: </label>
                            <input class="form-control" type="number" id="quantity" name="quantity" required>

                            <label for="quantity_type" class="form-label mt-4">Quantity type: </label>
                            <select class="form-select" id="quantity_type" name="quantity_type" required>
                                <option disabled selected>Select here</option>
                                <option>kg</option>
                                <option>piece</option>                     
                            </select>
                        </div>

                        <div class="mb-3">
                            <label for="description" class="form-label mt-4">Product description: </label>
                            <textarea class="form-control" id="description" name="description" rows="2" required></textarea>
                        </div>

                        <div>
                            <button class="btn btn-primary btn-block ">Submit</button>
                            <a href="/products" class="btn btn-info btn-block" role="button">Back</a>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>