<?php

declare(strict_types=1);

namespace App\Http\Controllers\Install;

use App\Http\Controllers\Controller;
use Illuminate\Contracts\View\View;

final class InstallFinishedController extends Controller
{
    public function show(): View
    {
        $panelPath = trim((string) config('dberp.admin.panel_path', ''), '/');
        $adminUrl = ($panelPath === '' || $panelPath === 'admin')
            ? url('/admin')
            : route('filament.admin.auth.login');

        return view('install.finished', [
            'adminUrl' => $adminUrl,
        ]);
    }
}
