<?php

declare(strict_types=1);

namespace App\Filament\Resources\AlertDestinationResource\Pages;

use App\Filament\Resources\AlertDestinationResource;
use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ListRecords;

class ListAlertDestinations extends ListRecords
{
    protected static string $resource = AlertDestinationResource::class;

    protected function getHeaderActions(): array
    {
        return [
            CreateAction::make()
                ->label('Create target')
                ->disabled(fn (): bool => ! AlertDestinationResource::canCreate()),
        ];
    }

    protected function getTableEmptyStateActions(): array
    {
        return [
            CreateAction::make()
                ->label('Create target')
                ->disabled(fn (): bool => ! AlertDestinationResource::canCreate()),
        ];
    }
}
