<?php

declare (strict_types=1);
namespace Slash\Booking\Notifications\Events;

enum EventKey : string
{
    case PENDING_CLIENT = 'booking.pending.client';
    case PENDING_ADMIN = 'booking.pending.admin';
    case CONFIRMED_CLIENT = 'booking.confirmed.client';
    case REJECTED_CLIENT = 'booking.rejected.client';
    case CANCELLED_CLIENT = 'booking.cancelled.client';
    case REMINDER_CLIENT = 'booking.reminder.client';
    public function recipient(): string
    {
        // phpcs:ignore PHPCompatibility.Variables.ForbiddenThisUseContexts.OutsideObjectContext -- false positive: $this is valid inside an enum method (PHP 8.1+).
        return $this === self::PENDING_ADMIN ? 'admin' : 'client';
    }
}
