<x-filament-panels::page>

<div class="space-y-4">
    {{-- Render the Select form fields --}}
    <div class="space-y-4">
        {{ $this->form }}
    </div>

    {{-- Add Pallet and Remove Pallet buttons --}}
    <div class="flex flex-row gap-2 mt-4">
        <button
            type="button"
            wire:click="printPallet"
            class="px-3 py-1 border border-primary-500 text-primary-600 rounded hover:bg-primary-50 hover:border-primary-700 transition text-sm"
        >
            Print Pallet
        </button>
        {{-- <button
            type="button"
            wire:click="saveCustomerPO"
            class="px-3 py-1 border border-primary-500 text-primary-600 rounded hover:bg-primary-50 hover:border-primary-700 transition text-sm"
        >
            Save PO
        </button> --}}
    </div>
    <div class="bg-white shadow rounded-xl p-4 mt-6">
        <livewire:wire-master-data-table />
    </div>
</div>

<script>
    window.addEventListener('open-pdf', event => {
        window.open(event.detail.url, '_blank');
    });
</script>
</x-filament-panels::page>
