<?php
/**
 * Template Name: HVAC Community Login
 *
 * This is the custom template for the community login page.
 *
 * @package HVAC_Community_Events
 */

get_header(); ?>

<div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">
        <div class="hvac-community-login-container">
            <h1 class="entry-title">
                <?php esc_html_e('Trainer Login', 'hvac-ce'); ?>
            </h1>
            <div class="entry-content">
                <?php 
                // Process the shortcode directly
                // First instantiate the login handler class to ensure shortcode is registered
                if (!class_exists('\\HVAC_Community_Events\\Community\\Login_Handler')) {
                    require_once HVAC_CE_PLUGIN_DIR . 'includes/community/class-login-handler.php';
                }
                $login_handler = new \HVAC_Community_Events\Community\Login_Handler();
                // Now call the render method directly
                echo $login_handler->render_login_form(array());
                ?>
            </div>
        </div>
    </main><!-- #main -->
</div><!-- #primary -->

<?php get_footer(); ?>