<?php

declare(strict_types=1);

namespace App\Administration\Infrastructure\Service;

final class DemoDataGenerationResult
{
    public int $createdUsers = 0;
    public int $createdSubjects = 0;
    public int $createdClasses = 0;
    public int $createdClassAssignments = 0;
    public int $createdTeacherAssignments = 0;
    public int $createdGuardianLinks = 0;
    public int $createdScheduleSlots = 0;
    public bool $periodConfigurationCreated = false;
    public bool $schoolCalendarCreated = false;
    public bool $gradingConfigurationCreated = false;

    /** @var list<array{role: string, name: string, email: string}> */
    public array $accounts = [];

    /** @var list<string> */
    public array $warnings = [];

    public function __construct(
        public readonly string $tenantSubdomain,
        public readonly string $schoolName,
        public readonly string $academicYearLabel,
        public readonly string $sharedPassword,
    ) {
    }

    public function addAccount(string $role, string $name, string $email): void
    {
        $this->accounts[] = [
            'role' => $role,
            'name' => $name,
            'email' => $email,
        ];
    }

    public function addWarning(string $warning): void
    {
        $this->warnings[] = $warning;
    }
}
