<?php

declare(strict_types=1);

namespace App\Modules\Central\Controllers;

use App\Modules\Identity\Services\AuthService;
use App\Modules\Tenants\Services\TenantService;

class LandingController
{
    public function __construct(
        private readonly TenantService $tenantService,
        private readonly AuthService $authService
    ) {
    }

    public function index(): array
    {
        return [
            'view' => 'welcome',
            'data' => [
                'title' => 'Kaffeeliste SaaS',
                'tenantOverview' => $this->tenantService->adminOverview(),
                'centralLoginPreview' => $this->authService->centralLoginPreview(),
            ],
        ];
    }
}
