<?php

declare(strict_types=1);

namespace App\Http\Controllers\Install;

use App\Http\Controllers\Controller;
use App\Services\Install\WebInstallArtifactDirectoryCleaner;
use App\Services\Install\WebInstallProgressSessionManager;
use Illuminate\Contracts\View\View;

final class InstallWelcomeController extends Controller
{
    public function show(
        WebInstallArtifactDirectoryCleaner $artifactDirectoryCleaner,
        WebInstallProgressSessionManager $progressSessionManager,
    ): View {
        $artifactDirectoryCleaner->reset();
        $progressSessionManager->forgetActiveInstallId();

        return view('install.welcome');
    }
}
