@php
    $breadcrumbs = [
        ['label' => __('common.home'), 'url' => route('dashboard.index')],
        ['label' => __('procurement.breadcrumb_root')],
        ['label' => __('procurement.receipts.title')],
    ];
@endphp

<x-ui.layout.page
    :title="__('procurement.receipts.title')"
    :subtitle="__('procurement.receipts.subtitle')"
    page-icon="fe fe-truck"
    :breadcrumbs="$breadcrumbs"
>
    <x-ui.operational.index-shell>
        <x-slot:toolbar>
            <x-ui.operational.action-bar>
                <x-slot:secondary>
                    <span class="small text-muted">{{ __('operational_ui.speed.bulk.toolbar_hint') }}</span>
                </x-slot:secondary>
                <x-slot:primary>
                    @can('viewAny', App\Modules\Procurement\Models\GoodsReceipt::class)
                        <button type="button" class="btn btn-sm btn-outline-secondary" data-erp-select-page="#gr-bulk-form">
                            {{ __('procurement.bulk.select_all') }}
                        </button>
                        <button
                            type="submit"
                            form="gr-bulk-form"
                            formaction="{{ route('procurement.goods-receipts.bulk.validate') }}"
                            class="btn btn-sm btn-primary"
                            data-bulk-confirm="{{ __('procurement.bulk.confirm_validate', ['count' => '__COUNT__']) }}"
                            data-bulk-confirm-value="VALIDATE_GR"
                        >{{ __('procurement.bulk.validate_receipts') }}</button>
                    @endcan
                </x-slot:primary>
            </x-ui.operational.action-bar>
        </x-slot:toolbar>

        @include('pages.procurement.goods-receipts.partials.index-table')

        <x-slot:pagination>
            {{ $receipts->links() }}
        </x-slot:pagination>
    </x-ui.operational.index-shell>
</x-ui.layout.page>
