<?php

declare(strict_types=1);

namespace App\Administration\Domain\Model\User;

/**
 * Enum representing the activation status of a user account.
 */
enum StatutCompte: string
{
    case EN_ATTENTE = 'pending';           // Account created, awaiting activation
    case CONSENTEMENT_REQUIS = 'consent';  // Minor < 15 years, awaiting parental consent
    case ACTIF = 'active';                 // Account activated and usable
    case SUSPENDU = 'suspended';           // Account temporarily disabled
    case INSCRIT = 'inscrit';              // Student enrolled without email, no account access
    case ARCHIVE = 'archived';             // Account archived (end of schooling)

    /**
     * Checks if the user can log in with this status.
     */
    public function peutSeConnecter(): bool
    {
        return $this === self::ACTIF;
    }

    /**
     * Checks if the user can activate their account.
     */
    public function peutActiver(): bool
    {
        return $this === self::EN_ATTENTE;
    }
}
