<?php

declare(strict_types=1);

namespace App\Administration\Domain\Model\Invitation;

enum InvitationStatus: string
{
    case PENDING = 'pending';
    case SENT = 'sent';
    case EXPIRED = 'expired';
    case ACTIVATED = 'activated';

    public function peutEnvoyer(): bool
    {
        return $this === self::PENDING || $this === self::EXPIRED;
    }

    public function peutActiver(): bool
    {
        return $this === self::SENT;
    }

    public function peutExpirer(): bool
    {
        return $this === self::SENT;
    }

    public function peutRenvoyer(): bool
    {
        return $this === self::SENT || $this === self::EXPIRED;
    }
}
