<?php
/**
 * BookiFlex Notification Extension
 *
 * @package    BookiFlex
 * @subpackage Notification
 * @author     BookiFlex
 * @copyright  Copyright (c) 2025 BookiFlex
 * @license    GPL-2.0-or-later
 *
 * @link       https://bookiflex.com
 */

declare(strict_types=1);
namespace BookiFlex\Extensions\Notification\Contract;

use BookiFlex\Core\Model\Reservation\Reservation;
use BookiFlex\Extensions\Notification\Model\Recipient;

defined( 'ABSPATH' ) || exit;

interface NotificationEventProviderInterface
{
    /** @return string[] list of event type strings this provider handles */
    public function supportedEvents(): array;

    /** Return the Twig template path for the given event+recipient */
    public function getTemplateName(string $event, Recipient $recipient, string $language = 'en'): string;

    /** Return the email subject for the given event+recipient */
    public function getSubject(string $event, Recipient $recipient): string;

    /** Set the reservation to the appropriate status for email preview */
    public function prepareForPreview(string $event, Reservation $reservation): void;

    /** Modify the Twig context array (e.g. add/remove variables) */
    public function modifyContext(array $context, string $event): array;
}
