<?php

namespace ThemeAtelier\DomainForSale\Admin\HelpPage;

if (! defined('ABSPATH')) {
    exit;
}  // if direct access.

/**
 * The help class for the Testimonial Free
 */
class Help
{

    /**
     * Single instance of the class
     *
     * @var null
     */
    protected static $_instance = null;

    /**
     * Plugins Path variable.
     *
     * @var array
     */
    protected static $plugins = array(
        'greet-bubble'              => 'greet-bubble.php',
        'domain-for-sale'           => 'domain-for-sale.php',
        'ask-faq'                   => 'ask-faq.php',
        'attentive-security'        => 'attentive-security.php',
        'better-chat-support'       => 'messenger-chat-support.php',
        'bizreview'                 => 'bizreview.php',
        'booklet-booking-system'    => 'booklet.php',
        'skype-chat'                => 'skype-chat.php',
        'chat-help'                 => 'chat-whatsapp.php',
        'chat-telegram'             => 'telegram-chat.php',
        'chat-viber'                => 'chat-viber-lite.php',
        'click-to-dial'             => 'click-to-dial.php',
        'click-to-mail'             => 'click-to-mail.php',
        'darkify'                   => 'darkify.php',
        'eventful-for-elementor'    => 'eventful-for-elementor.php',
        'postify'                   => 'postify.php',
        'idonate'                   => 'idonate.php',
    );


    /**
     * Welcome pages
     *
     * @var array
     */
    public $pages = array(
        'dfs-help',
    );

    /**
     * Not show this plugin list.
     *
     * @var array
     */
    protected static $not_show_plugin_list = array('domain-for-sale', 'chat-viber', 'chat-telegram', 'click-to-dial', 'chat-skype', 'click-to-mail', 'ask-faq,', 'attentive-security', 'booklet-booking-system', 'postify', 'ask-faq', 'idonate', 'bizreview');

    /**
     * Help page construct function.
     */
    public function __construct()
    {
        add_action('dfs_recommended_page_menu', array($this, 'help_admin_menu'), 80);

        $page   = isset($_GET['page']) ? sanitize_text_field(wp_unslash($_GET['page'])) : '';
        if ('dfs-help' !== $page) {
            return;
        }
        add_action('admin_print_scripts', array($this, 'disable_admin_notices'));
        add_action('admin_enqueue_scripts', array($this, 'help_page_enqueue_scripts'));
    }

    /**
     * Main Help page Instance
     *
     * @static
     * @return self Main instance
     */
    public static function instance()
    {
        if (is_null(self::$_instance)) {
            self::$_instance = new self();
        }

        return self::$_instance;
    }

    /**
     * Help_page_enqueue_scripts function.
     *
     * @return void
     */
    public function help_page_enqueue_scripts()
    {
        wp_enqueue_style('eventful-help-style', plugins_url('assets/css/help-page.css', __FILE__), array(), '1.0.0');
        wp_enqueue_script('eventful-help-script', plugins_url('assets/js/help-page.js', __FILE__), array(), '1.0.0', true);
        wp_enqueue_style('ico-font');
    }

    /**
     * Add admin menu.
     *
     * @return void
     */
    public function help_admin_menu()
    {
        add_submenu_page(
            'domain-for-sale',
            __('Recommended', 'domain-for-sale'),
            __('Recommended', 'domain-for-sale'),
            'manage_options',
            'admin.php?page=dfs-help#recommended'
        );
        add_submenu_page(
            'domain-for-sale',
            __('Lite vs Pro', 'domain-for-sale'),
            __('Lite vs Pro', 'domain-for-sale'),
            'manage_options',
            'admin.php?page=dfs-help#lite-to-pro'
        );

        add_submenu_page(
            'domain-for-sale',
            __('Get Help', 'domain-for-sale'),
            __('Get Help', 'domain-for-sale'),
            'manage_options',
            'dfs-help',
            array(
                $this,
                'help_page_callback',
            )
        );
    }

