<?php
/**
 * Bootstrap file for WP Mail Doctor email helpers.
 *
 * Splits previously monolithic logic into smaller modules
 * for improved maintainability and debuggability.
 *
 * @package MailDoctor
 */

if ( ! defined( 'ABSPATH' ) ) {
        exit;
}

require_once __DIR__ . '/modules/template-registration.php';
require_once __DIR__ . '/modules/template-rendering.php';
require_once __DIR__ . '/modules/utilities.php';
require_once __DIR__ . '/modules/ajax-preview.php';
require_once __DIR__ . '/modules/ajax-send-test.php';

add_action(
        'init',
        static function () {
                \MailDoctor\Email\Modules\PreviewController::register();
        },
        20
);
