<?php

namespace App\Enum\Communication;

enum CommunicationStatus: string
{
    case Initiated = 'initiated';
    case Ringing = 'ringing';
    case InProgress = 'in_progress';
    case Completed = 'completed';
    case Missed = 'missed';
    case Failed = 'failed';
    case Voicemail = 'voicemail';

    public function isFinal(): bool
    {
        return match ($this) {
            self::Completed,
            self::Missed,
            self::Failed,
            self::Voicemail => true,
            default => false,
        };
    }
}