 @extends('admin.layouts.main-layout')

 @section("content")
 <section class="content-header">
     <div class="container-fluid">
         <div class="row mb-2">
             <div class="col-sm-12">
                 <h2>Edit New Banner</h2>
             </div>
         </div>
     </div>
     <div class="row">
         <div class="col mx-auto">
             <!-- <h6 class="mb-0 text-uppercase">Create  New Astrologer</h6> -->
             <hr />
             <div class="card border-top border-0 border-4 border-info">
                 <div class="card-body">
                     <div class="border p-4 rounded">
                         <div class="card-title d-flex align-items-center">
                             <div><i class="bx bxs-user me-1 font-22 text-info"></i>
                             </div>
                             <h5 class="mb-0 text-info">Edit Description</h5>
                         </div>
                         <hr />
                         <div>
                             <form method="post" action="{{ url('admin/how-to-play/'. $detail->id) }}" onsubmit="return validateForm('addsstatus')" class="addsstatus" autocomplete="off" enctype="multipart/form-data">
                                 @csrf
                                 {{ method_field('PATCH') }}
                                 <div class="container">
                                     <div class="row form-holder">
                                         <div class="col-xl-6  col-lg-12 col-md-12 col-sm-12 col-12 ">
                                             <div class="form-group">
                                                 <label>Description</label>
                                                 <textarea id="description" name="description" rows="8" cols="50" class="form-control input_field">{{$detail->description}}
                                                 </textarea>
                                             </div>
                                         </div>
                                     </div>
                                 </div>
                                 <div class="row">
                                     <label class="col-form-label"></label>
                                     <div class="d-flex justify-content-end">
                                         <button type="submit" class="btn btn-success mr-2">Save</button>
                                         <a href="{{ url('admin/how-to-play') }}" class="btn btn-danger mr-2">Cancel</a>
                                     </div>
                                 </div>
                             </form>
                         </div>
                     </div>
                 </div>
             </div>
         </div>
     </div>
     <!--end row-->
 </section>
 @endsection
 <script>
     function previewImage(event) {
         var input = event.target;
         if (input.files && input.files[0]) {
             var reader = new FileReader();
             reader.onload = function(e) {
                 var imgElement = document.getElementById('imagePreview');
                 imgElement.src = e.target.result;
             }
             reader.readAsDataURL(input.files[0]);
         }
     }
 </script>