<?php 

require get_template_directory() . '/inc/admin/flb-notice/flb-notice.php';

require get_template_directory() . '/inc/admin/flb-notice/class-getting-start-plugin-helper.php';


function feminine_lifestyle_blog_getting_started_dashboard(){

    add_theme_page( __( 'Getting Started','feminine-lifestyle-blog' ),__( 'Getting Started','feminine-lifestyle-blog' ) ,'manage_options', 'feminine-lifestyle-blog-theme-options', 'feminine_lifestyle_blog_admin_notice_page' );

}
add_action( 'admin_menu','feminine_lifestyle_blog_getting_started_dashboard' );
function feminine_lifestyle_blog_admin_notice_page(){
    ?>
    <div class="flb-notice-wrapper">
        <div class="intro-wrap">
            <div class="container">
                <div class="intro">
                    <h1><?php esc_html_e( 'Getting started with Feminine Lifestyle Blog', 'feminine-lifestyle-blog' ); ?></h1>
                </div>
            </div>
        </div>
        <!-- Introtabs -->
        <div class="container--tabs">

            <section class="row">
                <div class="container">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab-1"><?php esc_html_e( 'Recommended Plugins', 'feminine-lifestyle-blog' ); ?></a></li>
                        <li class=""><a href="#tab-2"><?php esc_html_e( 'Getting Started', 'feminine-lifestyle-blog' ); ?></a></li>
                    </ul>
                    <div class="tab-content">
                        <div id="tab-1" class="tab-pane active ">
                            <div class="left-details">
                                <h3><?php esc_html_e( 'Recommended Plugins', 'feminine-lifestyle-blog' ); ?></h3>
                                <div class="details-wrap">
                                    <p><?php echo wp_kses_post( 'We recommend you to install the below listed plugins in order to create a website similar to our <a href="https://himalayanthemes.com/themes-demo/?theme=feminine-lifestyle-blog" class="demo-link-added">demo site</a>. Please note that these plugins are optional but they enhance the theme\'s available feature.', 'feminine-lifestyle-blog' ); ?></p>
                                </div>

                                <?php 
                                    $free_plugins = array(
                                        'regenerate-thumbnails' => array(
                                            'slug' 		=> 'regenerate-thumbnails',
                                            'filename' 	=> 'regenerate-thumbnails.php',
                                        ),
                                        'wpforms-lite' => array(
                                            'slug' 		=> 'wpforms-lite',
                                            'filename' 	=> 'wpforms.php',
                                        ),
                                        'instagram-feed' => array(
                                            'slug' 		=> 'instagram-feed',
                                            'filename' 	=> 'instagram-feed.php',
                                        )                                                  
                                    ); 
                                if( $free_plugins ){ ?>
                                    <div class="grid-wrapper">
                                        <?php foreach( $free_plugins as $plugin ){
                                            $info       = feminine_lifestyle_blog_call_plugin_api( $plugin['slug'] );
                                            $icon_url   = feminine_lifestyle_blog_check_for_icon( $info->icons ); ?>
                                            <div class="card">
                                                <div class="img">
                                                    <img src="<?php echo esc_url( $icon_url ); ?>" />
                                                </div>
                                                <div class="sm-details-wrap">
                                                    <h4><?php echo esc_html( $info->name ); ?></h4>
                                                    <p><?php printf( esc_html__( 'Version %s', 'feminine-lifestyle-blog' ), $info->version ); ?></p>
                                                    <?php echo Feminine_Lifestyle_Blog_Getting_Started_Page_Plugin_Helper::instance()->get_button_html( $plugin['slug'], $plugin['filename'] ); ?>
                                                </div>
                                            </div>
                                        <?php } ?>
                                    </div>
                                <?php } ?>
                            </div>
                        </div>
                        <!-- tab1 -->
                        <div id="tab-2" class="tab-pane">
                            <div class="left-details">
                                <div class="left-details-wrapper">
                                    <h3><?php esc_html_e( 'View Our Documentation Link', 'feminine-lifestyle-blog'); ?></h3>
                                    <div class="details-wrap">
                                        <p><?php esc_html_e( 'Are you tired of relying on others to build a website? Don\'t worry, we have a step by step documentation just for you! Kindly view our easy instruction manual to build your own WordPress Website from the very beginning.', 'feminine-lifestyle-blog' ); ?></p>
                                    </div>
                                    <div class="btn-wrap">
                                        <a href="<?php echo esc_url( 'https://docs.himalayanthemes.com/feminine-lifestyle-blog/' ); ?>" class="primary-btn"><?php esc_html_e( 'View Documentation', 'feminine-lifestyle-blog' ); ?></a>
                                    </div>
                                </div>
                                <div class="left-details-wrapper">
                                    <h3><?php esc_html_e( 'Support Ticket', 'feminine-lifestyle-blog' ); ?></h3>
                                    <div class="details-wrap">
                                        <p><?php esc_html_e( 'We are here for you to answer any queries within 1 business day (except for weekends). If you need any help in building your website, please do not hesitate to click on the button to generate a Support Ticket.', 'feminine-lifestyle-blog' ); ?></p>
                                    </div>
                                    <div class="btn-wrap">
                                        <a href="<?php echo esc_url( 'https://himalayanthemes.com/support-ticket/' ); ?>" class="primary-btn"><?php esc_html_e( 'Contact Support', 'feminine-lifestyle-blog' ); ?></a>
                                    </div>
                                </div>
                                <div class="left-details-wrapper">
                                    <h3><?php esc_html_e( 'View Our Feminine Lifestyle Blog Demo', 'feminine-lifestyle-blog' ); ?></h3>
                                    <div class="details-wrap">
                                        <p><?php esc_html_e( 'Visit the demo to get more idea about our theme design and its features.', 'feminine-lifestyle-blog' ); ?></p>
                                    </div>
                                    <div class="btn-wrap">
                                        <a href="<?php echo esc_url( 'https://himalayanthemes.com/themes-demo/?theme=feminine-lifestyle-blog' ); ?>" class="primary-btn"><?php esc_html_e( 'View Demo', 'feminine-lifestyle-blog' ); ?></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- Tabcontent -->
                </div>
            </section>
        </div>
    </div>
    <?php 
}


  