<?php

declare(strict_types=1);

namespace App\Filament\Resources\DberpInventoryRules\Pages;

use App\Filament\Resources\DberpInventoryRules\DberpInventoryRuleResource;
use App\Filament\Resources\Pages\EditRecord;
use Filament\Actions\DeleteAction;

class EditDberpInventoryRule extends EditRecord
{
    protected static string $resource = DberpInventoryRuleResource::class;

    protected function getHeaderActions(): array
    {
        return [
            DeleteAction::make()
                ->visible(fn (): bool => DberpInventoryRuleResource::canDelete($this->getRecord()))
                ->authorize(fn (): bool => DberpInventoryRuleResource::canDelete($this->getRecord())),
        ];
    }
}
