<?php

declare(strict_types=1);

namespace App\Modules\Surveys\Controllers;

use App\Modules\Surveys\Application\SurveyService;

class SurveyController
{
    public function __construct(private readonly SurveyService $surveyService)
    {
    }

    public function index(string $tenantId): array
    {
        return [
            'view' => 'surveys.index',
            'data' => [
                'title' => 'Survey Admin und Snapshot Publishing',
                'board' => $this->surveyService->managerBoard($tenantId),
                'memberBoard' => $this->surveyService->memberBoard($tenantId),
                'draftSurveys' => $this->surveyService->activeSurveys($tenantId),
            ],
        ];
    }
}
