<?php if (!defined('ENLIGHTER_INIT')) die('DIRECT ACCESS PROHIBITED'); ?>

<div class="wrap about-wrap" id="enlighter-about" data-enlighter-page="about">

    <!-- News Title !-->
    <h1>Welcome to Enlighter <?php echo ENLIGHTER_VERSION ?></h1>

    <!-- News Subtext !-->
    <div class="about-text">
        Thanks for upgrading! Many new features and improvements are available that you will enjoy.
    </div>

    <!-- Logo on the right !-->
    <div id="enlighter-badge"></div>

    <!-- Settings Tabs -->
    <h2 class="nav-tab-wrapper" id="enlighter-tabnav">
        <a data-tab="enlighter-tab-news" class="nav-tab"><?php _e('What&#8217;s New', 'enlighter'); ?></a>
        <a data-tab="enlighter-tab-changelog" class="nav-tab"><?php _e('Changelog', 'enlighter'); ?></a>
        <a data-tab="enlighter-tab-debug" class="nav-tab"><?php _e('Debug', 'enlighter'); ?></a>
    </h2>

    <div class="enlighter-tab-container">

        <!-- News Tab !-->
        <div id="enlighter-tab-news" class="enlighter-tab">
        <?php include(ENLIGHTER_PLUGIN_PATH.'/views/admin/about/News.phtml'); ?>
        </div>

        <!-- Changelog Tab !-->
        <div id="enlighter-tab-changelog" class="enlighter-tab">
            <h3 class="changelog-title">What have been changed in <?php echo ENLIGHTER_VERSION ?></h3>

            <?php include(ENLIGHTER_PLUGIN_PATH.'/views/admin/about/Changelog.html'); ?>

            <p class="changelog-more">Need more ? View the <a href="https://codeberg.org/EnlighterJS/Plugin.WordPress/src/branch/master/CHANGES.md">full history on Codeberg.org</a></p>

        </div>

        <!-- Debug Tab !-->
        <div id="enlighter-tab-debug" class="enlighter-tab">
            <h3 class="changelog-title">DEBUG informations</h3>

            <p>Please attach the following informations to your issue/bug report!</p>

            <p><strong>Plugin configuration</strong></p>
            <p>
                <?php
                    echo '<pre>', esc_html(json_encode($this->_settingsManager->getOptions(), JSON_PRETTY_PRINT)), '</pre>';
                ?>
            </p>
            <p><strong>Custom theme configuration</strong></p>
            <p>
                <?php
                    echo '<pre>', esc_html($this->_themeCustomizer->loadCustomizerConfig()), '</pre>';
                ?>
            </p>
        </div>
    </div>
    
    <hr />

    <!-- Footer NAV !-->
    <p class="related"><strong>Related:</strong>
        <a href="https://aenon-dynamics.com">Author's Page</a> &bullet;
        <a href="https://codeberg.org/EnlighterJS">EnlighterJS Project</a>
    </p>
    <p class="related"><strong>Codeberg.org:</strong>
        <a href="https://codeberg.org/EnlighterJS/Plugin.WordPress">Development</a> &bullet;
        <a href="https://codeberg.org/EnlighterJS/Plugin.WordPress/issues">Report Bugs</a> &bullet;
        <a href="https://codeberg.org/EnlighterJS/Plugin.WordPress/commits/master">Commits</a> &bullet;
        <a href="https://codeberg.org/EnlighterJS/Plugin.WordPress/src/branch/master/CHANGES.md">Changelog</a>
    </p>

</div>