<?php
defined('ABSPATH') or die('No script kiddies please!');
$wpwab_settings = get_option('wpwab_settings');
?>

<div class="wrap wpwab-warp">
    <div class="wpwab-head-main">
        <img src="<?php echo wpwab_IMG_DIR . '/logo.png' ?>"/>
        <span>Version <?php echo wpwab_PLUGIN_VERSION; ?></span>
    </div>
    <div class='wpwab-message-display-area'>
        <?php if(isset($_GET['message']) && $_GET['message'] == '1'){ ?>
        <div class="notice notice-success is-dismissible">
            <p><strong><?php _e('Settings saved successfully.', wpwab_TD ); ?></strong></p>
            <button type="button" class="notice-dismiss">
                <span class="screen-reader-text"><?php _e('Dismiss this notice.', wpwab_TD ); ?></span>
            </button>
        </div>
        <?php }else if(isset($_GET['message']) && $_GET['message'] == '3'){?>
        <div class="notice notice-success is-dismissible">
            <p><strong><?php _e('Settings restored successfully.', wpwab_TD ); ?></strong></p>
            <button type="button" class="notice-dismiss">
                <span class="screen-reader-text"><?php _e('Dismiss this notice.', wpwab_TD ); ?></span>
            </button>
        </div>
        <?php }else if(isset($_GET['message']) && $_GET['message'] != '3' && $_GET['message'] != '1'){ ?>
        <div class="notice notice-error is-dismissible">
            <p><?php _e('There has been an error.', wpwab_TD ); ?></p>
        </div>
        <?php } ?>
    </div>
    <div class="wpwab-menu-wrapper">
        <ul class="wpwab-menu-tab">
            <li data-menu="wpwab-general-settings" class="wpwab-tab-tigger wpwab-active">
                <span class="dashicons dashicons-admin-users"></span>
                <?php _e('User Detail', wpwab_TD); ?>
            </li>
            <li data-menu="wpwab-floating-button" class="wpwab-tab-tigger">
                <span class="dashicons dashicons-welcome-write-blog"></span>
                <?php _e('Floating Button', wpwab_TD); ?>
            </li>
            <li data-menu="wpwab-add-to-menu" class="wpwab-tab-tigger">
                <span class="dashicons dashicons-menu"></span>
                <?php _e('Menu Settings', wpwab_TD); ?>
            </li>
            <li data-menu="wpwab-multiple" class="wpwab-tab-tigger">
                <span class="dashicons dashicons-admin-page"></span>
                <?php _e('Multiple Contact Settings', wpwab_TD); ?>
            </li>
            <li data-menu="wpwab-shortcode-generate" class="wpwab-tab-tigger">
                <span class="dashicons dashicons-layout"></span>
                <?php _e('Shortcode Generator', wpwab_TD); ?>
            </li>
            <li data-menu="wpwab-how-to-use" class="wpwab-tab-tigger">
                <span class="dashicons dashicons-admin-generic"></span>
                <?php _e('How To Use', wpwab_TD); ?>
            </li>
            <li data-menu="wpwab-about" class="wpwab-tab-tigger">
                <span class="dashicons dashicons-groups"></span>
                <?php _e('More WordPress Stuff', wpwab_TD); ?>
            </li>
        </ul>
    </div>
    <form method="post" id="wpbfmb-save-form" action="<?php echo admin_url('admin-post.php'); ?>"  >

        <input type="hidden" name="action" value="wpwab_settings_save"/>
        <div class ="wpwab-settings-wrap wpwab-active-container" data-menu-ref="wpwab-general-settings">
            <?php include(wpwab_PLUGIN_PATH . 'inc/backend/wpwab-general-setting.php'); ?>
        </div>
        <div class ="wpwab-settings-wrap" data-menu-ref="wpwab-floating-button">
            <?php include(wpwab_PLUGIN_PATH . 'inc/backend/wpwab-floating-button.php'); ?>
        </div>
        <div class ="wpwab-settings-wrap" data-menu-ref="wpwab-add-to-menu">
            <?php include(wpwab_PLUGIN_PATH . 'inc/backend/wpwab-add-to-menu.php'); ?>
        </div>
        <div class ="wpwab-settings-wrap " data-menu-ref="wpwab-multiple">
            <?php include(wpwab_PLUGIN_PATH . 'inc/backend/wpwab-multiple.php'); ?>
        </div>
        <div class="wpwab-settings-wrap" data-menu-ref="wpwab-shortcode-generate">
            <?php include(wpwab_PLUGIN_PATH . 'inc/backend/wpwab-shortcode-generate.php'); ?>
        </div>
        <div class="wpwab-settings-wrap" data-menu-ref="wpwab-how-to-use">
            <?php include(wpwab_PLUGIN_PATH . 'inc/backend/wpwab-how-to-use.php'); ?>
        </div>
        <div class ="wpwab-settings-wrap " data-menu-ref="wpwab-about">
            <?php include(wpwab_PLUGIN_PATH . 'inc/backend/wpwab-about.php'); ?>
        </div>
        
    </form>
</div>