@extends('layouts.master')
@section('content')
<head>
  <meta name="csrf-token" content="{{ csrf_token() }}" />
</head>
<div class="container-fluid px-4">

    <div class="card mt-4">
                   <div class="card-header">
                                  <h1 class="">{{__('Edit Shop Profile')}}</h1>
                                  <!-- <button type="C_submit" onclick="login()" class="btn btn-primary">{{__('addCountryCode')}}</button> -->
                   </div>

                   <div class="card-body">

                     @if ($errors->any())
                     <div class="alert alert-danger">
                         @foreach ($errors->all() as $error )
                         <div>{{$error}}</div>

                         @endforeach

                     </div>

                     @endif

                        <form action="{{ url('super-admin/update-admin/'.$admin->id) }}" method="POST" enctype="multipart/form-data">

                                                 @csrf
                                                 @method('PUT')
                                                 {{-- <div class="mb-3">
                                                    <label for="">{{__('adminName')}}
                                                    </label>
                                                    <input type="text" value="{{$admin->name}}" name="name" class="form-control">
                                                 </div>
                                                 <div class="mb-3">
                                                    <label for="">{{__('adminAddress')}}
                                                    </label>
                                                    <input type="text" value="{{$admin->address}}"  name="address" class="form-control">
                                                 </div>
                                                 <div class="mb-3">
                                                                <label for="">{{__('adminusername')}}
                                                                </label>
                                                                <input type="text" value="{{$admin->email}}"  name="email" class="form-control">
                                                 </div>

                                              
                                                 <div class="mb-3">
                                                    <label for="">{{__('adminPassword')}}
                                                    </label>
                                                    <input  type="text" name="password" class="form-control">
                                                  </div>


                                                    <button type="C_submit" class="btn btn-primary">{{__('saveAdmin')}}</button>

             --}}
             <h5 class="">Shop Edit</h5>
             <div class="row">
               <div class="mb-3 col-md-6">
         
       
               <label for="">{{__('Shop Name')}}<span style="color: red">*</span>
               </label>
               <input type="text" value="{{$admin->shopname}}"  name="shopname" class="form-control">
            
         </div>
         <div class="mb-3 col-md-6">
            <label for="">{{__('Permission number')}}
            </label>
            <input type="text" value="{{$admin->permission_number }}" name="permission_number" class="form-control">
         </div>
         <div class="mb-3 col-md-6">
            <label for="">{{__('adminName')}}<span style="color: red">*</span>
            </label>
            <input type="text"value="{{$admin->name}}" name="name" class="form-control">
         </div>
            <div class="mb-3 col-md-6">
               <label for="">{{__('Phone Number')}}<span style="color: red">*</span>
               </label>
               <input type="text"value="{{$admin->shopnumber}}"  name="shopnumber" class="form-control">
            </div>
            <div class="mb-3 col-md-6">
               <label for="">{{__('Business hours')}}<span style="color: red">*</span>
               </label>
               <textarea type="text" name="business_hours" class="form-control">{{$admin->business_hours}}</textarea>
            </div>
            <div class="mb-3 col-md-6">
             <label for="">{{__('Regular holiday')}}<span style="color: red">*</span>
             </label>
             
             <input type="text" value="{{$admin->holiday }}" name="holiday" class="form-control">
          </div>

            <div class="row">
               <div class="mb-3 col-md-6">
                <label for="">{{__('adress')}}<span style="color: red">*</span>
                </label>
                <textarea type="text" name="adress" class="form-control">{{$admin->adress}}</textarea>
             </div>
             <div class="mb-3 col-md-6">
              <label for="">{{__('zipcode')}}<span style="color: red">*</span>
              </label>
              <input value="{{$admin->zipcode}}" type="text" name="zipcode" class="form-control">
           </div>
               </div>
             <div class="mb-3">
               <label for="">{{__('Shop Image')}}</label>
               <input type="file" value="{{$admin->name}}"name="shopimage" class="form-control">
               <img src="{{ asset($admin->shopimage)}}" width="50px" height="50px" alt="Img">
           </div>
               </div>
         
    


             <h5 style="margin-top: 20px"  class="">Admin Edit</h5>

             <div class="row">
               <div class="mb-3 col-md-6">
                            <label for="">{{__('adminusername')}}<span style="color: red">*</span>
                            </label>
                            <input value="{{$admin->email}}" type="text" name="email" class="form-control">
             </div>

          
             <div class="mb-3 col-md-6">
                <label for="">{{__('adminPassword')}}
                </label>
                 <input type="text" name="password" class="form-control">
              </div>
              <div class="mb-3">
               <label class="form-label" for="country">{{__('plantype')}}</label><span style="color: red">*</span>
               <select id="select" name="plan_type" class="select2 form-select">
                
                 <option value="0" {{ $admin->plan_type == 0 ? 'selected' : '' }}>{{__('free')}}</option>
                 <option value="1" {{ $admin->plan_type == 1 ? 'selected' : '' }}>{{__('standard')}}</option>
                 <option value="2" {{ $admin->plan_type == 2 ? 'selected' : '' }}>{{__('premium')}}</option>
           


               </select>
             </div>

             </div>
                <button type="C_submit" class="btn btn-primary">{{__('Update Shop')}}</button>
                <a class="btn btn-danger" href="{{ url('super-admin/view-admin-list') }}">{{__('Cancel')}}</a>


                                  </form>


                   </div>

    </div>
    <script>

 </script>
</div>

 @endsection
