<?php

namespace App\Modules\Auth;

use App\Core\BaseController;
use App\Core\Request;
use App\Core\Session;

/**
 * LandingController — Frontpage Landing Page
 *
 * Handles showing the platform front page for unauthenticated visitors.
 * Redirects already-authenticated users to their respective portal dashboard.
 *
 * @package Inveetaire
 * @ref     ALPHA STABILIZATION-002
 */
class LandingController extends BaseController
{
    /**
     * Standalone layout for landing page.
     * @var string
     */
    protected string $layout = '';

    /**
     * Display the platform frontpage.
     *
     * Redirects already authenticated sessions to their dashboards.
     *
     * @param Request $request
     * @return void
     */
    public function index(Request $request): void
    {
        $this->render('public/landing', ['title' => 'Welcome']);
    }
}
