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

	/*=========================================
	Social Media
	=========================================*/
	$wp_customize->add_section(
        'expert_business_consultant_upper_header',
        array(
        	'priority'      => 3,
            'title' 		=> __('Header Information','expert-business-consultant'),
			'panel'  		=> 'expert_business_consultant_frontpage_sections',
		)
    );

    // Slider Hide/ Show Setting // 
	$wp_customize->add_setting( 
		'expert_business_consultant_display_topbar' , 
			array(
			'default' => true,
			'sanitize_callback' => 'expert_business_consultant_sanitize_checkbox',
			'capability' => 'edit_theme_options',
			'priority' => 2,
		) 
	);
	
	$wp_customize->add_control(
	'expert_business_consultant_display_topbar', 
		array(
			'label'	      => esc_html__( 'Show / Hide Top Header', 'expert-business-consultant' ),
			'section'     => 'expert_business_consultant_upper_header',
			'settings'    => 'expert_business_consultant_display_topbar',
			'type'        => 'checkbox'
		) 
	);

	$wp_customize->add_setting(
		'expert_business_consultant_call',
		array(
			'default'=> '1(868) 225-6155',
			'sanitize_callback'	=> 'expert_business_consultant_sanitize_phone_number'
		)
	);

	$wp_customize->add_control(
		'expert_business_consultant_call',array(
			'label'	=> __('Add Phone Number','expert-business-consultant'),
			'section'=> 'expert_business_consultant_upper_header',
			'type'=> 'text'
		)
	);

	$wp_customize->add_setting(
		'expert_business_consultant_mail',array(
			'default'=> 'admin@example.com',
			'sanitize_callback'	=> 'sanitize_email'
		)
	);

	$wp_customize->add_control(
		'expert_business_consultant_mail',array(
			'label'	=> __('Add Mail Address','expert-business-consultant'),
			'section'=> 'expert_business_consultant_upper_header',
			'type'=> 'text'
		)
	);

	$wp_customize->add_setting(
    	'expert_business_consultant_register_btn_text',
    	array(
			'default' => 'REGISTER',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'expert_business_consultant_register_btn_text',
		array(
		    'label'   		=> __('Add Register Button Text','expert-business-consultant'),
		    'section'		=> 'expert_business_consultant_upper_header',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'expert_business_consultant_register_btn_link',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);
	$wp_customize->add_control( 
		'expert_business_consultant_register_btn_link',
		array(
		    'label'   		=> __('Add Register Button Link','expert-business-consultant'),
		    'section'		=> 'expert_business_consultant_upper_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)
	);

	$wp_customize->add_setting(
    	'expert_business_consultant_login_btn_text',
    	array(
			'default' => 'LOGIN',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'expert_business_consultant_login_btn_text',
		array(
		    'label'   		=> __('Add Login Button Text','expert-business-consultant'),
		    'section'		=> 'expert_business_consultant_upper_header',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'expert_business_consultant_login_btn_link',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);
	$wp_customize->add_control( 
		'expert_business_consultant_login_btn_link',
		array(
		    'label'   		=> __('Add Login Button Link','expert-business-consultant'),
		    'section'		=> 'expert_business_consultant_upper_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)
	);

	$wp_customize->add_setting(
    	'expert_business_consultant_header_btn_text',
    	array(
			'default' => 'START CONSULTING',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'expert_business_consultant_header_btn_text',
		array(
		    'label'   		=> __('Button Text','expert-business-consultant'),
		    'section'		=> 'expert_business_consultant_upper_header',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'expert_business_consultant_header_btn_link',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);
	$wp_customize->add_control( 
		'expert_business_consultant_header_btn_link',
		array(
		    'label'   		=> __('Button Link','expert-business-consultant'),
		    'section'		=> 'expert_business_consultant_upper_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)
	);

	$wp_customize->add_setting( 'expert_business_consultant_upgrade_page_settings_12',
	        array(
	            'sanitize_callback' => 'sanitize_text_field'
	        )
	    );
    $wp_customize->add_control( new Expert_Business_Consultant_Control_Upgrade(
        $wp_customize, 'expert_business_consultant_upgrade_page_settings_12',
            array(
                'priority'      => 200,
                'section'       => 'expert_business_consultant_upper_header',
                'settings'      => 'expert_business_consultant_upgrade_page_settings_12',
                'label'         => __( 'Business Consultant Pro comes with additional features.', 'expert-business-consultant' ),
                'choices'       => array( __( '15+ Ready-Made Sections', 'expert-business-consultant' ), __( 'One-Click Demo Import', 'expert-business-consultant' ), __( 'WooCommerce Integrated', 'expert-business-consultant' ), __( 'Drag & Drop Section Reordering', 'expert-business-consultant' ),__( 'Advanced Typography Control', 'expert-business-consultant' ),__( 'Intuitive Customization Options', 'expert-business-consultant' ),__( '24/7 Support', 'expert-business-consultant' ), )
            )
        )
    );
}
add_action( 'customize_register', 'expert_business_consultant_upper_header_settings' );