<?php
/**
 * Template for Trainer Account Pending page
 *
 * This template can be overridden by copying it to yourtheme/hvac-community-events/status/trainer-account-pending.php
 *
 * @package HVAC_Community_Events
 * @since 1.0.0
 */

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

get_header();

// Get current user
$current_user = wp_get_current_user();
?>

<div class="hvac-status-container">
    <?php
    // Get the page content (Gutenberg blocks) if posts are available
    if (have_posts()) {
        while (have_posts()) : the_post();
            the_content();
        endwhile;
    } else {
        // Fallback content when no post content exists
        ?>
        <div class="hvac-account-pending-content">
            <h2>Account Pending Approval</h2>
            <div class="hvac-pending-message">
                <p>Your trainer account is currently under review. Our team will notify you via email once your application has been processed.</p>
                <p>If you have any questions, please contact our support team.</p>
            </div>
        </div>
        <?php
    }
    ?>
    
    <?php
    // Allow themes/plugins to add content
    do_action('hvac_trainer_pending_after_content', $current_user);
    ?>
</div>

<?php
get_footer();