    /**
     * Sprtf_plugins_info_api_help_page function.
     *
     * @return void
     */
    public function themeatelier_plugins_info_api_help_page()
    {
        $plugins_arr = get_transient('themeatelier_plugins');
        if (false === $plugins_arr) {
            $args    = (object) array(
                'author'   => 'themeatelier',
                'per_page' => '120',
                'page'     => '1',
                'fields'   => array(
                    'slug',
                    'name',
                    'version',
                    'downloaded',
                    'active_installs',
                    'last_updated',
                    'rating',
                    'num_ratings',
                    'short_description',
                    'author',
                ),
            );
            $request = array(
                'action'  => 'query_plugins',
                'timeout' => 30,
                'request' => serialize($args),
            );
            // https://codex.wordpress.org/WordPress.org_API.
            $url      = 'http://api.wordpress.org/plugins/info/1.0/';
            $response = wp_remote_post($url, array('body' => $request));

            if (! is_wp_error($response)) {

                $plugins_arr = array();
                $plugins     = unserialize($response['body']);

                if (isset($plugins->plugins) && (count($plugins->plugins) > 0)) {
                    foreach ($plugins->plugins as $pl) {
                        if (! in_array($pl->slug, self::$not_show_plugin_list, true)) {
                            $plugins_arr[] = array(
                                'slug'              => $pl->slug,
                                'name'              => $pl->name,
                                'version'           => $pl->version,
                                'downloaded'        => $pl->downloaded,
                                'active_installs'   => $pl->active_installs,
                                'last_updated'      => strtotime($pl->last_updated),
                                'rating'            => $pl->rating,
                                'num_ratings'       => $pl->num_ratings,
                                'short_description' => $pl->short_description,
                            );
                        }
                    }
                }

                set_transient('themeatelier_plugins', $plugins_arr, 24 * HOUR_IN_SECONDS);
            }
        }

        if (is_array($plugins_arr) && (count($plugins_arr) > 0)) {
            array_multisort(array_column($plugins_arr, 'active_installs'), SORT_DESC, $plugins_arr);


            foreach ($plugins_arr as $plugin) {
                $plugin_slug = $plugin['slug'];
                $image_type  = 'png';
                if (isset(self::$plugins[$plugin_slug])) {
                    $plugin_file = self::$plugins[$plugin_slug];
                } else {
                    $plugin_file = $plugin_slug . '.php';
                }

                switch ($plugin_slug) {
                    case 'postify':
                        $image_type = 'jpg';
                        break;
                    case 'darkify':
                        $image_type = 'gif?rev=3301202';
                        break;
                }

                $details_link = network_admin_url('plugin-install.php?tab=plugin-information&amp;plugin=' . $plugin['slug'] . '&amp;TB_iframe=true&amp;width=600&amp;height=550');
?>
                <div class="plugin-card <?php echo esc_attr($plugin_slug); ?>" id="<?php echo esc_attr($plugin_slug); ?>">
                    <div class="plugin-card-top">
                        <div class="name column-name">
                            <h3>
                                <a class="thickbox" title="<?php echo esc_attr($plugin['name']); ?>"
                                    href="<?php echo esc_url($details_link); ?>">
                                    <?php echo esc_html($plugin['name']); ?>
                                    <img src="<?php echo esc_url('https://ps.w.org/' . $plugin_slug . '/assets/icon-256x256.' . $image_type); ?>"
                                        class="plugin-icon" />
                                </a>
                            </h3>
                        </div>
                        <div class="action-links">
                            <ul class="plugin-action-buttons">
                                <li>
                                    <?php
                                    if ($this->is_plugin_installed($plugin_slug, $plugin_file)) {
                                        if ($this->is_plugin_active($plugin_slug, $plugin_file)) {
                                    ?>
                                            <button type="button" class="button button-disabled" disabled="disabled">Active</button>
                                        <?php
                                        } else {
                                        ?>
                                            <a href="<?php echo esc_url($this->activate_plugin_link($plugin_slug, $plugin_file)); ?>"
                                                class="button button-primary activate-now">
                                                <?php esc_html_e('Activate', 'domain-for-sale'); ?>
                                            </a>
                                        <?php
                                        }
                                    } else {
                                        ?>
                                        <a href="<?php echo esc_url($this->install_plugin_link($plugin_slug)); ?>"
                                            class="button install-now">
                                            <?php esc_html_e('Install Now', 'domain-for-sale'); ?>
                                        </a>
                                    <?php } ?>
                                </li>
                                <li>
                                    <a href="<?php echo esc_url($details_link); ?>" class="thickbox open-plugin-details-modal"
                                        aria-label="<?php echo esc_html('More information about ' . $plugin['name']); ?>"
                                        title="<?php echo esc_attr($plugin['name']); ?>">
                                        <?php esc_html_e('More Details', 'domain-for-sale'); ?>
                                    </a>
                                </li>
                            </ul>
                        </div>
                        <div class="desc column-description">
                            <p><?php echo esc_html(isset($plugin['short_description']) ? $plugin['short_description'] : ''); ?></p>
                            <p class="authors"> <cite>By <a href="https://themeatelier.com/">Themeatelier</a></cite></p>
                        </div>
                    </div>
                    <?php
                    echo '<div class="plugin-card-bottom">';

                    if (isset($plugin['rating'], $plugin['num_ratings'])) {
                    ?>
                        <div class="vers column-rating">
                            <?php
                            wp_star_rating(
                                array(
                                    'rating' => $plugin['rating'],
                                    'type'   => 'percent',
                                    'number' => $plugin['num_ratings'],
                                )
                            );
                            ?>
                            <span class="num-ratings">(<?php echo esc_html(number_format_i18n($plugin['num_ratings'])); ?>)</span>
                        </div>
                    <?php
                    }
                    if (isset($plugin['version'])) {
                    ?>
                        <div class="column-updated">
                            <strong><?php esc_html_e('Version:', 'domain-for-sale'); ?></strong>
                            <span><?php echo esc_html($plugin['version']); ?></span>
                        </div>
                    <?php
                    }

                    if (isset($plugin['active_installs'])) {
                    ?>
                        <div class="column-downloaded">
                            <?php echo esc_html(number_format_i18n($plugin['active_installs'])) . esc_html__('+ Active Installations', 'domain-for-sale'); ?>
                        </div>
                    <?php
                    }

                    if (isset($plugin['last_updated'])) {
                    ?>
                        <div class="column-compatibility">
                            <strong><?php esc_html_e('Last Updated:', 'domain-for-sale'); ?></strong>
                            <span><?php echo esc_html(human_time_diff($plugin['last_updated'])) . ' ' . esc_html__('ago', 'domain-for-sale'); ?></span>
                        </div>
                    <?php
                    }

                    echo '</div>';
                    ?>
                </div>
        <?php
            }
        }
    }

