<?php

namespace App\Filament\Resources\Publication\News\Pages;

use App\Filament\Resources\Publication\News\NewsResource;
use Filament\Actions\Action;
use Filament\Resources\Pages\EditRecord;

class EditNews extends EditRecord
{
    protected static string $resource = NewsResource::class;

    protected function getHeaderActions(): array
    {
        return [
            Action::make('back')
                ->label('Kembali')
                ->url(ListNews::getUrl())
                ->outlined()
                ->color('secondary'),
        ];
    }

    protected function getRedirectUrl(): string
    {
        return $this->getResource()::getUrl('index');
    }
}
