{{--
 *
 * @version     2.0.$Revision:$
 * @version     SVN: $Id:$
 * @package     bplan-base/globals
 * @subpackage  Views
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 * @copyright   Copyright (C) 2025 Wassilios Meletiadis <https://www.bplan-solutions.de/>
 * /Δ\
--}}

          <div class="bg-white overflow-hidden shadow-xl sm:rounded-lg">

            <div class="px-4 sm:px-6 lg:px-8 min-w-full">
              <div class="flex flex-col">
                <div class="-my-2 -mx-4 sm:-mx-6 lg:-mx-8">
                  <div class="inline-block min-w-full py-2 align-middle">
                    <div class="shadow-sm ring-1 ring-black ring-opacity-5">
                      <table class="min-w-full border-separate" style="border-spacing: 0">
                        <thead class="bg-gray-50">
                        <tr>
                          <th scope="col" class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3 pl-4 pr-3 text-left text-sm font-semibold backdrop-blur backdrop-filter sm:pl-6 lg:pl-8">{!! __('globals::global.caption.id') !!}</th>
                          <th scope="col" class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3 pl-4 pr-3 text-left text-sm font-semibold backdrop-blur backdrop-filter sm:pl-6 lg:pl-8">{!! __('globals::core-tenant-external-systems.caption.identifier') !!}</th>
                          <th scope="col" class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3 pl-4 pr-3 text-left text-sm font-semibold backdrop-blur backdrop-filter sm:pl-6 lg:pl-8">{!! __('globals::core-tenant-external-systems.caption.external_system_id') !!}</th>
                          <th scope="col" class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3 pl-4 pr-3 text-left text-sm font-semibold backdrop-blur backdrop-filter sm:pl-6 lg:pl-8">{!! __('globals::core-tenant-external-systems.caption.synchronize') !!}</th>
                          <th scope="col" class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3 pl-4 pr-3 text-left text-sm font-semibold backdrop-blur backdrop-filter sm:pl-6 lg:pl-8">{!! __('globals::global.caption.active') !!}</th>
                        </tr>
                        </thead>
                        <tbody class="bg-white">

@foreach ($Collection as $resource)

                          <tr class="{!! ($resource['id'] == $highlightID ? 'bg-green-50' : '')  !!}" onclick="window.location.href='{!! route('core-tenant-external-system', ['id' => $resource['id']]) !!}';">
                            <td class="whitespace-nowrap border-b border-gray-200 py-4 pl-4 pr-3 text-left text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{!! $resource['id'] !!}</td>
                            <td class="whitespace-nowrap border-b border-gray-200 py-4 pl-4 pr-3 text-left text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{!! $resource['identifier'] !!}</td>
                            <td class="whitespace-nowrap border-b border-gray-200 py-4 pl-4 pr-3 text-left text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{!! $supportedSystems[$resource['external_system_id']] !!}</td>
                            <td class="whitespace-nowrap border-b border-gray-200 py-4 pl-4 pr-3 text-left text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{!! $activeStatus[$resource['synchronize']] !!}</td>
                            <td class="whitespace-nowrap border-b border-gray-200 py-4 pl-4 pr-3 text-left text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{!! $activeStatus[$resource['active']] !!}</td>
                          </tr>

@endforeach

                        </tbody>
                      </table>
                    </div>
                  </div>

                </div>
              </div>

@include('globals::livewire.core.global.grid-buttons')

            </div>
          </div>

