{{--
 *
 * @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 bplan-solutions GmbH & Co. KG <http://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">{!! __('system-field-grid.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">{!! __('system-field-grid.caption.externalFieldName') !!}</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">{!! __('system-field-grid.caption.fielddefinition_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">{!! __('system-field-grid.caption.linkedsystem_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">{!! __('system-field-grid.caption.comparisonFieldImport') !!}</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">{!! __('system-field-grid.caption.comparisonFieldSync') !!}</th>
                        </tr>
                        </thead>
                        <tbody class="bg-white">

@foreach ($Collection as $resource)
    @php
        $params = [
            'id' => $resource['entity_type_field_id'],
            'redirect-to' => [
                'a|c|d|u' => [
                    'params' => [
                        'highlight' => [
                            'system-field-id' => $resource['id'],
                        ],
                    ],
                    'route' => 'core-system-fields',
                ],
            ],
            'tab' => 'system-status'
        ];
    @endphp

                          <tr class="{!! ($resource['id'] == $highlightID ? 'bg-green-50' : '')  !!}" onclick="window.location.href='{!! route('core-entity-type-field', $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">{{ $resource['externalFieldName'] }}</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['entity_type_field_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['linkedsystem_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['comparisonFieldImport']] !!}</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['comparisonFieldSync']] !!}</td>
                          </tr>

@endforeach

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

                </div>
              </div>

@include('globals::livewire.core.grids.snippets.top-button')

            </div>

          </div>

