{{--
 *
 * @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="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-modules.caption.module_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::global.caption.active') !!}</th>
                        </tr>
                        </thead>
                        <tbody class="bg-white">

@foreach ($tenantModules as $resource)
    @php
        $params = [
            'id' => $resource['id'],
            'redirect-to' => [
                'a|c|d|u' => [
                    'params' => [
                        'highlight' => [
                            'tenant-module-id' => $resource['id'],
                        ],
                        'id' => $resource['tenant_id'],
                        'tab' => 'tenant-modules',
                    ],
                    'route' => 'core-tenant',
                ],
            ],
        ];
    @endphp

                          <tr class="{!! (isset($highlight['tenant-module-id']) && $resource['id'] == $highlight['tenant-module-id'] ? 'bg-green-50' : '') !!}" onclick="window.location.href = '{!! route('core-tenant-module', $params) !!}';">
                            <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">{!! $this->modules[$resource['module_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['active']] !!}</td>
                          </tr>

@endforeach

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

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