<?php

namespace App\Filament\Resources\TenantAnnouncementResource\Pages;

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

class EditTenantAnnouncement extends AuditedEditRecord
{
    protected static string $resource = TenantAnnouncementResource::class;

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