<?php

namespace App\Filament\Resources\MediaStorageTargetResource\Pages;

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

class EditMediaStorageTarget extends AuditedEditRecord
{
    protected static string $resource = MediaStorageTargetResource::class;

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