<?php

namespace App\Filament\Resources\Monitoring\IssueManagements\Pages;

use App\Filament\Actions\BackAction;
use App\Filament\Resources\Monitoring\IssueManagements\IssueManagementResource;
use App\Filament\Support\CheerfulNotification;
use Filament\Notifications\Notification;
use Filament\Resources\Pages\CreateRecord;

class CreateIssueManagement extends CreateRecord
{
    protected static string $resource = IssueManagementResource::class;

    protected static ?string $title = 'Tambah Manajemen Isu';

    protected function getHeaderActions(): array
    {
        return [
            BackAction::make()
                ->url(ListIssueManagements::getUrl()),
        ];
    }

    protected function getCreatedNotification(): ?Notification
    {
        return CheerfulNotification::create();
    }

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