<?php

namespace App\Filament\Resources\AboutUsMessageResource\Pages;

use App\Filament\Resources\AboutUsMessageResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
use Illuminate\Support\Facades\Gate;

class ListAboutUsMessages extends ListRecords
{
    protected static string $resource = AboutUsMessageResource::class;

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