<?php

namespace App\Filament\Resources\HomeResource\Pages;

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

class CreateHome extends CreateRecord
{
    protected static string $resource = HomeResource::class;

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

    protected function getCreatedNotification(): ?Notification
    {
        return Notification::make()
            ->success()
            ->title('Home Page created successfully')
            ->body('The home page has been created successfully.');
    }

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