<?php

namespace App\Filament\Resources\NewsEventResource\Pages;

use App\Filament\Resources\NewsEventResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
use Illuminate\Support\Facades\Gate;
class ListNewsEvents extends ListRecords
{
    protected static string $resource = NewsEventResource::class;

    protected function getHeaderActions(): array
    {
        return [
            Actions\CreateAction::make()
                ->label('Add New News & Events Heading')
                ->visible(fn () => Gate::allows('create newsevent')),
        ];
    }
}