<?php

namespace App\Enum\Contact;

enum MessageProvider: string
{
    case SENDGRID = 'sendgrid';
    case TWILIO = 'twilio';

    public function label(): string
    {
        return match ($this) {
            self::SENDGRID => 'SendGrid',
            self::TWILIO => 'Twilio',
        };
    }

    public function channel(): MessageChannel
    {
        return match ($this) {
            self::SENDGRID => MessageChannel::EMAIL,
            self::TWILIO => MessageChannel::SMS,
        };
    }
}