    /**
     * Check plugins installed function.
     *
     * @param string $plugin_slug Plugin slug.
     * @param string $plugin_file Plugin file.
     * @return boolean
     */
    public function is_plugin_installed($plugin_slug, $plugin_file)
    {
        return file_exists(WP_PLUGIN_DIR . '/' . $plugin_slug . '/' . $plugin_file);
    }

    /**
     * Check active plugin function
     *
     * @param string $plugin_slug Plugin slug.
     * @param string $plugin_file Plugin file.
     * @return boolean
     */
    public function is_plugin_active($plugin_slug, $plugin_file)
    {
        return is_plugin_active($plugin_slug . '/' . $plugin_file);
    }

    /**
     * Install plugin link.
     *
     * @param string $plugin_slug Plugin slug.
     * @return string
     */
    public function install_plugin_link($plugin_slug)
    {
        return wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $plugin_slug), 'install-plugin_' . $plugin_slug);
    }

    /**
     * Active Plugin Link function
     *
     * @param string $plugin_slug Plugin slug.
     * @param string $plugin_file Plugin file.
     * @return string
     */
    public function activate_plugin_link($plugin_slug, $plugin_file)
    {
        return wp_nonce_url(admin_url('domain-for-sale&page=dfs-help&action=activate&plugin=' . $plugin_slug . '/' . $plugin_file . '#recommended'), 'activate-plugin_' . $plugin_slug . '/' . $plugin_file);
    }


    /**
     * Making page as clean as possible
     */
    public function disable_admin_notices()
    {

        global $wp_filter;

        if (isset($_GET['post_type']) && isset($_GET['page']) && 'domain-for-sale' === wp_unslash($_GET['post_type']) && in_array(wp_unslash($_GET['page']), $this->pages)) { // @codingStandardsIgnoreLine

            if (isset($wp_filter['user_admin_notices'])) {
                unset($wp_filter['user_admin_notices']);
            }
            if (isset($wp_filter['admin_notices'])) {
                unset($wp_filter['admin_notices']);
            }
            if (isset($wp_filter['all_admin_notices'])) {
                unset($wp_filter['all_admin_notices']);
            }
        }
    }
    /**
     * The DomainForSale Help Callback.
     *
     * @return void
     */
    public function help_page_callback()
    {

        add_thickbox();

        $action   = isset($_GET['action']) ? sanitize_text_field(wp_unslash($_GET['action'])) : '';
        $plugin   = isset($_GET['plugin']) ? sanitize_text_field(wp_unslash($_GET['plugin'])) : '';
        $_wpnonce = isset($_GET['_wpnonce']) ? sanitize_text_field(wp_unslash($_GET['_wpnonce'])) : '';

        if (isset($action, $plugin) && ('activate' === $action) && wp_verify_nonce($_wpnonce, 'activate-plugin_' . $plugin)) {
            activate_plugin($plugin, '', false, true);
        }

        if (isset($action, $plugin) && ('deactivate' === $action) && wp_verify_nonce($_wpnonce, 'deactivate-plugin_' . $plugin)) {
            deactivate_plugins($plugin, '', false, true);
        }

        ?>
        <div class="domain-for-sale">
            <!-- Header section start -->
            <section class="themeatelier__help header">
                <div class="themeatelier-container">
                    <div class="header_nav">
                        <div class="header_nav_left">
                            <div class="header_nav_logo">
                                <img src="<?php echo esc_url(DOMAIN_FOR_SALE_DIR_URL . 'src/Admin/HelpPage/assets/images/dfs-logo.svg') ?>"
                                    alt="logo">
                            </div>
                            <div class="header_nav_menu">
                                <ul>
                                    <li>
                                        <a href="<?php echo esc_url(admin_url('') . 'admin.php?page=dfs-help#get-start'); ?>" data-id="get-start-tab" class="active">
                                            <i class="icofont-play-alt-2"></i>
                                            <?php echo esc_html__('Get Started', 'domain-for-sale') ?>
                                        </a>
                                    </li>
                                    <li>

                                        <a href="<?php echo esc_url(admin_url('') . 'admin.php?page=dfs-help#recommended'); ?>" data-id="recommended-tab">
                                            <i class="icofont-thumbs-up"></i>
                                            <?php echo esc_html__('Recommended', 'domain-for-sale') ?>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="<?php echo esc_url(admin_url('') . 'admin.php?page=dfs-help#lite-to-pro'); ?>" data-id="lite-to-pro-tab">
                                            <i class="icofont-badge"></i>
                                            <?php echo esc_html__('Lite Vs Pro', 'domain-for-sale') ?>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="<?php echo esc_url(admin_url('') . 'admin.php?page=dfs-help#pro-plugins'); ?>" data-id="pro-plugins-tab">
                                            <i class="icofont-info-circle"></i>
                                            <?php echo esc_html__('Pro Plugins', 'domain-for-sale') ?>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="header_nav_right">
                            <div class="header_nav_right_menu">
                                <a target="_blank" href="https://wpdomainforsale.com/pricing/"><?php echo esc_html__('🚀 Upgrading To Pro!', 'domain-for-sale') ?></a>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
            <!--header section end -->

            <!-- Start Page -->
            <section class="start_page tab-content active" id="get-start-tab">
                <div class="themeatelier-container">
                    <div class="start_page_wrapper">
                        <div class="start_page_nav">
                            <div class="nav_left">
                                <h2 class="section_title"><?php echo esc_html__('Welcome to Domain For Sale!', 'domain-for-sale') ?><span class="version__badge"><?php echo esc_html(DOMAIN_FOR_SALE_VERSION) ?></span></h2>
                                <span class="section_subtitle">
                                    <?php echo esc_html__('Thank you for installing Domain For Sale! This playlist will help you get started with the plugin. Enjoy!', 'domain-for-sale') ?>
                                </span>
                            </div>
                            <div class="nev_right">
                                <i class="icofont-youtube-play"></i>
                                <a target="_blank" href="https://youtube.com/playlist?list=PL_Vf9qsWW465o-v7DCJsF4973aUEvh_p9&feature=shared">Themeatelier</a>
                            </div>
                        </div>
                        <div class="section_video">
                            <div class="video">
                                <iframe width="724" height="405" src="https://www.youtube.com/embed/jnYCZffVfDk"
                                    title="Domain For Sale WordPress Plugin - Overview" frameborder="0"
                                    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
                                    referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
                            </div>
                            <div class="section_video_play_list">
                                <div class="play_list_item active" data-video_id="jnYCZffVfDk">
                                    <div class="play_list_item_title">
                                        <h3>Overview</h3>
                                    </div>
                                    <div class="play_list_item_content">
                                        <div class="title">Domain For Sale WordPress Plugin - Overview</div>
                                        <span>6:39</span>
                                    </div>
                                </div>
                                <div class="play_list_item active" data-video_id="lKGM9NOyvRk">
                                    <div class="play_list_item_title">
                                        <h3>Import & Export</h3>
                                    </div>
                                    <div class="play_list_item_content">
                                        <div class="title">Import & Export Domains, Listings, and Settings</div>
                                        <span>2:27</span>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <ul class="section_buttons">
                            <li>
                                <a class="chat_btn_primary"
                                    href="<?php echo esc_url(admin_url('/domain-for-sale')); ?>"><?php echo esc_html__('Create Layout', 'domain-for-sale') ?></a>
                            </li>
                            <li>
                                <a target="_blank" class="chat_btn_secondary"
                                    href="<?php echo esc_url(DOMAIN_FOR_SALE_DEMO_URL); ?>#demo"><?php echo esc_html__('Live Demo', 'domain-for-sale') ?></a>
                            </li>
                            <li>
                                <a target="_blank" class="chat_btn_secondary arrow-btn"
                                    href="<?php echo esc_url(DOMAIN_FOR_SALE_DEMO_URL); ?>pricing/?ref=1"><?php echo esc_html__('Upgrade To Pro', 'domain-for-sale') ?>
                                </a>
                            </li>
                        </ul>
                    </div>
                    <div class="section_quick_help">
                        <div class="quick_help_wrapper">
                            <a target="_blank" href="<?php echo esc_url(DOMAIN_FOR_SALE_DEMO_URL) . 'docs/?ref=1'; ?>" class="quick_help_item">
                                <div class="quick_help_item_icon"><i class="icofont-file-alt"></i></div>
                                <div class="quick_help_item_content">
                                    <h4 class="quick_help_item_title">
                                        <?php echo esc_html__('Documentation', 'domain-for-sale') ?>
                                    </h4>
                                    <div class="content"><?php echo esc_html__('Explore plugin capabilities in our enriched documentation.', 'domain-for-sale') ?></div>
                                </div>
                            </a>
                            <a target="_blank" href="https://wordpress.org/support/plugin/domain-for-sale/" class="quick_help_item">
                                <div class="quick_help_item_icon"><i class="icofont-support"></i></div>
                                <div class="quick_help_item_content">
                                    <h4 class="quick_help_item_title">
                                        <?php echo esc_html__('Technical Support', 'domain-for-sale') ?>
                                    </h4>
                                    <div class="content"><?php echo esc_html__('For personalized assistance, reach out to our skilled support team for prompt help.', 'domain-for-sale') ?></div>
                                </div>
                            </a>
                            <a target="_blank" href="https://www.themeatelier.net/contact/" class="quick_help_item">
                                <div class="quick_help_item_icon"><i class="icofont-users"></i></div>
                                <div class="quick_help_item_content">
                                    <h4 class="quick_help_item_title">
                                        <?php echo esc_html__('Hire Us!', 'domain-for-sale') ?>
                                    </h4>
                                    <div class="content"><?php echo esc_html__('We are available for freelance work for any WordPress, React, NextJS projects. Click to contact us.', 'domain-for-sale') ?></div>
                                </div>
                            </a>
                        </div>
                    </div>
                </div>
            </section>

            <!-- Recommended Page -->
            <section id="recommended-tab" class="recommended_page tab-content">
                <div class="themeatelier-container">
                    <h2 class="help_page_title">Enhance your Website with our Free Robust Plugins</h2>
                    <div class="themeatelier-wp-list-table plugin-install-php">
                        <div class="recommended_plugins" id="the-list">
                            <?php
                            $this->themeatelier_plugins_info_api_help_page();
                            ?>
                        </div>
                    </div>
                </div>
            </section>

            <!-- Lite To Pro Page -->
            <section class="themeatelier__help lite_vs_pro_page tab-content" id="lite-to-pro-tab">
                <div class="themeatelier-container">
                    <h2 class="help_page_title">Lite Vs Pro Comparison</h2>

                    <div class="lite_vs_pro_page_wrap">
                        <div class="themeatelier-features">
                            <ul>
                                <li class="themeatelier-header">
                                    <span class="themeatelier-title"><?php echo esc_html__('FEATURES', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free"><?php echo esc_html__('Lite', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-pro">🚀<?php echo esc_html__('PRO', 'domain-for-sale'); ?></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('All Free Version Features', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title">
                                        <?php echo esc_html__('Layout Variants for landing pages and single pages', 'domain-for-sale'); ?>
                                    </span>
                                    <span class="themeatelier-free"><b>1</b></span>
                                    <span class="themeatelier-pro"><b>2</b></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Unlimited domain listing to showcase multiple domains', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Bulk Domain Import (Upload Multiple Domains via CSV/XML/JSON)', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title">
                                        <?php echo esc_html__('Apply Layout by Single/Multi Page Select', 'domain-for-sale'); ?>
                                    </span>
                                    <span class="themeatelier-free themeatelier-close-icon"></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                </li>

                                <li class="themeatelier-body">
                                    <span class="themeatelier-title">
                                        <?php echo esc_html__('Receive Domain Offers', 'domain-for-sale'); ?>
                                    </span>
                                    <span class="themeatelier-free themeatelier-close-icon"></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title">
                                        <?php echo esc_html__('Escrow.com Integration (Secure Payment Form)', 'domain-for-sale'); ?>
                                    </span>
                                    <span class="themeatelier-free themeatelier-close-icon"></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title">
                                        <?php echo esc_html__('Buyer Invitation System (Send Escrow Links)', 'domain-for-sale'); ?>
                                    </span>
                                    <span class="themeatelier-free themeatelier-close-icon"></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title">
                                        <?php echo esc_html__('Dual Offer & Escrow Workflow', 'domain-for-sale'); ?>
                                    </span>
                                    <span class="themeatelier-free themeatelier-close-icon"></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                </li>

                                <li class="themeatelier-body">
                                    <span class="themeatelier-title">
                                        <?php echo esc_html__('Drag & Drop Contact Info', 'domain-for-sale'); ?>
                                    </span>
                                    <span class="themeatelier-free">2</span>
                                    <span class="themeatelier-pro">Unlimited</span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title">
                                        <?php echo esc_html__('Recommended Domains (Layout 02)', 'domain-for-sale'); ?>
                                    </span>
                                    <span class="themeatelier-free themeatelier-close-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>

                                <li class="themeatelier-body">
                                    <span class="themeatelier-title">
                                        <?php echo esc_html__('Pre Defined Color Scheme', 'domain-for-sale'); ?>
                                    </span>
                                    <span class="themeatelier-free">4</span></span>
                                    <span class="themeatelier-pro">4</span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Custom Color Scheme', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-close-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Advanced Style Settings: Width, Gap, Background, Overlay, Typography', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>

                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('List All Offers Inside Offers Menu', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>

                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Export Offers As CSV', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-close-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>

                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Advanced Filtering For Offers', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>



                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Currency (US Dollars (USD), Euros (EUR),Australian Dollars (AUD))', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Form Fields Label & Placeholder Changing Options', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Google reCAPTCHA (V3 & V2)', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-close-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Offer Notifications for Admin', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Bidder Confirmation Email', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Bidder Email Verification Feature', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-close-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>

                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Option to Change Form Messages & Errors', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Custom (CSS & JavaScript)', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Clean-up Data on Deletion', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('CSV, XML, and JSON import/export support for Domains', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('CSV, XML, and JSON import/export support for Listings', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                                <li class="themeatelier-body">
                                    <span class="themeatelier-title"><?php echo esc_html__('Settings Import & Export (JSON)', 'domain-for-sale'); ?></span>
                                    <span class="themeatelier-free themeatelier-check-icon"></span>
                                    <span class="themeatelier-pro themeatelier-check-icon"></span>
                                </li>
                            </ul>
                        </div>

                        <div class="themeatelier-upgrade-to-pro">
                            <h2 class="themeatelier-section-title"><?php echo esc_html__('Upgrade To PRO & Enjoy Advanced Features!', 'domain-for-sale'); ?></h2>
                            <span class="themeatelier-section-subtitle">
                                <?php
                                /* translators: %s: Number of people using Domain For Sale. */
                                echo sprintf(esc_html__('Join %s users who already trust Domain For Sale to list, showcase, and sell their domains effortlessly — why won’t you?', 'domain-for-sale'), '<b>2000+</b>'); ?>
                            </span>
                            <div class="themeatelier-upgrade-to-pro-btn">
                                <div class="themeatelier-action-btn">
                                    <a target="_blank" href="<?php echo esc_url(DOMAIN_FOR_SALE_DEMO_URL) ?>pricing/?ref=1" class="chat_btn_primary">
                                        <?php echo esc_html__('Upgrade to Pro Now!', 'domain-for-sale'); ?>
                                    </a>
                                    <span class="themeatelier-small-paragraph">
                                        <?php
                                        /* translators: %s: "Refund Policy" link. */
                                        echo sprintf(esc_html__('14-Day No-Questions-Asked %s', 'domain-for-sale'), '<a target="_blank" href="https://themeatelier.net/refund-policy/">' . esc_html__('Refund Policy', 'domain-for-sale') . '</a>'); ?>
                                    </span>
                                </div>
                                <a target="_blank" class="chat_btn_secondary" href="<?php echo esc_url(DOMAIN_FOR_SALE_DEMO_URL) ?>features?ref=1"><?php echo esc_html__('See All Features', 'domain-for-sale'); ?></a>
                                <a target="_blank" class="chat_btn_secondary" href="<?php echo esc_url(DOMAIN_FOR_SALE_DEMO_URL) ?>#demo"><?php echo esc_html__('Pro Live Demo', 'domain-for-sale'); ?></a>
                            </div>
                        </div>
                    </div>

                    <div class="chat_testimonial">
                        <div class="chat_testimonial_title_section">
                            <span class="chat_testimonial-subtitle"><?php echo esc_html__('NO NEED TO TAKE OUR WORD FOR IT', 'domain-for-sale'); ?></span>
                            <h2 class="themeatelier-section-title"><?php echo esc_html__('Our Users Love Domain For Sale!', 'domain-for-sale'); ?></h2>
                        </div>
                        <div class="chat_testimonial_wrap">

                            <div class="chat_testimonial_area">
                                <div class="chat_testimonial_content">
                                    <h3><a href="https://wordpress.org/support/topic/a-fantastic-plugin-for-domain-name-selling/"><?php echo esc_html__('A Fantastic Plugin For Domain Name Selling', 'domain-for-sale') ?></a></h3>
                                    <p><?php echo esc_html__('This is a simple and easy plugin if you sell domain names. I am testing it now and it works great. Cheers to the developer. Thank you.', 'domain-for-sale'); ?></p>
                                </div>
                                <div class="chat_testimonial-info">
                                    <div class="themeatelier-img">
                                        <img src="<?php echo esc_url(DOMAIN_FOR_SALE_DIR_URL . 'src/Admin/HelpPage/assets/images/user1.jpeg'); ?>"
                                            alt="<?php echo esc_attr__('Techspecx', 'domain-for-sale'); ?>">
                                    </div>
                                    <div class="themeatelier-info">
                                        <h3><?php echo esc_html__('Techspecx', 'domain-for-sale'); ?></h3>
                                        <div class="themeatelier-star">
                                            <i>★★★★★</i>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="chat_testimonial_area">
                                <div class="chat_testimonial_content">
                                     <h3><a href="https://wordpress.org/support/topic/a-no-frills-domain-selling-plugin-with-great-support/"><?php echo esc_html__('A no-frills domain selling plugin with great support!', 'domain-for-sale') ?></a></h3>
                                    <p>This is a very crisp no-frills plugin for selling a domain name. I modified the template to use it as a ‘Available for Collaboration’ template instead of the default ‘For Sale’ template. It has all the essential features in-built for such a page, like fill-in forms etc.  <a href="https://wordpress.org/support/topic/a-no-frills-domain-selling-plugin-with-great-support/">See More</a></p>      
                                </div>
                                <div class="chat_testimonial-info">
                                    <div class="themeatelier-img">
                                        <img src="<?php echo esc_url(DOMAIN_FOR_SALE_DIR_URL . 'src/Admin/HelpPage/assets/images/user2.jpeg'); ?>"
                                            alt="<?php echo esc_attr__('Zerobeat', 'domain-for-sale'); ?>">
                                    </div>
                                    <div class="themeatelier-info">
                                        <h3><?php echo esc_html__('Zerobeat', 'domain-for-sale'); ?></h3>
                                        <div class="themeatelier-star">
                                            <i>★★★★★</i>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="chat_testimonial_area">
                                <div class="chat_testimonial_content">
                                    <h3><a href="https://wordpress.org/support/topic/simple-and-reliable-domain-selling-plugin/"><?php echo esc_html__('Simple and Reliable Domain Selling Plugin', 'domain-for-sale') ?></a></h3>
                                    <p><?php echo esc_html__('Easy to set up and start selling domains right away. Works perfectly and the support team went above and beyond—highly recommended for anyone looking for a WordPress domain selling solution.', 'domain-for-sale'); ?></p>
                                </div>
                                <div class="chat_testimonial-info">
                                    <div class="themeatelier-img">
                                        <img src="<?php echo esc_url(DOMAIN_FOR_SALE_DIR_URL . 'src/Admin/HelpPage/assets/images/user3.jpeg'); ?>"
                                            alt="<?php echo esc_attr__('Chrisanisere', 'domain-for-sale'); ?>">
                                    </div>
                                    <div class="themeatelier-info">
                                        <h3><?php echo esc_html__('Crowandravener', 'domain-for-sale'); ?></h3>
                                        <div class="themeatelier-star">
                                            <i>★★★★★</i>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

            <!-- About Page -->
            <section id="pro-plugins-tab" class="themeatelier__help about-page tab-content">
                <div class="themeatelier-container">
                    <h2 class="help_page_title"><?php echo esc_html__('Upgrade your Website with our High-quality Plugins!', 'domain-for-sale'); ?></h2>
                    <div class="themeatelier-our-plugin-list">

                        <div class="themeatelier-our-plugin-list-wrap">
                            <a target="_blank" class="themeatelier-our-plugin-list-box" href="<?php echo esc_url('https://wpdomainforsale.com/'); ?>">
                                <div class="box_btn">
                                    <?php echo esc_html__('View Details', 'domain-for-sale'); ?>
                                    <i class="icofont-long-arrow-right"></i>
                                </div>
                                <img src="<?php echo esc_url('https://ps.w.org/domain-for-sale/assets/icon-256x256.png?rev=3337336'); ?>" alt="<?php echo esc_attr__('Domain For Sale', 'domain-for-sale'); ?>">
                                <h4><?php echo esc_html__('Domain For Sale', 'domain-for-sale'); ?></h4>
                                <p><?php echo esc_html__('The ultimate WordPress plugin for domain sales, appraisals, auctions, and marketplace management.', 'domain-for-sale'); ?></p>
                            </a>

                            <a target="_blank" class="themeatelier-our-plugin-list-box" href="<?php echo esc_url('http://wpchathelp.com/pricing/'); ?>">
                                <div class="box_btn">
                                    <?php echo esc_html__('View Details', 'domain-for-sale'); ?>
                                    <i class="icofont-long-arrow-right"></i>
                                </div>
                                <img src="<?php echo esc_url('https://ps.w.org/chat-help/assets/icon-256x256.png?rev=3270129'); ?>" alt="<?php echo esc_attr__('WhatsApp Chat Help', 'domain-for-sale'); ?>">
                                <h4><?php echo esc_html__('WhatsApp Chat Help', 'domain-for-sale'); ?></h4>
                                <p><?php echo esc_html__('Whatsapp chat support is a WordPress plugin that allows website owners to easily add a WhatsApp chat button to their website.', 'domain-for-sale'); ?></p>
                            </a>

                            <a target="_blank" class="themeatelier-our-plugin-list-box" href="<?php echo esc_url('https://darkifywp.com/pricing/'); ?>">
                                <div class="box_btn">
                                    <?php echo esc_html__('View Details', 'domain-for-sale'); ?>
                                    <i class="icofont-long-arrow-right"></i>
                                </div>
                                <img src="<?php echo esc_url('https://ps.w.org/darkify/assets/icon-256x256.gif?rev=3301202'); ?>" alt="<?php echo esc_attr__('Darkify - WordPress Dark Mode Plugin', 'domain-for-sale'); ?>">
                                <h4><?php echo esc_html__('Darkify - WordPress Dark Mode Plugin', 'domain-for-sale'); ?></h4>
                                <p><?php echo esc_html__('Darkify – is an extremely advanced dark mode plugin for any WordPress website. The plugin has the option to enable a dark mode switcher for the front end and also WordPress admin.', 'domain-for-sale'); ?></p>
                            </a>

                            <a target="_blank" class="themeatelier-our-plugin-list-box" href="<?php echo esc_url('https://wpeventful.com/pricing/'); ?>">
                                <div class="box_btn">
                                    <?php echo esc_html__('View Details', 'domain-for-sale'); ?>
                                    <i class="icofont-long-arrow-right"></i>
                                </div>
                                <img src="<?php echo esc_url('https://ps.w.org/eventful/assets/icon-256x256.png?rev=3088585'); ?>" alt="<?php echo esc_attr__('Eventful - Events Showcase', 'domain-for-sale'); ?>">
                                <h4><?php echo esc_html__('Eventful - Events Showcase for The "The Events Calendar"', 'domain-for-sale'); ?></h4>
                                <p><?php echo esc_html__('With "Eventful," you can effortlessly create intelligent layouts for "The Events Calendar" plugin, effectively addressing and resolving compatibility issues that may arise.', 'domain-for-sale'); ?></p>
                            </a>

                            <a target="_blank" class="themeatelier-our-plugin-list-box" href="<?php echo esc_url('https://themeatelier.net/downloads/greet-bubble/'); ?>">
                                <div class="box_btn">
                                    <?php echo esc_html__('View Details', 'domain-for-sale'); ?>
                                    <i class="icofont-long-arrow-right"></i>
                                </div>
                                <img src="<?php echo esc_url(DOMAIN_FOR_SALE_DIR_URL . 'src/Admin/HelpPage/assets/images/greet-logo.png'); ?>" alt="<?php echo esc_attr__('Greet Bubble Logo', 'domain-for-sale'); ?>">
                                <h4><?php echo esc_html__('Greet Bubble - Video Bubble Plugin for WordPress', 'domain-for-sale'); ?></h4>
                                <p><?php echo esc_html__('Placing a video on websites can increase the sales of your services or products in a significant way. Greet is a professional video bubble plugin for showing a welcome video on your websites in a great and fun way.', 'domain-for-sale'); ?></p>
                            </a>

                            <a target="_blank" class="themeatelier-our-plugin-list-box" href="<?php echo esc_url('https://themeatelier.net/downloads/eventful-for-elementor/'); ?>">
                                <div class="box_btn">
                                    <?php echo esc_html__('View Details', 'domain-for-sale'); ?>
                                    <i class="icofont-long-arrow-right"></i>
                                </div>
                                <img src="<?php echo esc_url(DOMAIN_FOR_SALE_DIR_URL . 'src/Admin/HelpPage/assets/images/eventful-for-elementor.png'); ?>" alt="<?php echo esc_attr__('Eventful for Elementor Logo', 'domain-for-sale'); ?>">
                                <h4><?php echo esc_html__('Eventful for Elementor - Events Showcase for The "The Events Calendar"', 'domain-for-sale'); ?></h4>
                                <p><?php echo esc_html__('Easily display events from The Events Calendar plugin with Elementor widgets, offering seamless customization and powerful layout options.', 'domain-for-sale'); ?></p>
                            </a>

                        </div>
                    </div>
                </div>
            </section>

            <!-- Footer Section -->
            <section class="themeatelier_footer">
                <div class="themeatelier_footer_top">
                    <p>
                        <span><?php echo esc_html__('Made With', 'domain-for-sale'); ?> <i class="icofont-heart-alt"></i></span>
                        <?php echo esc_html__('By the Team', 'domain-for-sale'); ?> <a target="_blank" href="<?php echo esc_url('https://themeatelier.net/'); ?>"><?php echo esc_html__('ThemeAtelier', 'domain-for-sale'); ?></a>
                    </p>
                    <p><?php echo esc_html__('Get connected with', 'domain-for-sale'); ?></p>
                    <ul>
                        <li>
                            <a target="_blank" href="<?php echo esc_url('https://www.facebook.com/ThemeAtelier/'); ?>"><i class="icofont-facebook"></i></a>
                        </li>
                        <li>
                            <a target="_blank" href="<?php echo esc_url('https://x.com/intent/follow?screen_name=themeatelier'); ?>"><i class="icofont-x"></i></a>
                        </li>
                        <li>
                            <a target="_blank" href="<?php echo esc_url('https://profiles.wordpress.org/themeatelier/#content-plugins'); ?>"><i class="icofont-brand-wordpress"></i></a>
                        </li>
                        <li>
                            <a target="_blank" href="<?php echo esc_url('https://www.youtube.com/@themeatelier'); ?>"><i class="icofont-youtube-play"></i></a>
                        </li>
                    </ul>
                </div>
            </section>
        </div>
<?php
    }
}
