@extends('layouts.admin_layout')

@section('content')



<main class="h-full pb-16 overflow-y-auto">
          <div class="container grid px-6 mx-auto">
            <h2
              class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"
            >
            <span class="text-blue-500">Grant Application</span> Details
            </h2>
            <!-- CTA -->
            <a
              class="flex items-center justify-between p-4 mb-8 text-sm font-semibold bg-blue-600 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 main website</span>
              </div>
              <span>View &RightArrow;</span>
            </a>

            <!-- Big section cards -->
            <h4
              class="mt-4 mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
            >
            Form Info
            </h4>
            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
                User Name: {{ $grant->user?->first_name }} {{ $grant->user?->last_name }}
              </p>
            </div>
            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
                Store name: {{ $grant->store }}
              </p>
            </div>


            
            <h4
              class="mt-4 mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
            >
                Grant Details
            </h4>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
                Selected Grant: {{ $grant->grant_type }}
              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
                Full Name: {{ $grant->name }}
              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
                Recipient Location: {{ $grant->location }}
              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
              Reason for grant: {{ $grant->reason }}
              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
              How many active C2C store owners have you registered under you?: {{ $grant->referrals }}
              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
              Grant category: {{ $grant->categories }}
              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
              Why you deserve the grant: {{ $grant->deserve }}
              </p>
            </div>

            @php
                $bot = App\Models\Investment::find($grant->investment_id);
            @endphp
            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
              Choose your Insurance AI: {{ $bot->plan->name }} - (${{ number_format($bot->plan->balance, 2) }})
              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
              How will you promote Global E-commerce Arbitrage Store to the community.: {{ $grant->promote }}
              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
              What information channels will you promote: {{ $grant->channels }}
              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
              Please list all social networks or communities (link) you have:: {{ $grant->social_networks }}
              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
              What's your email: {{ $grant->email }}
              </p>
            </div>

            <div
              class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
            >
              <p class="text-sm text-gray-600 dark:text-gray-400">
              Where is the most convenient place to contact you?: {{ $grant->contact }}
              </p>
            </div>
            
            <div class="mt-6">
                <form class="" action="{{ route('admin.grant-seen', $grant->id) }}" method="post">
                    @csrf
                    <div class="flex items-center gap-6">
                    <button
                        class="inline-flex items-center px-5 py-3 font-medium leading-5 text-white transition-colors duration-150 bg-blue-600 border border-transparent active:bg-green-500 hover:bg-green-700 focus:outline-none focus:shadow-outline-green"
                        type="submit" name="approve"
                        >
                        Approve &nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6"    fill="none" viewBox="0 0 24 24" stroke="currentColor">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
                        </svg>
                    </button>

                    <button
                        class="inline-flex items-center px-5 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" name="decline" style="background: red;"
                        >
                        Decline 
                    </button>
                    </div>
                </form>
            </div>
          </div>
        </main>



@endsection