<?php
/**
 * Template Name: Master Communication Templates
 * Description: Template for master trainer communication templates page
 */

// Define constant to indicate we are in a page template
define('HVAC_IN_PAGE_TEMPLATE', true);

get_header();

// Check master trainer permissions
$user = wp_get_current_user();
if (!in_array('hvac_master_trainer', $user->roles) && !current_user_can('manage_options')) {
    wp_die('Access denied. Master trainer privileges required.');
}

// Render master trainer navigation
if (class_exists('HVAC_Master_Menu_System')) {
    $master_menu = HVAC_Master_Menu_System::instance();
    $master_menu->render_master_menu();
}

// Render breadcrumbs
if (class_exists('HVAC_Breadcrumbs')) {
    echo HVAC_Breadcrumbs::instance()->render_breadcrumbs();
}

echo '<div class="hvac-page-wrapper hvac-master-communication-templates-page">';
echo '<div class="container">';

// Render the communication templates content
echo do_shortcode('[hvac_communication_templates]');

echo '</div>'; // .container
echo '</div>'; // .hvac-page-wrapper

get_footer();
?>