<!DOCTYPE html>
<html lang="en" class="h-100">


<head>
    <!-- meta and links start -->
    <%- include('templet/meta')-%>



</head>

<body>
        <%- include('templet/preloder_topbar_sidebar',{titel: accessdata?.topbardata?.name})-%>
        <!--********** Content body start **********-->

        <div class="content-body">

            <div class="container-fluid" style="min-height: 100vh;">
                <div class="row">
                    <div class="col-12">
                        <div class="card ">
                            <div class="card-body">

                                <!----- shop form ----->

                                <div class="shop_form">
                                    <% storedata.forEach(function(data){ %>
                                        <form class="row g-4 align-items-center"
                                            action="/tool/updatesetting/<%=data.id %>" method="post"
                                            enctype="multipart/form-data">
                                            <div>
                                                <%= language.APPLICATION_DETAILS %>
                                            </div>

                                            <hr>
                                            <div class="row">

                                                <div class="col-xl-9">
                                                    <div class="row mt-3">
                                                        <div class="col-md-6">
                                                            <label class="form-label">
                                                                <%= language.Application_Name %> <span
                                                                        class="text-danger">*</span>
                                                            </label>
                                                            <input type="text" placeholder="Enter Application Name"
                                                                class="form-control" name="name"
                                                                value="<%=data.name %>">
                                                            <input type="hidden" name="adminid"
                                                                value="<%=data.admin_id %>">
                                                        </div>

                                                        <div class="col-md-6">
                                                            <label class="form-label">
                                                                <%= language.Phone_Number %> <span
                                                                        class="text-danger">*</span>
                                                            </label>
                                                            <input type="text" class="form-control"
                                                                placeholder="Enter Phone Number" name="number"
                                                                value="<%=data.mobile_number %>">
                                                        </div>
                                                    </div>

                                                    <div class="row mt-4">
                                                        <div class="col-md-6">
                                                            <label class="form-label">
                                                                <%= language.Username %> <span
                                                                        class="text-danger">*</span>
                                                            </label>
                                                            <input type="text" class="form-control"
                                                                placeholder="Enter Username" name="username"
                                                                value="<%= data.username %>">
                                                        </div>

                                                        <div class="col-md-6">
                                                            <label class="form-label">
                                                                <%= language.Password %> <span
                                                                        class="text-danger">*</span>
                                                            </label>
                                                            <input type="text" class="form-control"
                                                                placeholder="Update Password" name="password"
                                                                value="">
                                                        </div>
                                                    </div>

                                                    <div class="row mt-4">
                                                        <div class="col-md-6">
                                                            <label class="form-label">
                                                                Walk in Customer
                                                                <span class="text-danger">*</span>
                                                            </label>
                                                            <input type="text" class="form-control"
                                                                placeholder="Enter  Walk in Customer"
                                                                name="walkincustome" value="<%= data.customer_name %>">
                                                        </div>
                                                    </div>


                                                </div>

                                                <div class="col-xl-3">
                                                    <div class="center">
                                                        <div class="form-input">
                                                            <div class="preview m-3 mt-0">
                                                                <img id="file-preview" width="180"
                                                                    src="../uploads/<%=data.logo %>" alt="image">
                                                            </div>

                                                            <input class="d-none" type="file" id="file-1" name="logo"
                                                                accept="image/*" onchange="showPreview(event);">

                                                            <label class="btn btn-primary w-100" for="file-1">
                                                                <%= language.Upload_App_Logo %>
                                                            </label>
                                                        </div>
                                                    </div>
                                                </div>




                                            </div>

                                            <hr>

                                            <div>
                                                <%= language.FINANCE_SETTINGS %>
                                            </div>

                                            <hr>

                                            <div class="col-md-4">
                                                <label class="form-label">
                                                    <%= language.Shop_Commission %>
                                                </label>
                                                <input type="number" class="form-control" placeholder="Shop Commission"
                                                    name="commission" value="<%=data.shop_commission %>" step="0.01"
                                                    readonly>
                                            </div>

                                            <div class="col-md-4">
                                                <label class="form-label">
                                                    <%= language.Tax_Percentage %>
                                                </label>
                                                <input type="text" class="form-control" name="taxpercent"
                                                    value="<%=data.tax_percent %>">
                                            </div>

                                            <hr>

                                            <div>
                                                <%= language.FIRM_ADDRESS %>
                                            </div>

                                            <hr>

                                            <div class="col-md-3">
                                                <label class="form-label">
                                                    <%= language.Country %>
                                                </label>
                                                <input type="text" class="form-control" placeholder="Enter Country Name"
                                                    name="country" value="<%=data.country %>">
                                                <!-- <select class="default-select form-control wide mb-3" name="country"     >
                                                    
                                                    <option value="AR" <%= data.country == "AR"? 'selected': '' %> >Argentina [AR]</option>
                                                    <option value="AU" <%= data.country == "AU"? 'selected': '' %>>Australia [AU]</option>
                                                    <option value="BE" <%= data.country == "BE"? 'selected': '' %>>Belgium [BE]</option>
                                                    <option value="BR" <%= data.country == "BR"? 'selected': '' %>>Brazil [BR]</option>
                                                    <option value="CA" <%= data.country == "CA"? 'selected': '' %>>Canada [CA]</option>
                                                    <option value="CN" <%= data.country == "CN"? 'selected': '' %>>China [CN]</option>
                                                    <option value="DK" <%= data.country == "DK"? 'selected': '' %>>Denmark [DK]</option>
                                                    <option value="IN" <%= data.country == "IN"? 'selected': '' %>>India [IN]</option>
                                                    <option value="EG" <%= data.country == "EG"? 'selected': '' %>>Egypt [EG]</option>
                                                    <option value="FR" <%= data.country == "FR"? 'selected': '' %>>France [FR]</option>
                                                    <option value="DE" <%= data.country == "DE"? 'selected': '' %>>Germany [DE]</option>
                                                    <option value="JP" <%= data.country == "JP"? 'selected': '' %>>Japan [JP]</option>
        
                                                </select> -->
                                            </div>

                                            <div class="col-md-3">
                                                <label class="form-label">
                                                    <%= language.State %>
                                                </label>
                                                <input type="text" class="form-control" placeholder="Enter State Name"
                                                    name="state" value="<%=data.state %>">
                                            </div>

                                            <div class="col-md-3">
                                                <label class="form-label">
                                                    <%= language.City %>
                                                </label>
                                                <input type="text" class="form-control" placeholder="Enter City Name"
                                                    name="city" value="<%=data.city %>">
                                            </div>

                                            <div class="col-md-3">
                                                <label class="form-label">
                                                    <%= language.District %>
                                                </label>
                                                <input type="text" class="form-control"
                                                    placeholder="Enter District Name" name="district"
                                                    value="<%=data.district %>">
                                            </div>

                                            <div class="col-md-3">
                                                <label class="form-label">
                                                    <%= language.Zip_Code %>
                                                </label>
                                                <input type="text" class="form-control" placeholder="Enter Zip Code"
                                                    name="zip_code" value="<%=data.zipcode %>">
                                            </div>

                                            <div class="col-md-3">
                                                <label class="form-label">
                                                    <%= language.Store_Email %>
                                                </label>
                                                <input type="email" class="form-control" placeholder="Enter Store Email"
                                                    name="store_email" value="<%=data.store_email %>">
                                            </div>

                                            <div class="col-md-3">
                                                <label class="form-label">
                                                    <%= language.Store_Tax_Number %>
                                                </label>
                                                <input type="text" class="form-control"
                                                    placeholder="Enter Store Tax Number" name="tax_number"
                                                    value="<%=data.store_tax_number %>">
                                            </div>

                                            <div class="col-12 mb-3">
                                                <label for="inputAddress" class="form-label">
                                                    <%= language.Address %>
                                                </label>
                                                <input type="text" class="form-control" placeholder="Enter Address"
                                                    name="address" value="<%=data.address %>">
                                            </div>

                                            <hr>






                                            <button type="submit"
                                                class="btn btn-primary mt-5 <%= update ? '': 'd-none' %>">
                                                <%= language.Save_Data %>
                                            </button>

                                        </form>
                                        <% }) %>

                                </div>

                                <!----- end shop form ----->
                            </div>
                        </div>
                    </div>
                </div>
            </div>


        </div>

        <!--********** Content body end **********-->

        </div>
        <!--**********************************
            Footer start
        ***********************************-->
        <%- include('templet/footer')-%>

            <!--**********************************
            Footer end
        ***********************************-->

            </div>

            <!--********** Main wrapper end **********-->
            <%- include('templet/script')-%>

</body>


</html>