<?php
   if ( ! defined( 'ABSPATH' )){
        exit; // Exit if accessed directly
    }

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // ReduxFramework  Config File
    // For full documentation, please visit: https://docs.reduxframework.com
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    if ( ! class_exists( 'Redux' ) ) {
        return;
    }

    
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // This is your option name where all the Redux data is stored.
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    $opt_name = "invax_option";


    /**
     * SET ARGUMENTS
     * All the possible arguments for Redux.
     * For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments
     * */

    $theme = wp_get_theme(); // For use with some settings. Not necessary.

    $args = array(
        // TYPICAL -> Change these values as you need/desire
        'opt_name'             => $opt_name,
        // This is where your data is stored in the database and also becomes your global variable name.
        'display_name'         => $theme->get( 'invax' ),
        // Name that appears at the top of your panel
        'display_version'      => $theme->get( 'Version' ),
        // Version that appears at the top of your panel
        'menu_type'            => 'menu',
        //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)
        'allow_sub_menu'       => false,
        // Show the sections below the admin menu item or not
        'menu_title'           =>  sprintf( esc_html__( 'Invax Option', 'invax' ), $theme->get( 'Name' ) ),
        'page_title'           => sprintf( esc_html__( 'Invax Option', 'invax' ), $theme->get( 'Name' ) ),
        // You will need to generate a Google API key to use this feature.
        // Please visit: https://developers.google.com/fonts/docs/developer_api#Auth
        'google_api_key'       => '',
        // Set it you want google fonts to update weekly. A google_api_key value is required.
        'google_update_weekly' => FALSE,
        // Must be defined to add google fonts to the typography module
        'async_typography'     => TRUE,
        // Use a asynchronous font on the front end or font string
        //'disable_google_fonts_link' => true,                    // Disable this in case you want to create your own google fonts loader
        'admin_bar'            => true,
        // Show the panel pages on the admin bar
        'admin_bar_icon'       => 'dashicons-admin-generic',
        // Choose an icon for the admin bar menu
        'admin_bar_priority'   => 50,
        // Choose an priority for the admin bar menu
        'global_variable'      => '',
        // Set a different name for your global variable other than the opt_name
        'dev_mode'             => FALSE,
        // Show the time the page took to load, etc
        'update_notice'        => false,
        // If dev_mode is enabled, will notify developer of updated versions available in the GitHub Repo
        'customizer'           => TRUE,
        // Enable basic customizer support
        //'open_expanded'     => true,                    // Allow you to start the panel in an expanded way initially.
        //'disable_save_warn' => true,                    // Disable the save warning when a user changes a field

        // OPTIONAL -> Give you extra features
        'page_priority'        => '90',
        // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.
        'page_parent'          => 'themes.php',
        // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters
        'page_permissions'     => 'manage_options',
        // Permissions needed to access the options panel.
        'menu_icon'            => '',
        // Specify a custom URL to an icon
        'last_tab'             => '',
        // Force your panel to always open to a specific tab (by id)
        'page_icon'            => 'icon-themes',
        // Icon displayed in the admin panel next to your menu_title
        'page_slug'            => '',
        // Page slug used to denote the panel, will be based off page title then menu title then opt_name if not provided
        'save_defaults'        => TRUE,
        // On load save the defaults to DB before user clicks save or not
        'default_show'         => FALSE,
        // If true, shows the default value next to each field that is not the default value.
        'default_mark'         => '',
        // What to print by the field's title if the value shown is default. Suggested: *
        'show_import_export'   => TRUE,
        // Shows the Import/Export panel when not used as a field.
        'show_options_object' => false,
        // CAREFUL -> These options are for advanced use only
        'transient_time'       => 60 * MINUTE_IN_SECONDS,
        'output'               => TRUE,
        // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output
        'output_tag'           => TRUE,
        // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head
        'footer_credit'        => sprintf( '%s Theme Options', 'invax' ), $theme->get( 'Name'  ),
        // Disable the footer credit of Redux. Please leave if you can help it.

        // FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.
        'database'             => '',
        // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!
        'use_cdn'              => TRUE,
        // If you prefer not to use the CDN for Select2, Ace Editor, and others, you may download the Redux Vendor Support plugin yourself and run locally or embed it in your code.

        // HINTS
        'hints'                => array(
            'icon'          => 'el el-question-sign',
            'icon_position' => 'right',
            'icon_color'    => 'lightgray',
            'icon_size'     => 'normal',
            'tip_style'     => array(
                'color'   => 'red',
                'shadow'  => TRUE,
                'rounded' => FALSE,
                'style'   => '',
            ),
            'tip_position'  => array(
                'my' => 'top left',
                'at' => 'bottom right',
            ),
            'tip_effect'    => array(
                'show' => array(
                    'effect'   => 'slide',
                    'duration' => '500',
                    'event'    => 'mouseover',
                ),
                'hide' => array(
                    'effect'   => 'slide',
                    'duration' => '500',
                    'event'    => 'click mouseleave',
                ),
            ),
        )
    );

    Redux::setArgs( $opt_name, $args );

     Redux::setSection( $opt_name, array(
        'icon'   => 'el el-align-justify',
        'title'  => esc_html__('Top Bar', 'invax'),
        'fields' => array(
          array(
                'id'       => 'topenable',
                'type'     => 'switch', 
                'title'    => __('Display Top Bar ?', 'invax'),
                'default'  => true,
                'on'  => 'Yes',
                'off'  => 'No',
            ),
            array(
                'id'       => 'tlefttxt',
                'type'     => 'textarea',
                'title'    => esc_html__('Topbar  Left Text', 'invax'),
                'default'  =>  '2594  Lynn Ogden Lane',
                'required' => array('topenable', '=', '1'),
            ), 
               array(
                'id'       => 'facebook-link',
                'type'     => 'text',
                'title'    => esc_html__('Facebook Link', 'invax'),
                'subtitle' => esc_html__('Enter facebook page or profile link. Leave blank to hide icon.', 'invax'),
                'default'  => "#",
                'required' => array('topenable', '=', '1'),
            ),
            array(
                'id'       => 'twitter-link',
                'type'     => 'text',
                'title'    => esc_html__('Twitter Link', 'invax'),
                'subtitle' => esc_html__('Enter twitter page or profile link. Leave blank to hide icon.', 'invax'),
                  'required' => array('topenable', '=', '1'),
                'default'  => "#"
            ), 
            array(
                'id'       => 'instagram-link',
                'type'     => 'text',
                'title'    => esc_html__('Instagram Link', 'invax'),
                'subtitle' => esc_html__('Enter instagram page or profile link. Leave blank to hide icon.', 'invax'),
                  'required' => array('topenable', '=', '1'),
                'default'  => "#"
            ),
            array(
                'id'       => 'linekedin-link',
                'type'     => 'text',
                'title'    => esc_html__('Linked In Link', 'invax'),
                'subtitle' => esc_html__('Enter linekedin page or profile link. Leave blank to hide icon.', 'invax'),
                'required' => array('topenable', '=', '1'),
                'default'  => "#"
            ),
            array(
                'id'       => 'topbar-bg',
                'type'     => 'color',
                'title'    => __( 'Topbar Background color', 'invax' ),
                'subtitle' => __( 'Pick Color Topbar Background', 'invax' ),
                'default'  => '#0052a5',
            )
        )
    )); //end  



    Redux::setSection( $opt_name, array(
        'icon'   => 'el el-align-justify',
        'title'  => esc_html__('Menu Style', 'invax'),
        'fields' => array(
          array(
                'id'       => 'menu-color',
                'type'     => 'color',
                'title'    => __( 'Menu color', 'invax' ),
                'subtitle' => __( 'Pick Color For  Menu (default: #333333).', 'invax' ),
                'default'  => '#333333',
                'output'   => array(  '.mainmenu ul li a' )
            ),          
          array(
                'id'       => 'menu-bg-color',
                'type'     => 'color',
                'title'    => __( 'Menu Background color', 'invax' ),
                'subtitle' => __( 'Pick Color For Menu Background (default: #fff).', 'invax' ),
                'default'  => '#fff',
            )           

        )
    )); //end    



  //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // Presets settings
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Redux::setSection( $opt_name, array(
        'icon'   => 'el-icon-brush',
        'title'  => esc_html__('Preset color', 'invax'),
        'fields' => array(
    		 array(
                'id'       => 'primary_color',
                'type'     => 'color',
                'title'    => __( 'Theme Primary Color', 'invax' ),
                'subtitle' => __( 'Pick Color To Change Theme Primary Color(default: #0052a5).', 'invax' ),
                'default'  => '#0052a5',
            ),
	       	array(
                'id'       => 'title-color',
                'type'     => 'color',
                'title'    => __( 'Title color', 'invax' ),
                'subtitle' => __( 'Pick Color For  Title (default: #212121).', 'invax' ),
                'default'  => '#212121',
                'output'   => array(  'h1, h2, h3, h4, h5, h6' )
            )
       
        )
    )); //end 


    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // Blog settings
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

        Redux::setSection( $opt_name, array(
        'icon'   => 'el-icon-file-edit',
        'title'  => esc_html__('Blog Settings', 'invax'),
        'fields' => array(
           array(
                'id'       => 'blog-sidebar',
                'type'     => 'image_select',
                'title'    => esc_html__('Blog Layout setting', 'invax'),
                'subtitle' => esc_html__('Select blog layout', 'invax'),
                'options'  => array(
                    'left-sidebar'  => array(
                        'alt' => 'Left sidebar',
                        'img' => ReduxFramework::$_url . 'assets/img/2cl.png'
                    ),
                    'right-sidebar' => array(
                        'alt' => 'Right sidebar',
                        'img' => ReduxFramework::$_url . 'assets/img/2cr.png'
                    ),
                    'no-sidebar' => array(
                        'alt' => 'No sidebar',
                        'img' => ReduxFramework::$_url . 'assets/img/1col.png'
                    ),
                ),
                'default'  => 'right-sidebar'
            ),
            array(
                'id'       => 'blog-title',
                'type'     => 'text',
                'title'    => esc_html__('Blog Page Breadcrumb Title', 'invax'),
                'default'  => 'Latest News'
            ),
            array(
                'id'       => 'blog-sub-title',
                'type'     => 'text',
                'title'    => esc_html__('Blog Page Breadcrumb Sub Title', 'invax'),
                'default'  => 'Blog'
            ),

        )
    )); //end blog sidebar

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // Blog details settings
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    Redux::setSection( $opt_name, array(
        'icon'   => 'el-icon-file-edit',
        'title'  => esc_html__('Post Settings', 'invax'),
        'fields' => array(
              array(
                'id'       => 'post-sidebar',
                'type'     => 'image_select',
                'title'    => esc_html__('Post Layout setting', 'invax'),
                'subtitle' => esc_html__('Select post layout', 'invax'),
                'options'  => array(
                    'left-sidebar'  => array(
                        'alt' => 'Left sidebar',
                        'img' => ReduxFramework::$_url . 'assets/img/2cl.png'
                    ),
                    'right-sidebar' => array(
                        'alt' => 'Right sidebar',
                        'img' => ReduxFramework::$_url . 'assets/img/2cr.png'
                    ),
                    'no-sidebar' => array(
                        'alt' => 'No sidebar',
                        'img' => ReduxFramework::$_url . 'assets/img/1col.png'
                    ),
                ),
                'default'  => 'right-sidebar'
            ),
            array(
                'id'       => 'post-title',
                'type'     => 'text',
                'title'    => esc_html__('Post Breadcrumb Title', 'invax'),
                'desc'     => esc_html__( 'Keap Blank To Display Post Title', 'invax' ),
                'default'  => 'Blog Details'
            )

        )
    )); //end blog details sidebar


    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // Search settings
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    Redux::setSection( $opt_name, array(
        'icon'   => 'el el-search',
        'title'  => esc_html__('Search Page Settings', 'invax'),
        'fields' => array(
              array(
                'id'       => 'search-sidebar',
                'type'     => 'image_select',
                'title'    => esc_html__('Search Layout setting', 'invax'),
                'subtitle' => esc_html__('Select Search layout', 'invax'),
                'options'  => array(
                    'left-sidebar'  => array(
                        'alt' => 'Left sidebar',
                        'img' => ReduxFramework::$_url . 'assets/img/2cl.png'
                    ),
                    'right-sidebar' => array(
                        'alt' => 'Right sidebar',
                        'img' => ReduxFramework::$_url . 'assets/img/2cr.png'
                    ),
                    'no-sidebar' => array(
                        'alt' => 'No sidebar',
                        'img' => ReduxFramework::$_url . 'assets/img/1col.png'
                    ),
                ),
                'default'  => 'right-sidebar'
            ) 

        )
    )); //end blog details sidebar

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // 404 details settings
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    Redux::setSection( $opt_name, array(
        'icon'   => 'el el-error-alt',
        'title'  => esc_html__('404 Page Settings', 'invax'),
        'fields' => array(
            array(
                'id'       => '404-title',
                'type'     => 'text',
                'title'    => esc_html__('404 Breadcrumb Title', 'invax'),
                'default'  => 'Error Page'
            ),
            array(
                    'id'       => '404-page-title',
                    'type'     => 'text',
                    'title'    => esc_html__('404 Page Title', 'invax'),
                    'default'  => 'PAGE NOT FOUND'
                ),  
            array(
                    'id'       => '404-page-sub-title',
                    'type'     => 'text',
                    'title'    => esc_html__('404 Page Sub Title', 'invax'),
                    'default'  => 'UNFORTUNATELY THE PAGE YOU WERE LOOKING FOR DOES NOT EXIST. MAYBE SEARCH CAN HELP.'
                ),

        )
    )); //end 404 details sideba    



    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    //footer widget area
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

        Redux::setSection( $opt_name, array(
        'icon'   => 'el-icon-photo',
        'title'  => esc_html__('Footer Settings', 'invax'),
        'fields' => array(
            array(
                'id'       => 'fbg',
                'type'     => 'color',
                'title'    => __( 'Footer Background Color', 'invax' ),
                'subtitle' => __( 'Pick Color For Footer Background (default: #222222).', 'invax' ),
                'default'  => '#222222',
            ),
            array(
                'id'       => 'fbwidgettitle',
                'type'     => 'color',
                'title'    => __( 'Footer Widget Title Color', 'invax' ),
                'subtitle' => __( 'Pick Color For Footer Widget Title (default: #fff).', 'invax' ),
                'default'  => '#fff',
                'output'   => array(  '.site-footer h3.footer-widget-title' )
            ),
             array(
                'id'       => 'fbtxtcolor',
                'type'     => 'color',
                'title'    => __( 'Footer Text Color', 'invax' ),
                'subtitle' => __( 'Pick Color For Footer Background (default: #fff).', 'invax' ),
                'default'  => '#fff',
                'output'   => array(  '.footer-top-widgets .widget.widget_recent_entries li a,.footer-top-widgets,.footer-top-widgets a' )
            )

        )
    ));

     //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    //copyright
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

        Redux::setSection( $opt_name, array(
        'icon'   => 'el-icon-photo',
        'title'  => esc_html__('Copyright Settings', 'invax'),
        'fields' => array(
            array(
                'id'       => 'copyright',
                'type'     => 'textarea',
                'title'    => esc_html__('Enter Copyright Text ( available in pro version )', 'invax'),
                'default'  =>  'Copyright  2020 by <a style="color:#fff;font-weight:bold" href="https://solverwp.com/">solverwp</a>'
            ),
            array(
                'id'       => 'cpclr',
                'type'     => 'color',
                'title'    => __( 'Copy Right Text Color', 'invax' ),
                'subtitle' => __( 'Pick Color For Copyright (default: #fff).', 'invax' ),
                'default'  => '#fff',
                'output'   => array(  '.cptxt' )
            ),
             array(
                'id'       => 'cpbg',
                'type'     => 'color',
                'title'    => __( 'Copy Right Background Color', 'invax' ),
                'subtitle' => __( 'Pick Color For Copyright (default: #1b1b1b).', 'invax' ),
                'default'  => '#1b1b1b',
            ),              

        )
    )); //end footer 


    // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // Hire Us
    // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    
    //   Redux::setSection( $opt_name, array(
    //     'icon'   => 'el-icon-inbox',
    //     'title'  => esc_html__('Need Support', 'invax'),
    //     'fields' => array(
    //         array( 
    //             'id'       => 'opt-raw',
    //             'type'     => 'raw',
    //             'title'    => __('Need More features or do you need custom service for wordpress ?', 'invax'),
    //             'subtitle' => __('Contact me in skype. My Skype id is "live:.cid.cce01d0668cdda63"', 'invax'),
    //             'content'  => '<ul style="background:#000;color:#bdb7b7;padding:20px"> 
    //              <li style="padding-bottom:5px"> >> Do You Want To Make Full <b> Professional </b> Website ? </li>
    //              <li style="padding-bottom:5px"> >> Do You Want To <b> Customize </b> Your Current Website ? </li>
    //              <li style="padding-bottom:5px"> >> Do You Want To <b> Speed Up </b> Your Website ? </li>
    //              <li style="padding-bottom:5px"> >> Do You Want To <b> Custom Theme And Plugin </b> Development From Psd/Html ? </li>
    //              <li style="padding-bottom:5px"> >>  For Any WordPress Service Please <b> <a target="_blank" href="https://www.fiverr.com/quazisazzad1"  style="color:#00f958;text-decoration:none"> Contact Us</a></b></li>
    //             </ul>'
    //         ),

    //     )
    // )); //end support
