<?php

use App\Modules\Settings\Onboarding\Controllers\OnboardingWizardController;
use Illuminate\Support\Facades\Route;

Route::middleware(['web', 'auth', 'verified', 'tenant.lifecycle', 'can:onboarding.manage'])
    ->prefix('onboarding')
    ->name('onboarding.')
    ->group(function (): void {
        Route::get('/', [OnboardingWizardController::class, 'show'])->name('wizard');
        Route::post('/company', [OnboardingWizardController::class, 'storeCompany'])->name('company');
        Route::post('/locale', [OnboardingWizardController::class, 'storeLocale'])->name('locale');
        Route::post('/timezone', [OnboardingWizardController::class, 'storeTimezone'])->name('timezone');
        Route::post('/modules', [OnboardingWizardController::class, 'storeModulesAck'])->name('modules');
        Route::post('/complete', [OnboardingWizardController::class, 'complete'])->name('complete');
    });
