@extends('layouts.admin_layout')

@section('content')



<main class="h-full pb-16 overflow-y-auto">
          <div class="container px-6 mx-auto grid">
            <br><br>
            <h2
              class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"
            >
            <span class="text-blue-500">Edit</span> Company Details
            </h2>
            <!-- CTA -->
            <a
              class="flex bg-blue-600 items-center justify-between p-4 mb-8 text-sm font-semibold shadow-md focus:outline-none focus:shadow-outline-green"
              href="{{ url('/') }}" style="color: #fff;"
            >
              <div class="flex items-center">
                <svg
                  class="w-5 h-5 mr-2"
                  fill="currentColor"
                  viewBox="0 0 20 20"
                >
                  <path
                    d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
                  ></path>
                </svg>
                <span>Go to website</span>
              </div>
              <span>View &RightArrow;</span>
            </a>

            <!-- General elements -->
            <h4
              class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
            >
            <span class="text-blue-500">Company</span> Details Control
            </h4>
            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
            <x-alert/>
            <form method="post" action="{{ route('admin.company_update') }}" class="mt-4">
            @csrf
            @method('patch')
            <div class="flex items-center mb-4">
              <label class="block w-full mr-3 text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Company Name</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $company_name->description }}" name="company_name" type="text"
                />
              </label>

              
              <label class="block w-full text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Company Email</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $company_email->description }}" name="company_email" type="text"
                />
              </label>
            </div>

            <div class="flex items-center mb-4">
              <label class="block w-full mr-3 text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Company Mobile 1</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $company_phone1->description }}" name="company_phone1" type="text"
                />
              </label>

              
              <label class="block w-full text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Company Mobile 2</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $company_phone2->description }}" name="company_phone2" type="text"
                />
              </label>
            </div>

            <div class="flex items-center mb-4">
              <label class="block w-full mr-3 text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Facebook Handle</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $company_facebook_handle->description }}" name="company_facebook_handle" type="text"
                />
              </label>

              
              <label class="block w-full text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Twitter Handle</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $company_twitter_handle->description }}" name="company_twitter_handle" type="text"
                />
              </label>
            </div>
            
            <div class="flex items-center mb-4">
              <label class="block w-full mr-3 text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Bank Name</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $bank->description }}" name="bank_name" type="text"
                />
              </label>

              
              <label class="block w-full text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Account Name</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $account_name->description }}" name="account_name" type="text"
                />
              </label>
            </div>
            
            <div class="flex items-center mb-4">
              <label class="block w-full text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Account Number</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $account_number->description }}" name="account_number" type="number"
                />
              </label>
            </div>

            <div class="md:flex items-center mb-4">
            <label class="block w-full mt-4 text-sm">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Address 1</span>
                <textarea
                  class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
                  rows="4" name="company_address1"
                >{{ $company_address1->description }}</textarea>
              </label>
            </div>

            <div class="md:flex items-center mb-4">
            <label class="block w-full mt-4 text-sm">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Address 2</span>
                <textarea
                  class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
                  rows="4" name="company_address2"
                >{{ $company_address2->description }}</textarea>
              </label>
            </div>

              <div class="mx-auto">
              <button
                  class="px-5 bg-blue-600 py-3 font-medium leading-5 text-white transition-colors duration-150 border border-transparent active:bg-green-500 hover:bg-green-700 focus:outline-none focus:shadow-outline-green"
                  type="submit" style="color: #fff;"
                >
                  Update Info
                </button>
              </div>
            </form>

        </div>
        
        
        
        
        <!-- General elements -->
            <h4
              class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
            >
              Support Details Control
            </h4>
            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
            <form method="post" action="{{ route('admin.support_update') }}" class="mt-4">
            @csrf
            @method('patch')
            <div class="flex items-center mb-4">
              <label class="block w-full mr-3 text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Support Instagram</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $instagram->description }}" placeholder="Add Link..." name="instagram" type="text"
                />
              </label>

              
              <label class="block w-full text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Instagram status</span>
                <select
                  name="insta_status" class="block w-full mt-1 text-sm dark:text-gray-300
                  dark:border-gray-600 dark:bg-gray-700 form-select focus:border-green-400 
                  focus:outline-none focus:shadow-outline-green dark:focus:shadow-outline-gray">
                    @if($instagram->status == 'OFF')
                    <option class="active">OFF</option>
                    <option>ON</option>
                    @elseif($instagram->status == 'ON')
                    <option class="active">ON</option>
                    <option>OFF</option>
                    @else
                    <option>ON</option>
                    <option>OFF</option>
                    @endif
                </select>
              </label>
            </div>

           <div class="flex items-center mb-4">
              <label class="block w-full mr-3 text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Support Facebook</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $facebook->description }}" placeholder="Add Link..." name="facebook" type="text"
                />
              </label>

              
              <label class="block w-full text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Facebook status</span>
                <select
                  name="face_status" class="block w-full mt-1 text-sm dark:text-gray-300
                  dark:border-gray-600 dark:bg-gray-700 form-select focus:border-green-400 
                  focus:outline-none focus:shadow-outline-green dark:focus:shadow-outline-gray">
                    @if($facebook->status == 'OFF')
                    <option class="active">OFF</option>
                    <option>ON</option>
                    @elseif($facebook->status == 'ON')
                    <option class="active">ON</option>
                    <option>OFF</option>
                    @else
                    <option>ON</option>
                    <option>OFF</option>
                    @endif
                </select>
              </label>
            </div>

            <div class="flex items-center mb-4">
              <label class="block w-full mr-3 text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Support Email</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $email->description }}" placeholder="Add Link..." name="email" type="text"
                />
              </label>

              
              <label class="block w-full text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Email status</span>
                <select
                  name="email_status" class="block w-full mt-1 text-sm dark:text-gray-300
                  dark:border-gray-600 dark:bg-gray-700 form-select focus:border-green-400 
                  focus:outline-none focus:shadow-outline-green dark:focus:shadow-outline-gray"
                  onchange="this.form.submit();">
                    @if($email->status == 'OFF')
                    <option class="active">OFF</option>
                    <option>ON</option>
                    @elseif($email->status == 'ON')
                    <option class="active">ON</option>
                    <option>OFF</option>
                    @else
                    <option>ON</option>
                    <option>OFF</option>
                    @endif
                </select>
              </label>
            </div>
            
           <div class="flex items-center mb-4">
              <label class="block w-full mr-3 text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Support Whatsapp</span>
                <input
                  class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
                  value="{{ $whatsapp->description }}" placeholder="Add Link..." name="whatsapp" type="text"
                />
              </label>

              
              <label class="block w-full text-sm mb-5">
                <span class="text-gray-700 dark:text-gray-400 font-semibold">Whatsapp Status</span>
                <select
                  name="what_status" class="block w-full mt-1 text-sm dark:text-gray-300
                  dark:border-gray-600 dark:bg-gray-700 form-select focus:border-green-400 
                  focus:outline-none focus:shadow-outline-green dark:focus:shadow-outline-gray">
                    @if($whatsapp->status == 'OFF')
                    <option class="active">OFF</option>
                    <option>ON</option>
                    @elseif($whatsapp->status == 'ON')
                    <option class="active">ON</option>
                    <option>OFF</option>
                    @else
                    <option>ON</option>
                    <option>OFF</option>
                    @endif
                </select>
              </label>
            </div>
            

              <div class="mx-auto">
              <button
                  class="px-5 py-3 bg-blue-600 font-medium leading-5 text-white transition-colors duration-150 border border-transparent active:bg-green-500 hover:bg-green-700 focus:outline-none focus:shadow-outline-green"
                  type="submit" style="color: #fff;"
                >
                  Done
                </button>
              </div>
            </form>

        </div>
      </div>                      
    </div>
</main>



@endsection