<?php

use App\Http\Controllers\InstallController;
use Illuminate\Support\Facades\Route;

Route::prefix('install')->group(function () {
    Route::get('/', [InstallController::class, 'step1'])->name('install.step1');
    Route::post('/step1', [InstallController::class, 'step1Post']);
    Route::get('/step2', [InstallController::class, 'step2'])->name('install.step2');
    Route::post('/step2', [InstallController::class, 'step2Post']);
    Route::post('/test-connection', [InstallController::class, 'testConnection']);
    Route::get('/step3', [InstallController::class, 'step3'])->name('install.step3');
    Route::post('/step3', [InstallController::class, 'step3Post']);
    Route::get('/step4', [InstallController::class, 'step4'])->name('install.step4');
    Route::post('/step4', [InstallController::class, 'step4Post']);
    Route::get('/step5', [InstallController::class, 'step5'])->name('install.step5');
    Route::post('/process', [InstallController::class, 'process']);
    Route::get('/success', [InstallController::class, 'success'])->name('install.success');
});

Route::get('/login', function () {
    return view('index');
})->name('login');

Route::get('/{any}', function () {
    return view('index');
})->where('any', '.*');
