<?php

namespace App\Filament\Resources\EventPurchaseResource\Pages;

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

class EditEventPurchase extends AuditedEditRecord
{
    protected static string $resource = EventPurchaseResource::class;

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