<?php

namespace App\Filament\Resources\AsrsItemValidationResource\Pages;

use App\Filament\Resources\AsrsItemValidationResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;

class EditAsrsItemValidation extends EditRecord
{
    protected static string $resource = AsrsItemValidationResource::class;

    protected function mutateFormDataBeforeSave(array $data): array
    {
        $data['status'] = 'Updated';

        return $data;
    }

    protected function getRedirectUrl(): string
    {
        return $this->getResource()::getUrl(
            'index',
            [
                'tableFilters' => [
                    'advanced_filters' => [
                        'status' => 'NotUpdated',
                    ],
                ],
            ]
        );
    }
    protected function getHeaderActions(): array
    {
        return [
            Actions\ViewAction::make(),
            Actions\DeleteAction::make(),
            Actions\ForceDeleteAction::make(),
            Actions\RestoreAction::make(),
        ];
    }
}
