<flux:main>
    <div class="flex justify-between items-center">
        <div>
            <flux:heading size="xl">{{ $pageTitle }}</flux:heading>
        </div>
        <div class="flex gap-2">
            @can('view product')
                <a href="{{ route('studio.export.product') }}" class="inline-flex">
                    <flux:button variant="primary" color="zinc" class="text-sm">
                        Ekspor Ecxel
                    </flux:button>
                </a>
            @endcan
            @can('create product')
                <flux:button href="{{ route('studio.catalog.product.create') }}" variant="primary" wire:navigate
                    class="text-sm">
                    Tambah
                </flux:button>
            @endcan
        </div>
    </div>

    <div class="mt-6">
        <livewire:datatable.catalog.products-table />
    </div>

    @include('components.modals.confirmation', [
        'modalName' => 'delete-confirmation',
        'modalTitle' => 'Apakah Anda yakin?',
        'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
        'buttonVariant' => 'primary',
        'buttonColor' => 'danger',
        'buttonText' => 'Ya, Hapus',
    ])
</flux:main>
