

<x-filament::page>

    <div class="filament-form space-y-6">
        {{ $this->form }}
    </div>

    <div class="bg-white shadow rounded-xl p-4">
        <livewire:wire-master-data-table />
    </div>

    <div class="filament-actions mt-6">
        <x-filament::actions>
            @foreach ($this->getFormActions() as $action)
                {{ $action }}
            @endforeach
        </x-filament::actions>
    </div>

    @push('scripts')
    <script>
        window.addEventListener('open-pdf', event => {
            const url = event.detail.url;
            const win = window.open(url, '_blank');
            if (!win || win.closed || typeof win.closed == 'undefined') {
                alert('Popup blocked. Please allow popups for this site.');
            }
        });
    </script>
    @endpush
</x-filament::page>
