<?php
function expert_fitness_trainer_upper_header_settings( $wp_customize ) {
$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';

	/*=========================================
	top header
	=========================================*/
	$wp_customize->add_section(
        'expert_fitness_trainer_topbar',
        array(
        	'priority'      => 3,
            'title' 		=> __('Header Information','expert-fitness-trainer'),
			'panel'  		=> 'expert_fitness_trainer_frontpage_sections',
		)
    );

    // Site Title Hide/ Show Setting // 
	$wp_customize->add_setting( 
		'expert_fitness_trainer_topbar' , 
			array(
			'default' => true,
			'sanitize_callback' => 'expert_fitness_trainer_sanitize_checkbox',
			'capability' => 'edit_theme_options',
		) 
	);
	
	$wp_customize->add_control(
	'expert_fitness_trainer_topbar', 
		array(
			'label'	      => esc_html__( 'Hide / Show Topbar', 'expert-fitness-trainer' ),
			'section'     => 'expert_fitness_trainer_topbar',
			'settings'    => 'expert_fitness_trainer_topbar',
			'type'        => 'checkbox'
		) 
	);

	$wp_customize->add_setting('expert_fitness_trainer_top_text',array(
		'default'=> 'Witness the BIGGEST SHOWDOWN in the history! Matt vs Robbie, tickets available for sale',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('expert_fitness_trainer_top_text',array(
		'label'	=> __('Add Topbar Text','expert-fitness-trainer'),
		'section'=> 'expert_fitness_trainer_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting('expert_fitness_trainer_discount_text',array(
		'default'=> 'GET 20% OFF ON SELECTED ITEMS SHOP NOW',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('expert_fitness_trainer_discount_text',array(
		'label'	=> __('Add Discount Text','expert-fitness-trainer'),
		'section'=> 'expert_fitness_trainer_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting('expert_fitness_trainer_mail',array(
		'default'=> 'contact@example.com',
		'sanitize_callback'	=> 'sanitize_email'
	));
	$wp_customize->add_control('expert_fitness_trainer_mail',array(
		'label'	=> __('Add Mail Address','expert-fitness-trainer'),
		'section'=> 'expert_fitness_trainer_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting('expert_fitness_trainer_header_button',array(
		'default'=> 'JOIN MEMBERSHIP',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('expert_fitness_trainer_header_button',array(
		'label'	=> __('Header Button Text','expert-fitness-trainer'),
		'section'=> 'expert_fitness_trainer_topbar',
		'type'=> 'text'
	));

	$wp_customize->add_setting('expert_fitness_trainer_header_link',array(
		'default'=> '#',
		'sanitize_callback'	=> 'esc_url_raw'
	));
	$wp_customize->add_control('expert_fitness_trainer_header_link',array(
		'label'	=> __('Header Button Link','expert-fitness-trainer'),
		'section'=> 'expert_fitness_trainer_topbar',
		'type'=> 'url'
	));

	$wp_customize->add_setting( 'Expert_Fitness_Trainer_upgrade_page_settings_13',
	    array(
	        'sanitize_callback' => 'sanitize_text_field'
	    )
    );
    $wp_customize->add_control( new Expert_Fitness_Trainer_Control_Upgrade(
        $wp_customize, 'Expert_Fitness_Trainer_upgrade_page_settings_13',
            array(
                'priority'      => 200,
                'section'       => 'expert_fitness_trainer_topbar',
                'settings'      => 'Expert_Fitness_Trainer_upgrade_page_settings_13',
                'label'         => __( 'Expert Fitness Trainer Pro comes with additional features.', 'expert-fitness-trainer' ),
                'choices'       => array( __( '15+ Ready-Made Sections', 'expert-fitness-trainer' ), __( 'One-Click Demo Import', 'expert-fitness-trainer' ), __( 'WooCommerce Integrated', 'expert-fitness-trainer' ), __( 'Drag & Drop Section Reordering', 'expert-fitness-trainer' ),__( 'Advanced Typography Control', 'expert-fitness-trainer' ),__( 'Intuitive Customization Options', 'expert-fitness-trainer' ),__( '24/7 Support', 'expert-fitness-trainer' ), )
            )
        )
    );  

}
add_action( 'customize_register', 'expert_fitness_trainer_upper_header_settings' );