<?php

namespace App\Filament\Resources\OnlineResourcesResource\Pages;

use App\Filament\Resources\OnlineResourcesResource;
use Filament\Resources\Pages\CreateRecord;
use Filament\Notifications\Notification;

class CreateOnlineResource extends CreateRecord
{
    protected static string $resource = OnlineResourcesResource::class;

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

    protected function getCreatedNotification(): ?Notification
    {
        return Notification::make()
            ->success()
            ->title('Online Resource created successfully')
            ->body('The online resource has been created successfully.');
    }

    protected function mutateFormDataBeforeCreate(array $data): array
    {
        return $data;
    }
} 