<x-app-layout>
    @include('admin.include.sidebar')
    <!-- Page Content  -->
    <div class="wrapper">
       <!-- Sidebar  -->
       <!-- Page Content  -->
       <div id="content">

          <div class="navbar-expand-lg navbar-light bg-light">
            <form action="{{route('setting.update',$coupon->id)}}" method="POST" enctype="multipart/form-data">
               @csrf
               @method('PATCH')
               <div class="col-12">
                  <div class="row">
                    <div class="col-md-6 form-group">
                       <label>Minimum Booking Days</label>
                       <input type="text" class="form-control" value="{{$coupon->minday}}" id="" name="minday" required="">
                    </div>
                    <div class="col-md-6 form-group">
                       <label>Minimum Booking Amount</label>
                       <input type="text" class="form-control" value="{{$coupon->minamt}}" id="" name="minamt"required="">
                    </div>
                    <div class="col-md-6 form-group">
                       <label>Booking Restriction Heading</label>
                       <input placeholder="If you type anything here, it will no allow any booking and will show this on the app." type="text" class="form-control" value="{{$coupon->reshead}}" id="" name="reshead">
                    </div>
                    <div class="col-md-6 form-group">
                       <label>Booking Restriction Text</label>
                       <input placeholder="If you type anything here, it will no allow any booking and will show this on the app." type="text" class="form-control" value="{{$coupon->restext}}" id="" name="restext">
                    </div>
                    <div class="col-md-6 form-group">
                       <label>Latest IOS Version</label>
                       <input type="text" class="form-control" value="{{$coupon->iosversion}}" id="" name="iosversion"required="">
                    </div>
                    <div class="col-md-6 form-group">
                       <label>Latest Android Version</label>
                       <input type="text" class="form-control" value="{{$coupon->andversion}}" id="" name="andversion"required="">
                    </div>
                    <div class="col-md-6 form-group">
                     <label>Minimum Booking Age</label>
                     <input type="number" class="form-control" value="{{$coupon->min_age}}" id="" name="min_age"required="">
                  </div>
                  <div class="col-md-6 form-group">
                     <label>Minimum Licence Years</label>
                     <input type="number" class="form-control" value="{{$coupon->min_lic_yr}}" id="" name="min_lic_yr"required="">
                  </div>
                  <div class="col-md-6 form-group">
                     <label>Currency</label>
                     <select name="curr" class="form-control" required>
                        @foreach ($currency as $item)
                        <option value="{{$item->currency_symbol}}" {{$item->currency_symbol == $coupon->curr ? 'selected':''}}>{{$item->country}} ({{$item->currency_symbol}})</option>
                        @endforeach
                     </select>
                  </div>
                  <div class="col-md-6 form-group">
                     <label>Time Zone</label>
                     <select name="timezone" class="form-control" required>
                        @foreach ($country as $item)
                        <option value="{{$item}}" {{$item == $coupon->timezone ? 'selected':''}}>{{$item}}</option>
                        @endforeach
                     </select>
                  </div>
                  <div class="col-md-6 form-group">
                     <label>Booking Cutoff Days (in Days)</label>
                     <input type="number" class="form-control" value="{{$coupon->minadvance}}" id="" name="minadvance"required=""> 
                  </div>
                    <div class="col-6 form-group">
                       <label> Accept Card Payment</label>
                       <select name="cardpay" class="form-control" required>
                          <option value="1" {{$coupon->cardpay == 1 ? 'selected':''}}>Yes</option>
                          <option value="0" {{$coupon->cardpay == 0 ? 'selected':''}}>No</option>
                       </select>
                    </div>
                    <div class="col-6 form-group">
                       <label>Accept Cash Payment</label>
                       <select name="cashpay" class="form-control" required>
                          <option value="1" {{$coupon->cashpay == 1 ? 'selected':''}}>Yes</option>
                          <option value="0" {{$coupon->cashpay == 0 ? 'selected':''}}>No</option>
                       </select>
                    </div>
                     <div class="col-md-12">
                        <input type="submit" class="btn btn-success" value="submit">
                     </div>
                  </div>
               </div>
            </form>
          </div>
       </div>
    </div>
  </x-app-layout>
