<%- include('./components/wrapper') %>

<% if (req.query.success == "COMPLETE") { %>
    <div class="bg-green-900/50 border-l-4 border-green-400 rounded-lg text-green-100 px-4 py-3 relative mb-8" role="alert">
      <div class="flex">
        <div class="py-1">
          <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 text-green-400 mr-3">
            <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
          </svg>
        </div>
        <div>
          <p class="font-bold">Action Completed</p>
          <p class="text-sm relative">Now You Must Restart the Dashboard so this take a Affect</p>
        </div>
        <span onclick="location.href = '../settings';" class="absolute top-0 bottom-0 right-0 px-4 py-3">
          <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 text-green-400">
            <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
          </svg>
        </span>
      </div>
    </div>
    <% } %>

<main id="content" class="flex-1">
  <div class="py-6">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
      <div class="flex flex-wrap -mx-4">
        <!-- Scan Images Button -->
        <div class="w-full md:w-1/2 px-4 mb-4 md:mb-0">
          <div class="bg-black p-6 rounded-lg shadow-lg">
            <h2 class="text-white font-bold text-xl mb-2">Scan Images</h2>
            <p class="text-gray-400 mb-4">Scan images from API</p>
            <a href="/scanimages" class="block w-full text-center py-2 px-4 text-sm font-medium text-white bg-blue-600 border border-blue-700 rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500">
              Scan Images
            </a>
          </div>
        </div>

        <!-- Scan Nodes Button -->
        <div class="w-full md:w-1/2 px-4 mb-4 md:mb-0">
          <div class="bg-black p-6 rounded-lg shadow-lg">
            <h2 class="text-white font-bold text-xl mb-2">Scan Nodes</h2>
            <p class="text-gray-400 mb-4">Scan nodes from API</p>
            <a href="/scannodes" class="block w-full text-center py-2 px-4 text-sm font-medium text-white bg-blue-600 border border-blue-700 rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500">
              Scan Nodes
            </a>
          </div>
        </div>
      </div>
    </div>
  </div>
</main>

<%- include('./components/footer') %>

