<?php

namespace App\Filament\Resources\TenantFeedbackResource\Pages;

use App\Filament\Resources\TenantFeedbackResource;
use App\Services\Audit\SuperAdminAuditLogger;
use Filament\Actions\DeleteAction;
use Filament\Resources\Pages\ViewRecord;

class ViewTenantFeedback extends ViewRecord
{
    protected static string $resource = TenantFeedbackResource::class;

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