<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('location.update',$location->id)}}" method="POST" enctype="multipart/form-data">
                @method('PATCH')
                @csrf
                <div class="col-12">
                  <div class="row">
                    <div class="col-md-6 form-group">
                       <label>Short Address</label>
                       <input type="text" class="form-control" value="{{$location->shortadd}}" name="shortadd">
                    </div>
                    <div class="col-md-6 form-group">
                       <label>Address</label>
                       <input type="text" class="form-control" value="{{$location->address}}" name="address" required="">
                    </div>
                    <div class="col-md-6 form-group">
                       <label>Email</label>
                       <input type="text" class="form-control" value="{{$location->email}}" name="email" required="">
                    </div>
                    <div class="col-md-6 form-group">
                       <label>Call</label>
                       <input type="text" class="form-control" value="{{$location->call}}" name="call" required="">
                    </div>
                    <div class="col-md-6 form-group">
                       <label>Iframe</label>
                       <input type="text" class="form-control" value="{{$location->iframe}}" name="iframe" required="">
                    </div>
                    <div class="col-6">
                       <label>Status</label>
                       <select name="status" class="form-control" required>
                        <option value="1" {{$location->status == 1 ? 'selected':''}}>Active</option>
                        <option value="0" {{$location->status == 0 ? 'selected':''}}>Inactive</option>
                     </select>
                    </div>
                    <div class="col-6">
                     <label>Region</label>
                     <select name="region" class="form-control" required>
                      <option value="1" {{$location->region == 1 ? 'selected':''}}>western</option>
                      <option value="0" {{$location->region == 0 ? 'selected':''}}>Eastern</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>