<div class=" p-4">
    <div class="max-w-full mx-auto bg-white rounded-lg">
        <!-- Header -->
        <div class="text-black p-4 rounded-t-lg flex justify-between items-center">
            <h1 class="text-lg font-semibold">{{ $company }} (SN={{ $serverKey }}):: Print Form</h1>
            <button class="bg-info hover:info-focus text-white font-bold py-2 px-4 rounded">
                Export Query
            </button>
        </div>

        <!-- Table Section -->
        <div class="overflow-x-auto p-4">
           <table aria-describedby="mydesc"  class="min-w-full bg-white border border-gray-300">
                <thead>
                    <tr class="bg-slate-300 text-gray-700">
                        <th scope="col"  class="py-2 px-4 border-b">Name</th>
                        <th scope="col"  class="py-2 px-4 border-b">Value</th>
                        <th scope="col"  class="py-2 px-4 border-b">Description</th>
                        <th scope="col"  class="py-2 px-4 border-b">Active</th>
                    </tr>
                </thead>
                <tbody>
                    @if (count($parameterList) > 0)
                        @foreach ($parameterList['PID'] as $index => $parameter)
                        <tr class="border-b">
                            <td class="py-2 px-4 border min-w-48">
                                <input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="parameterList.name.{{ $index }}" />
                            </td>
                            <td class="py-2 px-4 border min-w-48">
                                <input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="parameterList.value.{{ $index }}" />
                            </td>
                            <td class="py-2 px-4 border min-w-48">
                                <textarea class="w-full p-1 border rounded" wire:model.defer="parameterList.description.{{ $index }}"></textarea>
                            </td>
                            <td class="py-2 px-4 border min-w-48">
                                <input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="parameterList.active.{{ $index }}" />
                            </td>
                       <input type="hidden"  wire:model.defer="parameterList.PID.{{ $index }}">
                        </tr>
                        @endforeach
                    @endif
                </tbody>
            </table>
            <div class="p-4">
                <button wire:click="saveParameter"
                    class="bg-primary hover:bg-primary-focus text-white font-bold py-2 px-4 rounded">
                    Save
                </button>
            </div>
        </div>
    </div>
</div>
