<?php

namespace App\Filament\Resources\OnlineResourcesResource\Pages;

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

    protected function getHeaderActions(): array
    {
        return [
            Actions\CreateAction::make()
                ->label('Add New Online Resource')
                ->visible(fn () => Gate::allows('create onlineresources')),
        ];
    }
}