<?php

 /**
 * =============================================================================
 * @package         Blue Raven (Free Version)
 * @Plugin URI      https://enterrahost.com/plugins/blue-raven
 * 
 * @Author          EnterraHost
 * @Author URI      https://enterrahost.com
 * @License         GPL-2.0-or-later
 *  
 * @Copyright       (c) 2025 EnterraHost
 * @Contents        Plugin Tools > Mail
 *
 * =============================================================================
 * 
 * || INDEX:
 * ||   - BLUE RAVEN ADMIN TOOL MAIL
 * || 
 * =============================================================================
 */

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

/*
============================================================
    BLUE RAVEN ADMIN TOOL MAIL
============================================================
*/

class Blue_Raven_Admin_Tools_Mail {

    /**
     * Renders the Tools interface.
     *
     * Public entry point for displaying the plugin's Tools section.
     * May call internal methods to output templates, data, or logic.
     *
     * @access public
     * @return void
     */
    public function render() {
        self::load_tools_main_meta();
    }
    
    /**
     * Loads the main meta block for the Tools section.
     *
     * Outputs supporting HTML or data used in the main Tools layout,
     * such as descriptions, context, or quick access options.
     *
     * @access private
     * @static
     * @return void
     */
    private static function load_tools_main_meta() {
        ?>
            <div class='flex-sb'>
                <h3><?php esc_html_e( 'Mail Form Builder', 'blue-raven' ); ?></h3>
                <h4>
                    <?php esc_html_e( 'Need Help', 'blue-raven' ); ?>
                    <a href="https://portal.enterrahost.com/knowledgebase/5/" target="_noopeing" style="margin-left: 8px;" title="Learn more">
                        <i class="fas fa-question-circle"></i>
                    </a>
                </h4>
            </div>
            <p class='enterra-highlight indent-one'>  <?php esc_html_e( 'Our form builder makes it easy to add flexible, shortcode-driven contact forms to any page. Lightweight, fast, and easy to style, it supports email notifications, field validation, and spam protection. Perfect for simple, reliable form handling.', 'blue-raven' ); ?> </p>
            
            <section class='flex-sb border-bottom-white' style="margin: 20px 0;">
                <div style="margin: 20px 0;">
                    <button class='enterra-button' id='post-new-mail-block'><?php esc_html_e('Create A New Mail Block', 'blue-raven'); ?></button>
                </div>
                <p class='mail-form-size-note indent-one' style='color:red; display:none; margin: auto 0rem;'> <?php esc_html_e( 'Forms should be edited on a wider screen.', 'blue-raven' ); ?> </p>
            </section>
            <section id='mail-list' class='border-bottom-white' style="margin: 2rem 0;"><?php include plugin_dir_path(__DIR__) . 'blocks/block-mail-form-row.php'; ?></section>
            <section id='mail-builder' style='display: none;'></section>
        <?php
    }
}




