<?php
/**
 * HVAC Status Page Template
 * 
 * Template for status pages (pending, disabled, etc.)
 * 
 * @package HVAC_Community_Events
 * @since 2.0.0
 */

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

// Security check
if (!defined('ABSPATH')) {
    exit;
}

get_header();

// Determine status type from page slug
$page_slug = get_post_field('post_name', get_queried_object_id());
$status_type = 'default';

if (strpos($page_slug, 'pending') !== false) {
    $status_type = 'pending';
} elseif (strpos($page_slug, 'disabled') !== false) {
    $status_type = 'disabled';
} elseif (strpos($page_slug, 'registration-pending') !== false) {
    $status_type = 'registration_pending';
}
?>

<div class="hvac-page-wrapper hvac-status-page hvac-status-<?php echo esc_attr($status_type); ?>">
    <!-- No navigation for status pages -->
    
    <div class="container">
        <?php
        // Load status content based on type
        switch ($status_type) {
            case 'pending':
                get_template_part('templates/views/status-account-pending');
                break;
                
            case 'disabled':
                get_template_part('templates/views/status-account-disabled');
                break;
                
            case 'registration_pending':
                get_template_part('templates/views/status-registration-pending');
                break;
                
            default:
                // Generic status page
                echo '<div class="hvac-status-message">';
                echo '<h1>Status Page</h1>';
                echo '<p>This is a status page.</p>';
                echo '</div>';
                break;
        }
        ?>
    </div>
</div>

<style>
.hvac-status-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hvac-status-page .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
}
</style>

<?php get_footer(); ?>