<?php
if ( ! class_exists( 'AI_App_Onsite_Email_Settings' ) ) {
    class AI_App_Onsite_Email_Settings {
        public static function render_email_settings() {
            ob_start(); ?>
            
            <div class="form-wrapper">
                <form>
                    <?php wp_nonce_field( 'ai_app_onsite_email_settings_nonce', 'ai_app_onsite_email_settings_nonce_field' ); ?>
                    
                    <div class="mb-20"> 
                        <p class="fs-bold-14">Get Started</p>
                        <div class="terms-form-group form-group mb-0">
                            <span class="ml-1 mr-5">Email Integration</span>
                            <input type="checkbox" id="email_enabled">
                            <label for="email_enabled" class="fs-medium-14"><span class="ml-1">Enable</span></label>
                            <p id="ai_app_onsite-email-enable-error" class="fields-error"></p>
                        </div>
                    </div>

                    <div id="email-input-container" style="display:none;">
                        <label for="email-input" class="d-block fs-medium-14 mb-only-4">Email Address</label>
                        <input type="email" name="email_address" id="email-input" required>
                        <p id="ai_app_email-error" class="fields-error"></p>
                    </div>

                    <div class="text-right">
                        <button type="button" id="cancel_ai_app_email_settings_data" role="button" class="btn fs-medium-14 neutral-black-fs-60 radius-6 py-8 px-16 border border-2 bg-white" name="save-email-settings">Cancel</button>
                        <button type="button" id="save_ai_app_email_settings_data" class="btn btn-purple fs-medium-14 neutral-black-fs-60 radius-6 py-8 px-16 border border-2 bg-purple-100 text-white" name="save-email-settings" onclick="ai_app_onsite_save_email_settings()">Save</button>
                    </div>
                </form>
            </div>
            <div id="Email-settings-msg-container" class="message-container"></div>
            
            <?php 
            return ob_get_clean();
        }
    }
}
?>
