<?php

namespace App\Filament\Resources\FacilitymemberResource\Pages;

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

class CreateFacilitymember extends CreateRecord
{
    protected static string $resource = FacilitymemberResource::class;

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

    protected function getCreatedNotification(): ?Notification
    {
        return Notification::make()
            ->success()
            ->title('Member created')
            ->body('The facility member has been created successfully.');
    }

    protected function mutateFormDataBeforeCreate(array $data): array
    {
        // Add any data transformation logic here
        return $data;
    }
} 