<?php
/**
 * Template Name: Master Trainer Pending Approvals
 * Description: Template for the master trainer pending approvals management page
 */

// Define constant to indicate we are in a page template
if (!defined('HVAC_IN_PAGE_TEMPLATE')) {
    define('HVAC_IN_PAGE_TEMPLATE', true);
}

get_header();

// Authentication handled by centralized HVAC_Access_Control system
// Redundant template-level auth check removed to prevent content blocking

echo '<div class="hvac-page-wrapper hvac-master-pending-approvals-page">';
echo '<div class="container">';

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

// Render breadcrumbs inside the wrapper
if (class_exists('HVAC_Breadcrumbs')) {
    // Fix: The method is render_breadcrumbs(), not render()
    $breadcrumbs_instance = HVAC_Breadcrumbs::instance();
    echo $breadcrumbs_instance->render_breadcrumbs();
}

// Use WordPress's the_content() to render the shortcode properly
if (have_posts()) {
    while (have_posts()) {
        the_post();
        the_content();
    }
}

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

get_footer();