<?php

namespace App\Filament\Central\Resources\CentralAdminResource\Pages;

use App\Filament\Central\Resources\CentralAdminResource;
use Filament\Resources\Pages\CreateRecord;

class CreateCentralAdmin extends CreateRecord
{
    protected static string $resource = CentralAdminResource::class;

    /**
     * Land back on the admin list after creating, matching the other central
     * resources instead of defaulting to the new record's edit page.
     */
    protected function getRedirectUrl(): string
    {
        return CentralAdminResource::getUrl('index');
    }
}
