<?php
/**
 * Legacy include shim — delegates to the shared WP PowerSuite email wrapper.
 *
 * @var string $body
 * @var string $footer
 * @var array  $template_config
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( class_exists( '\WP_PowerSuite\Email\EmailRenderer' ) ) {
	echo \WP_PowerSuite\Email\EmailRenderer::wrap(
		[
			'content'  => $body ?? '',
			'footer'   => $footer ?? '',
			'config'   => $template_config ?? [],
			'logo_url' => $template_config['logo'] ?? '',
		]
	);
	return;
}

echo $body ?? ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
