<?php
/**
 * Interactive Education Theme Customizer
 *
 * @package Interactive Education
 */

// Customize Controls.
require get_template_directory() . '/inc/custom-settings-control/customize-controls.php';

// Customize Controls.
require get_template_directory() . '/inc/custom-range-controls.php';

// Sanitization For Customize Controls.
require get_template_directory() . '/inc/custom-settings-control/sanitization.php';

/**
 * Provide postMessage support for the Theme Customizer's site title and description.
 */
function interactive_education_customize_register( $wp_customize ) {

	// General Settings Panel.
    $wp_customize->add_panel( 'interactive_education_general_settings_panel',
        array(
            'title'      => esc_html__( 'General Settings', 'interactive-education' ),
            'priority'   => 2,
            'capability' => 'edit_theme_options',
        )
    );

    // Header Settings Panel.
	$wp_customize->add_panel( 'interactive_education_header_settings_panel',
        array(
            'title'      => esc_html__( 'Header Settings', 'interactive-education' ),
            'priority'   => 2,
            'capability' => 'edit_theme_options',
        )
    );

    // Frontpage Sections Settings Panel.
    $wp_customize->add_panel( 'interactive_education_frontpage_sections_settings_panel',
        array(
            'title'      => esc_html__( 'Frontpage Sections Settings', 'interactive-education' ),
            'priority'   => 3,
            'capability' => 'edit_theme_options',
        )
    );

    // Footer Settings Panel.
    $wp_customize->add_panel( 'interactive_education_footer_settings_panel',
        array(
            'title'      => esc_html__( 'Footer Settings', 'interactive-education' ),
            'priority'   => 3,
            'capability' => 'edit_theme_options',
        )
    );

    // Site Identity

	$wp_customize->get_section( 'title_tagline' )->panel = 'interactive_education_header_settings_panel';

	$wp_customize->add_setting(
		'interactive_education_site_logo',
		array(
			'default'           => false,
			'sanitize_callback' => 'interactive_education_sanitize_on_off',
		)
	);

	$wp_customize->add_control(
		new interactive_education_On_Off_Custom_Control(
			$wp_customize,
			'interactive_education_site_logo',
			array(
				'label'    => esc_html__( 'ON / OFF Site Logo', 'interactive-education' ),
				'section'  => 'title_tagline',
				'settings' => 'interactive_education_site_logo',
			)
		)
	);

	$wp_customize->add_setting(
		'interactive_education_site_title_text',
		array(
			'default'           => true,
			'sanitize_callback' => 'interactive_education_sanitize_on_off',
		)
	);

	$wp_customize->add_control(
		new interactive_education_On_Off_Custom_Control(
			$wp_customize,
			'interactive_education_site_title_text',
			array(
				'label'    => esc_html__( 'ON / OFF Site Title', 'interactive-education' ),
				'section'  => 'title_tagline',
				'settings' => 'interactive_education_site_title_text',
			)
		)
	);


	$wp_customize->add_setting(
        'interactive_education_site_title_font_size',
        array(
            'default'    => 20,
            'sanitize_callback' => 'interactive_education_sanitize_number_range',
        )
    );

    $wp_customize->add_control(
        new interactive_education_Slider(
            $wp_customize,
            'interactive_education_site_title_font_size',
            array(
                'label'    => esc_html__( 'Site Title Font Size', 'interactive-education' ),
                'section'  => 'title_tagline',
                'label' => esc_html__('Site Title Font Size', 'interactive-education'),
                'input_attrs' => array(
					'reset'			   => 20,
		            'step'             => 1,
					'min'              => 0,
					'max'              => 50,
		        ),
            )
        )
    );




	$wp_customize->add_setting(
		'interactive_education_site_tagline_text',
		array(
			'default'           => false,
			'sanitize_callback' => 'interactive_education_sanitize_on_off',
		)
	);


	$wp_customize->add_control(
		new interactive_education_On_Off_Custom_Control(
			$wp_customize,
			'interactive_education_site_tagline_text',
			array(
				'label'    => esc_html__( 'ON / OFF Site Tagline', 'interactive-education' ),
				'section'  => 'title_tagline',
				'settings' => 'interactive_education_site_tagline_text',
			)
		)
	);


	


	$wp_customize->add_setting(
        'interactive_education_site_tagline_font_size',
        array(
            'default'    => 15,
            'sanitize_callback' => 'interactive_education_sanitize_number_range',
        )
    );

    $wp_customize->add_control(
        new interactive_education_Slider(
            $wp_customize,
            'interactive_education_site_tagline_font_size',
            array(
                'label'    => esc_html__( 'Site Tagline Font Size', 'interactive-education' ),
                'section'  => 'title_tagline',
                'label' => esc_html__('Site Tagline Font Size', 'interactive-education'),
                'input_attrs' => array(
					'reset'			   => 15,
		            'step'             => 1,
					'min'              => 0,
					'max'              => 50,
		        ),
            )
        )
    );


//Woo Coomerce
    $wp_customize->add_setting('interactive_education_per_columns',array(
        'default'=> 3,
        'sanitize_callback' => 'interactive_education_sanitize_number_absint'
    ));
    $wp_customize->add_control('interactive_education_per_columns',array(
        'label' => __('Product Per Row','interactive-education'),
        'section'=> 'woocommerce_product_catalog',
        'type'=> 'number',
        'input_attrs' => array(
            'min' => 1,
            'max' => 6,
            'step' => 1,
        ),
    ));
    $wp_customize->add_setting('interactive_education_product_per_page',array(
        'default'=> 10,
        'sanitize_callback' => 'interactive_education_sanitize_number_absint'
    ));
    $wp_customize->add_control('interactive_education_product_per_page',array(
        'label' => __('Product Per Page','interactive-education'),
        'section'=> 'woocommerce_product_catalog',
        'type'=> 'number',
        'input_attrs' => array(
            'min' => 1,
            'max' => 20,
            'step' => 1,
        ),
    ));

    $wp_customize->add_section(
        'woocommerce_product_extra_section',
        array(
            'panel'      => 'woocommerce',
            'title'    => esc_html__( 'Extra WooCommerce Settings', 'interactive-education' ),
        )
    );

    $wp_customize->add_setting( 'interactive_education_single_product_sidebar', array(
        'default'           => true,
        'transport'         => 'refresh',
        'sanitize_callback' => 'interactive_education_sanitize_checkbox',
    ) );
    $wp_customize->add_control( new interactive_education_On_Off_Custom_Control( $wp_customize, 'interactive_education_single_product_sidebar', array(
        'label'       => esc_html__( 'Show / Hide Product Page Sidebar', 'interactive-education' ),
        'section'     => 'woocommerce_product_extra_section',
        'type'        => 'toggle',
        'settings'    => 'interactive_education_single_product_sidebar',
    ) ) );

	// Header Options

	$wp_customize->add_section(
		'interactive_education_header_section',
		array(
			'panel'      => 'interactive_education_header_settings_panel',
			'title'    => esc_html__( 'Header Options', 'interactive-education' ),
		)
	);

	//MENU TYPOGRAPHY
	

	

	$wp_customize->add_setting('interactive_education_menu_font_weight',array(
        'default' => '',
        'sanitize_callback' => 'interactive_education_sanitize_choices'
	));
	$wp_customize->add_control('interactive_education_menu_font_weight',array(
     'type' => 'radio',
     'label'     => __('Menu Font Weight', 'interactive-education'),
     'section' => 'interactive_education_header_section',
     'type' => 'select',
     'choices' => array(
         '100' => __('100','interactive-education'),
         '200' => __('200','interactive-education'),
         '300' => __('300','interactive-education'),
         '400' => __('400','interactive-education'),
         '500' => __('500','interactive-education'),
         '600' => __('600','interactive-education'),
         '700' => __('700','interactive-education'),
         '800' => __('800','interactive-education'),
         '900' => __('900','interactive-education')
     ),
	) );
	
	$wp_customize->add_setting('interactive_education_menu_text_tranform',array(
		'default' => 'Capitalize',
		'sanitize_callback' => 'interactive_education_sanitize_choices'
 	));
 	$wp_customize->add_control('interactive_education_menu_text_tranform',array(
		'type' => 'select',
		'label' => __('Menu Text Transform','interactive-education'),
		'section' => 'interactive_education_header_section',
		'choices' => array(
		   'Uppercase' => __('Uppercase','interactive-education'),
		   'Lowercase' => __('Lowercase','interactive-education'),
		   'Capitalize' => __('Capitalize','interactive-education'),
		),
	) );
	$wp_customize->add_setting('interactive_education_menu_font_size', array(
	    'default'	=> 15,
        'sanitize_callback' => 'interactive_education_sanitize_number_range',
	));
	$wp_customize->add_control(new interactive_education_Slider($wp_customize, 'interactive_education_menu_font_size', array(
        'section' => 'interactive_education_header_section',
        'label' => esc_html__('Menu Font Size', 'interactive-education'),
        'input_attrs' => array(
					'reset'			   => 15,
		            'step'             => 1,
					'min'              => 0,
					'max'              => 35,
		        ),
	)));

	$wp_customize->add_setting(
		'interactive_education_sticky_header',
		array(
			'default'           => false,
			'sanitize_callback' => 'interactive_education_sanitize_on_off',
		)
	);

	$wp_customize->add_control(
		new interactive_education_On_Off_Custom_Control(
			$wp_customize,
			'interactive_education_sticky_header',
			array(
				'label'    => esc_html__( 'ON / OFF Sticky Header', 'interactive-education' ),
				'section'  => 'interactive_education_header_section',
				'settings' => 'interactive_education_sticky_header',
			)
		)
	);

    $wp_customize->add_setting(
		'interactive_education_topbar_section_on_off_setting',
		array(
			'default'           => true,
			'sanitize_callback' => 'interactive_education_sanitize_on_off',
		)
	);

	$wp_customize->add_control(
		new Interactive_Education_On_Off_Custom_Control(
			$wp_customize,
			'interactive_education_topbar_section_on_off_setting',
			array(
				'label'    => esc_html__( 'ON / OFF Topbar Section', 'interactive-education' ),
				'section'  => 'interactive_education_header_section',
				'settings' => 'interactive_education_topbar_section_on_off_setting',
			)
		)
	);

    $wp_customize->add_setting(
        'interactive_education_announcement',
        array(
            'default'           => 'Limited-Time Weekend! Exclusive Grab a 70% Discount',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

	$wp_customize->add_control(
        'interactive_education_announcement',
        array(
            'label'           => sprintf( esc_html__( 'Add Announcement Text', 'interactive-education' ), ),
            'section'         => 'interactive_education_header_section',
            'settings'        => 'interactive_education_announcement' ,
            'type'            => 'text',
        )
    );

	$wp_customize->add_setting(
        'interactive_education_phone_number',
        array(
            'default'           => '71 1234569876',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

	$wp_customize->add_control(
        'interactive_education_phone_number',
        array(
            'label'           => sprintf( esc_html__( 'Add Phone Number', 'interactive-education' ), ),
            'section'         => 'interactive_education_header_section',
            'settings'        => 'interactive_education_phone_number' ,
            'type'            => 'text',
        )
    );

    $wp_customize->add_setting(
        'interactive_education_address',
        array(
            'default'           => 'Email: educationxyz@example.com',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

	$wp_customize->add_control(
        'interactive_education_address',
        array(
            'label'           => sprintf( esc_html__( 'Add Address', 'interactive-education' ), ),
            'section'         => 'interactive_education_header_section',
            'settings'        => 'interactive_education_address' ,
            'type'            => 'text',
        )
    );

    $wp_customize->add_setting(
        'interactive_education_btn_url',
        array(
            'default'           => '#',
            'sanitize_callback' => 'esc_url_raw',
        )
    );

	$wp_customize->add_control(
        'interactive_education_btn_url',
        array(
            'label'           => sprintf( esc_html__( 'Add Button Link', 'interactive-education' ), ),
            'section'         => 'interactive_education_header_section',
            'settings'        => 'interactive_education_btn_url' ,
            'type'            => 'url',
        )
    );

	// Social Options

	$wp_customize->add_section(
		'interactive_education_social_section',
		array(
			'panel'      => 'interactive_education_header_settings_panel',
			'title'    => esc_html__( 'Social Options', 'interactive-education' ),
		)
	);

    $wp_customize->add_setting(
        'interactive_education_facebook_url',
        array(
            'default'           => '#',
            'sanitize_callback' => 'esc_url_raw',
        )
    );

	$wp_customize->add_control(
        'interactive_education_facebook_url',
        array(
            'label'           => sprintf( esc_html__( 'Add Facebook Link', 'interactive-education' ), ),
            'section'         => 'interactive_education_social_section',
            'settings'        => 'interactive_education_facebook_url' ,
            'type'            => 'url',
        )
    );

	$wp_customize->add_setting(
        'interactive_education_twitter_url',
        array(
            'default'           => '#',
            'sanitize_callback' => 'esc_url_raw',
        )
    );

	$wp_customize->add_control(
        'interactive_education_twitter_url',
        array(
            'label'           => sprintf( esc_html__( 'Add Twitter Link', 'interactive-education' ), ),
            'section'         => 'interactive_education_social_section',
            'settings'        => 'interactive_education_twitter_url' ,
            'type'            => 'url',
        )
    );

    $wp_customize->add_setting(
        'interactive_education_instagram_url',
        array(
            'default'           => '#',
            'sanitize_callback' => 'esc_url_raw',
        )
    );

	$wp_customize->add_control(
        'interactive_education_instagram_url',
        array(
            'label'           => sprintf( esc_html__( 'Add Instagram Link', 'interactive-education' ), ),
            'section'         => 'interactive_education_social_section',
            'settings'        => 'interactive_education_instagram_url' ,
            'type'            => 'url',
        )
    );

    $wp_customize->add_setting(
        'interactive_education_youtube_url',
        array(
            'default'           => '#',
            'sanitize_callback' => 'esc_url_raw',
        )
    );

	$wp_customize->add_control(
        'interactive_education_youtube_url',
        array(
            'label'           => sprintf( esc_html__( 'Add Youtube Link', 'interactive-education' ), ),
            'section'         => 'interactive_education_social_section',
            'settings'        => 'interactive_education_youtube_url' ,
            'type'            => 'url',
        )
    );

	$wp_customize->add_setting(
        'interactive_education_whatsapp_url',
        array(
            'default'           => '#',
            'sanitize_callback' => 'esc_url_raw',
        )
    );

	$wp_customize->add_control(
        'interactive_education_whatsapp_url',
        array(
            'label'           => sprintf( esc_html__( 'Add Whatsapp Link', 'interactive-education' ), ),
            'section'         => 'interactive_education_social_section',
            'settings'        => 'interactive_education_whatsapp_url' ,
            'type'            => 'url',
        )
    );
	
	// Banner Option

	$wp_customize->add_section(
		'interactive_education_banner_section',
		array(
			'panel'      => 'interactive_education_frontpage_sections_settings_panel',
			'title'    => esc_html__( 'Banner Option', 'interactive-education' ),
		)
	);

    $wp_customize->add_setting(
		'interactive_education_banner_section_on_off_setting',
		array(
			'default'           => false,
			'sanitize_callback' => 'interactive_education_sanitize_on_off',
		)
	);

	$wp_customize->add_control(
		new Interactive_Education_On_Off_Custom_Control(
			$wp_customize,
			'interactive_education_banner_section_on_off_setting',
			array(
				'label'    => esc_html__( 'ON / OFF Banner Section', 'interactive-education' ),
				'section'  => 'interactive_education_banner_section',
				'settings' => 'interactive_education_banner_section_on_off_setting',
			)
		)
	);

	$wp_customize->add_setting(
	    'interactive_education_slider',
	    array(
	        'default'           => '',
	        'sanitize_callback' => 'interactive_education_sanitize_number',
	    )
	);

	$wp_customize->add_control(
	    'interactive_education_slider',
	    array(
	        'label'       => esc_html__( 'No of banner', 'interactive-education' ),
	        'section'     => 'interactive_education_banner_section',
	        'settings'    => 'interactive_education_slider',
	        'type'        => 'number',
	        'input_attrs' => array(
	            'min' => 1,
	            'max' => 3,
	        ),
	    )
	);

	$interactive_education_banner = get_theme_mod( 'interactive_education_slider');
	for ( $i = 1; $i <= $interactive_education_banner; $i++ ){
		$wp_customize->add_setting(
			'interactive_education_banner_heading'.$i,
			array(
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'interactive_education_banner_heading'.$i,
			array(
				'label'           => sprintf( esc_html__( 'Banner Heading 0', 'interactive-education' ).$i, ),
				'section'         => 'interactive_education_banner_section',
				'settings'        => 'interactive_education_banner_heading'.$i,
				'type'            => 'text',
			)
		);

		$wp_customize->add_setting(
			'interactive_education_banner_extra_heading'.$i,
			array(
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'interactive_education_banner_extra_heading'.$i,
			array(
				'label'           => sprintf( esc_html__( 'Banner Extra Heading 0', 'interactive-education' ).$i, ),
				'section'         => 'interactive_education_banner_section',
				'settings'        => 'interactive_education_banner_extra_heading'.$i,
				'type'            => 'text',
			)
		);

		$wp_customize->add_setting(
			'interactive_education_banner_content'.$i,
			array(
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'interactive_education_banner_content'.$i,
			array(
				'label'           => sprintf( esc_html__( 'Banner Content 0', 'interactive-education' ).$i, ),
				'section'         => 'interactive_education_banner_section',
				'settings'        => 'interactive_education_banner_content'.$i,
				'type'            => 'text',
			)
		);

        $wp_customize->add_setting(
            'interactive_education_banner_btn'.$i,
            array(
                'default'           => '',
                'sanitize_callback' => 'sanitize_text_field',
            )
        );

        $wp_customize->add_control(
            'interactive_education_banner_btn'.$i,
            array(
                'label'           => sprintf( esc_html__( 'Banner Button 0', 'interactive-education' ).$i, ),
                'section'         => 'interactive_education_banner_section',
                'settings'        => 'interactive_education_banner_btn'.$i,
                'type'            => 'text',
            )
        );

		$wp_customize->add_setting(
			'interactive_education_banner_button_link'.$i,
			array(
				'default'           => '',
				'sanitize_callback' => 'esc_url_raw',
			)
		);

		$wp_customize->add_control(
			'interactive_education_banner_button_link'.$i,
			array(
				'label'           => sprintf( esc_html__( 'Banner Button Link 0', 'interactive-education' ).$i, ),
				'section'         => 'interactive_education_banner_section',
				'settings'        => 'interactive_education_banner_button_link'.$i,
				'type'            => 'url',
			)
		);
		
		$wp_customize->add_setting(
			'interactive_education_banner_image'.$i,
			array(
	        	'default'           => '',
	        	'sanitize_callback' => 'interactive_education_sanitize_image',

	    	)
	    );
	    
	    $wp_customize->add_control(
	     	new WP_Customize_Image_Control(
	    		$wp_customize, 'interactive_education_banner_image'.$i, 
	    		array(
	    			'label'           => sprintf( esc_html__( 'Banner Image 0', 'interactive-education' ).$i, ),
			        'settings'  => 'interactive_education_banner_image'.$i,
			        'section'   => 'interactive_education_banner_section'
	    		) 
	    	)
	    );
	}

    // Second Section Option

	$wp_customize->add_section(
		'interactive_education_spotlight_section',
		array(
			'panel'      => 'interactive_education_frontpage_sections_settings_panel',
			'title'    => esc_html__( 'Second Section Options', 'interactive-education' ),
		)
	);

    $wp_customize->add_setting(
		'interactive_education_spotlight_section_on_off_setting',
		array(
			'default'           => false,
			'sanitize_callback' => 'interactive_education_sanitize_on_off',
		)
	);

	$wp_customize->add_control(
		new Interactive_Education_On_Off_Custom_Control(
			$wp_customize,
			'interactive_education_spotlight_section_on_off_setting',
			array(
				'label'    => esc_html__( 'ON / OFF Spotlight Section', 'interactive-education' ),
				'section'  => 'interactive_education_spotlight_section',
				'settings' => 'interactive_education_spotlight_section_on_off_setting',
			)
		)
	);

	$wp_customize->add_setting(
        'interactive_education_section_heading',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

	$wp_customize->add_control(
        'interactive_education_section_heading',
        array(
            'label'           => sprintf( esc_html__( 'Section Heading', 'interactive-education' ), ),
            'section'         => 'interactive_education_spotlight_section',
            'settings'        => 'interactive_education_section_heading' ,
            'type'            => 'text',
        )
    );

    $wp_customize->add_setting(
        'interactive_education_teacher_name',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

	$wp_customize->add_control(
        'interactive_education_teacher_name',
        array(
            'label'           => sprintf( esc_html__( 'Teacher Name', 'interactive-education' ), ),
            'section'         => 'interactive_education_spotlight_section',
            'settings'        => 'interactive_education_teacher_name' ,
            'type'            => 'text',
        )
    );

    $wp_customize->add_setting(
        'interactive_education_spotlight_heading',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

	$wp_customize->add_control(
        'interactive_education_spotlight_heading',
        array(
            'label'           => sprintf( esc_html__( 'Spotlight Heading', 'interactive-education' ), ),
            'section'         => 'interactive_education_spotlight_section',
            'settings'        => 'interactive_education_spotlight_heading' ,
            'type'            => 'text',
        )
    );

    $wp_customize->add_setting(
        'interactive_education_spotlight_text',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

	$wp_customize->add_control(
        'interactive_education_spotlight_text',
        array(
            'label'           => sprintf( esc_html__( 'Spotlight Content', 'interactive-education' ), ),
            'section'         => 'interactive_education_spotlight_section',
            'settings'        => 'interactive_education_spotlight_text' ,
            'type'            => 'text',
        )
    );

    $wp_customize->add_setting(
        'interactive_education_spotlight_button_text',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

	$wp_customize->add_control(
        'interactive_education_spotlight_button_text',
        array(
            'label'           => sprintf( esc_html__( 'Button Text 1', 'interactive-education' ), ),
            'section'         => 'interactive_education_spotlight_section',
            'settings'        => 'interactive_education_spotlight_button_text' ,
            'type'            => 'text',
        )
    );

    $wp_customize->add_setting(
        'interactive_education_spotlight_button_link',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

	$wp_customize->add_control(
        'interactive_education_spotlight_button_link',
        array(
            'label'           => sprintf( esc_html__( 'Button Link 1', 'interactive-education' ), ),
            'section'         => 'interactive_education_spotlight_section',
            'settings'        => 'interactive_education_spotlight_button_link' ,
            'type'            => 'text',
        )
    );

    $wp_customize->add_setting(
        'interactive_education_spotlight_button1_text',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

	$wp_customize->add_control(
        'interactive_education_spotlight_button1_text',
        array(
            'label'           => sprintf( esc_html__( 'Button Text 2', 'interactive-education' ), ),
            'section'         => 'interactive_education_spotlight_section',
            'settings'        => 'interactive_education_spotlight_button1_text' ,
            'type'            => 'text',
        )
    );

    $wp_customize->add_setting(
        'interactive_education_spotlight_button1_link',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

	$wp_customize->add_control(
        'interactive_education_spotlight_button1_link',
        array(
            'label'           => sprintf( esc_html__( 'Button Link 1', 'interactive-education' ), ),
            'section'         => 'interactive_education_spotlight_section',
            'settings'        => 'interactive_education_spotlight_button1_link' ,
            'type'            => 'text',
        )
    );

    $wp_customize->add_setting(
		'interactive_education_spotlight_image',
		array(
        	'default'           => '',
        	'sanitize_callback' => 'interactive_education_sanitize_image',
    	)
    );
    
    $wp_customize->add_control(
     	new WP_Customize_Image_Control(
    		$wp_customize, 'interactive_education_spotlight_image', 
    		array(
    			'label'           => sprintf( esc_html__( 'Section Image', 'interactive-education' ).$i, ),
		        'settings'  => 'interactive_education_spotlight_image',
		        'section'   => 'interactive_education_spotlight_section'
    		) 
    	)
    );

	// Global Color Options

	$wp_customize->add_section(
		'interactive_education_global_color_section',
		array(
			'panel'      => 'interactive_education_general_settings_panel',
			'title'    => esc_html__( 'Global Color Options', 'interactive-education' ),
		)
	);

	$wp_customize->add_setting(
		'interactive_education_global_color',
		array(
			'default'           => '#ffc107',
			'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	
	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'interactive_education_global_color',
			array(
				'label'    => __( 'Global Color One', 'interactive-education' ),
				'section'  => 'interactive_education_global_color_section',
			)
		)
	);

	$wp_customize->add_setting(
		'interactive_education_global_colortwo',
		array(
			'default'           => '#1865f2',
			'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	
	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'interactive_education_global_colortwo',
			array(
				'label'    => __( 'Global Color Two', 'interactive-education' ),
				'section'  => 'interactive_education_global_color_section',
			)
		)
	);

	$wp_customize->add_setting(
		'interactive_education_global_colorthree',
		array(
			'default'           => '#f4a261',
			'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	
	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'interactive_education_global_colorthree',
			array(
				'label'    => __( 'Global Color Three', 'interactive-education' ),
				'section'  => 'interactive_education_global_color_section',
			)
		)
	);

	// Global Font Family Options

	$wp_customize->add_section(
		'interactive_education_global_font_section',
		array(
			'panel'      => 'interactive_education_general_settings_panel',
			'title'    => esc_html__( 'Global Font Family Options', 'interactive-education' ),
		)
	);

	$wp_customize->add_setting(
		'interactive_education_global_font_setting',
		array(
			'default'           => '',
			'sanitize_callback' => 'interactive_education_sanitize_google_fonts',
		)
	);
	
	$wp_customize->add_control(
		'interactive_education_global_font_setting',
		array(
			'label'    => esc_html__( 'Global Font Family', 'interactive-education' ),
			'section'  => 'interactive_education_global_font_section',
			'settings' => 'interactive_education_global_font_setting',
			'type'     => 'select',
			'choices'  => interactive_education_get_all_google_font_families(),
		)
	);

    // Footer Option

	$wp_customize->add_section(
        'interactive_education_footer_widgets_section',
        array(
            'panel'      => 'interactive_education_footer_settings_panel',
            'title'    => esc_html__( 'Footer Widgets Options', 'interactive-education' ),
        )
    );

	$wp_customize->add_setting(
		'interactive_education_footer_widgets_section_on_off_setting',
		array(
			'default'           => true,
			'sanitize_callback' => 'interactive_education_sanitize_on_off',
		)
	);

	$wp_customize->add_control(
		new interactive_education_On_Off_Custom_Control(
			$wp_customize,
			'interactive_education_footer_widgets_section_on_off_setting',
			array(
				'label'    => esc_html__( 'ON / OFF Footer Widgets', 'interactive-education' ),
				'section'  => 'interactive_education_footer_widgets_section',
				'settings' => 'interactive_education_footer_widgets_section_on_off_setting',
			)
		)
	);

    $wp_customize->add_setting( 'interactive_education_footer_widget_background_color', array(
            'default' => '',
            'sanitize_callback' => 'sanitize_hex_color'
        ));
        $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'interactive_education_footer_widget_background_color', array(
            'label'     => __('Footer Widget Background Color', 'interactive-education'),
            'description' => __('It will change the complete footer widget background color.', 'interactive-education'),
            'section' => 'interactive_education_footer_widgets_section',
            'settings' => 'interactive_education_footer_widget_background_color',
        )));

        $wp_customize->add_setting('interactive_education_footer_widget_background_image',array(
            'default'   => '',
            'sanitize_callback' => 'esc_url_raw',
        ));
        $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'interactive_education_footer_widget_background_image',array(
            'label' => __('Footer Widget Background Image','interactive-education'),
            'section' => 'interactive_education_footer_widgets_section'
        )));
    
    

	$wp_customize->add_section(
        'interactive_education_copyright_section',
        array(
            'panel'      => 'interactive_education_footer_settings_panel',
            'title'    => esc_html__( 'Copyright Options', 'interactive-education' ),
        )
    );

    $wp_customize->add_setting(
        'interactive_education_footer_text',
        array(
            'default'           => '',
            'sanitize_callback' => 'sanitize_text_field',
        )
    );

    $wp_customize->add_control(
        'interactive_education_footer_text',
        array(
            'label'           => sprintf( esc_html__( 'Edit Copyright Text', 'interactive-education' ), ),
            'section'         => 'interactive_education_copyright_section',
            'settings'        => 'interactive_education_footer_text' ,
            'type'            => 'text',
        )
    );

	$wp_customize->add_setting( 'interactive_education_footer_copyright_background_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'interactive_education_footer_copyright_background_color', array(
		'label'     => __('Copyright Background Color', 'interactive-education'),
		'description' => __('It will change the complete copyright background color.', 'interactive-education'),
		'section' => 'interactive_education_copyright_section',
		'settings' => 'interactive_education_footer_copyright_background_color',
	)));

	$wp_customize->add_setting('interactive_education_copyright_text_position',array(
        'default' => 'Center',
        'sanitize_callback' => 'interactive_education_sanitize_choices'
    ));
    $wp_customize->add_control('interactive_education_copyright_text_position',array(
        'type' => 'radio',
        'label'     => __('Copyright Position', 'interactive-education'),
        'description'   => __('This option work for copyright', 'interactive-education'),
		'section' => 'interactive_education_copyright_section',
		'choices' => array(
            'Right' => __('Right','interactive-education'),
            'Left' => __('Left','interactive-education'),
            'Center' => __('Center','interactive-education')
     ),
    ) );

    // Add Settings and Controls for Scroll top
    $wp_customize->add_setting('interactive_education_scroll_top_position',array(
        'default' => 'Right',
        'sanitize_callback' => 'interactive_education_sanitize_choices'
    ));
    $wp_customize->add_control('interactive_education_scroll_top_position',array(
        'type' => 'radio',
        'label'     => __('Scroll to top Position', 'interactive-education'),
        'description'   => __('This option work for scroll to top', 'interactive-education'),
       'section' => 'interactive_education_copyright_section',
       'choices' => array(
            'Right' => __('Right','interactive-education'),
            'Left' => __('Left','interactive-education'),
            'Center' => __('Center','interactive-education')
     ),
    ) );
    
}
add_action( 'customize_register', 'interactive_education_customize_register' );

/**
 * Create the site title for the partial selective refresh.
 *
 * @return void
 */
function interactive_education_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Create the website's slogan for the partial selective refresh.
 *
 * @return void
 */
function interactive_education_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Singleton class for handling the theme's customizer integration.
 *
 * @since  1.0.0
 * @access public
 */
final class Interactive_Education_Customize_Buttons {
	/**
	 * Returns the instance.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return object
	 */
	public static function Interactive_Education_get_instance() {

		static $interactive_education_instance = null;

		if ( is_null( $interactive_education_instance ) ) {
			$interactive_education_instance = new self;
			$interactive_education_instance->Interactive_Education_setup_actions();
		}

		return $interactive_education_instance;
	}

	/**
	 * Constructor method.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function __construct() {}

	/**
	 * Sets up initial actions.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function Interactive_Education_setup_actions() {

		// Register panels, sections, settings, controls, and partials.
		add_action( 'customize_register', array( $this, 'sections' ) );

		// Register scripts and styles for the controls.
		add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );
	}

	/**
	 * Sets up the customizer sections.
	 *
	 * @since  1.0.0
	 * @access public
	 * @param  object  $interactive_education_manager
	 * @return void
	*/
	public function sections( $interactive_education_manager ) {
		load_template( trailingslashit( get_template_directory() ) . '/inc/interactive-education-section-pro.php' );

		$interactive_education_manager->register_section_type( 'Interactive_Education_Customize_Section_Pro' );

		$interactive_education_manager->add_section( new Interactive_Education_Customize_Section_Pro( $interactive_education_manager,'interactive_education_buy_now', array(
			'priority'   => 1,
			'title'    => esc_html__( 'Buy Interactive Education Pro', 'interactive-education' ),
			'pro_text' => esc_html__( 'Buy Pro Theme', 'interactive-education' ),
			'pro_url'    => esc_url( INTERACTIVE_EDUCATION_BUY_NOW ),
		) )	);

		$interactive_education_manager->add_section( new Interactive_Education_Customize_Section_Pro( $interactive_education_manager, 'interactive_education_live_demo', array(
		    'priority'   => 1,
		    'title'      => esc_html__( 'Preview Pro Theme', 'interactive-education' ),
		    'pro_text'   => esc_html__( 'View Live Demo', 'interactive-education' ),
		    'pro_url'    => esc_url( INTERACTIVE_EDUCATION_LIVE_DEMO ),
		) ) );	
	}

	/**
	 * Loads theme customizer CSS.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return void
	 */
	public function enqueue_control_scripts() {

		wp_enqueue_script( 'interactive-education-customize-controls', trailingslashit( get_template_directory_uri() ) . '/assets/js/customize-controls.js', array( 'customize-controls' ) );

		wp_enqueue_style( 'interactive-education-customize-controls', trailingslashit( get_template_directory_uri() ) . '/assets/css/customize-controls.css' );
	}
}
Interactive_Education_Customize_Buttons::Interactive_Education_get_instance();