<?php

namespace App\Filament\Resources\TenantPackageResource\Pages;

use App\Filament\Resources\Pages\AuditedEditRecord;
use App\Filament\Resources\TenantPackageResource;
use App\Services\Audit\SuperAdminAuditLogger;
use Filament\Actions;

class EditTenantPackage extends AuditedEditRecord
{
    protected static string $resource = TenantPackageResource::class;

    protected function getHeaderActions(): array
    {
        return [
            Actions\ViewAction::make(),
            Actions\DeleteAction::make()
                ->after(fn ($record) => app(SuperAdminAuditLogger::class)->recordModelMutation(
                    'deleted',
                    $record,
                    source: static::class
                )),
        ];
    }
}
