<?php
/**
 * suraksha-security-guard: Customizer
 *
 * @subpackage suraksha-security-guard
 * @since 1.0
 */

function suraksha_security_guard_customize_register( $wp_customize ) {

	$wp_customize->add_setting('suraksha_security_guard_logo_size',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_logo_size',array(
		'type' => 'range',
		'description' => __('Logo Size (0-100%)','suraksha-security-guard'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('suraksha_security_guard_logo_padding',array(
		'sanitize_callback'	=> 'esc_html'
	));
	$wp_customize->add_control('suraksha_security_guard_logo_padding',array(
		'label' => __('Logo Padding','suraksha-security-guard'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('suraksha_security_guard_logo_top_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_logo_top_padding',array(
		'type' => 'number',
		'description' => __('Top','suraksha-security-guard'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('suraksha_security_guard_logo_bottom_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_logo_bottom_padding',array(
		'type' => 'number',
		'description' => __('Bottom','suraksha-security-guard'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('suraksha_security_guard_logo_left_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_logo_left_padding',array(
		'type' => 'number',
		'description' => __('Left','suraksha-security-guard'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('suraksha_security_guard_logo_right_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_logo_right_padding',array(
		'type' => 'number',
		'description' => __('Right','suraksha-security-guard'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('suraksha_security_guard_show_site_title',array(
		'default' => true,
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_checkbox'
	));
	$wp_customize->add_control('suraksha_security_guard_show_site_title',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Title','suraksha-security-guard'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('suraksha_security_guard_site_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_site_title_font_size',array(
		'type' => 'number',
		'label' => __('Site Title Font Size','suraksha-security-guard'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting( 'suraksha_security_guard_site_title_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_site_title_color', array(
		'label' => 'Title Color',
		'section' => 'title_tagline',
	)));

	$wp_customize->add_setting('suraksha_security_guard_show_tagline',array(
		'default' => true,
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_checkbox'
	));
	$wp_customize->add_control('suraksha_security_guard_show_tagline',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Tagline','suraksha-security-guard'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('suraksha_security_guard_site_tagline_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_site_tagline_font_size',array(
		'type' => 'number',
		'label' => __('Site Tagline Font Size','suraksha-security-guard'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting( 'suraksha_security_guard_site_tagline_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_site_tagline_color', array(
		'label' => 'Tagline Color',
		'section' => 'title_tagline',
	)));

	$wp_customize->add_panel( 'suraksha_security_guard_panel_id', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'theme_supports' => '',
		'title' => __( 'Theme Settings', 'suraksha-security-guard' ),
		'description' => __( 'Description of what this panel does.', 'suraksha-security-guard' ),
	) );

	$wp_customize->add_section( 'suraksha_security_guard_theme_options_section', array(
    	'title'      => __( 'General Settings', 'suraksha-security-guard' ),
		'priority'   => 30,
		'panel' => 'suraksha_security_guard_panel_id'
	) );

	// Add Settings and Controls for Layout
	$wp_customize->add_setting('suraksha_security_guard_theme_options',array(
     'default' => 'Right Sidebar',
     'sanitize_callback' => 'suraksha_security_guard_sanitize_choices'	        
	));
	$wp_customize->add_control('suraksha_security_guard_theme_options',array(
		'type' => 'radio',
		'label' => __('Do you want this section','suraksha-security-guard'),
		'section' => 'suraksha_security_guard_theme_options_section',
		'choices' => array(
		   'Left Sidebar' => __('Left Sidebar','suraksha-security-guard'),
		   'Right Sidebar' => __('Right Sidebar','suraksha-security-guard'),
		   'One Column' => __('One Column','suraksha-security-guard'),
		   'Three Columns' => __('Three Columns','suraksha-security-guard'),
		   'Four Columns' => __('Four Columns','suraksha-security-guard'),
		   'Grid Layout' => __('Grid Layout','suraksha-security-guard')
		),
	));

	$wp_customize->add_setting( 'suraksha_security_guard_boxfull_width', array(
		'default'           => '',
		'sanitize_callback' => 'suraksha_security_guard_sanitize_choices'
	));
	
	$wp_customize->add_control( 'suraksha_security_guard_boxfull_width', array(
		'label'    => __( 'Section Width', 'suraksha-security-guard' ),
		'section'  => 'suraksha_security_guard_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'container'  => __('Box Width', 'suraksha-security-guard'),
			'container-fluid' => __('Full Width', 'suraksha-security-guard'),
			'none' => __('None', 'suraksha-security-guard')
		),
	));
	
	$wp_customize->add_setting( 'suraksha_security_guard_dropdown_anim', array(
		'default'           => 'None',
		'sanitize_callback' => 'suraksha_security_guard_sanitize_choices'
	));
	$wp_customize->add_control( 'suraksha_security_guard_dropdown_anim', array(
		'label'    => __( 'Menu Dropdown Animations', 'suraksha-security-guard' ),
		'section'  => 'suraksha_security_guard_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInUp'  => __('bounceInUp', 'suraksha-security-guard'),
			'fadeInUp' => __('fadeInUp', 'suraksha-security-guard'),
			'zoomIn'    => __('zoomIn', 'suraksha-security-guard'),
			'None'    => __('None', 'suraksha-security-guard')
		),
	));

	// Contact Details
	$wp_customize->add_section( 'suraksha_security_guard_contact_details', array(
    	'title'      => __( 'Header Contact Details', 'suraksha-security-guard' ),
		'priority'   => null,
		'panel' => 'suraksha_security_guard_panel_id'
	) );

	$wp_customize->add_setting('suraksha_security_guard_hide_show_topbar',array(
    	'default' => false,
    	'sanitize_callback'	=> 'suraksha_security_guard_sanitize_checkbox'
	));
	$wp_customize->add_control('suraksha_security_guard_hide_show_topbar',array(
   	'type' => 'checkbox',
   	'label' => __('Show / Hide Topbar','suraksha-security-guard'),
   	'section' => 'suraksha_security_guard_contact_details',
	));

	$wp_customize->add_setting('suraksha_security_guard_location',array(
		'default'=> '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_phone_number'
	));	
	$wp_customize->add_control('suraksha_security_guard_location',array(
		'label'	=> __('Contact Number','suraksha-security-guard'),
		'section'=> 'suraksha_security_guard_contact_details',
		'setting'=> 'suraksha_security_guard_location',
		'type'=> 'text'
	));

	$wp_customize->add_setting('suraksha_security_guard_mail',array(
		'default'=> '',
		'sanitize_callback'	=> 'sanitize_email'
	));	
	$wp_customize->add_control('suraksha_security_guard_mail',array(
		'label'	=> __('Email Address','suraksha-security-guard'),
		'section'=> 'suraksha_security_guard_contact_details',
		'setting'=> 'suraksha_security_guard_mail',
		'type'=> 'text'
	));	

	$wp_customize->add_setting( 'suraksha_security_guard_epicon_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_epicon_color', array(
		'label' => 'Email/Phone Icon Color',
		'section' => 'suraksha_security_guard_contact_details',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_eptext_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_eptext_color', array(
		'label' => 'Email/Phone Text Color',
		'section' => 'suraksha_security_guard_contact_details',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_menu_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_menu_color', array(
		'label' => 'Menu Color',
		'section' => 'suraksha_security_guard_contact_details',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_menuhvr_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_menuhvr_color', array(
		'label' => 'Menu Hover Text Color',
		'section' => 'suraksha_security_guard_contact_details',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_menuhvrbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_menuhvrbg_color', array(
		'label' => 'Menu Hover Bg Color',
		'section' => 'suraksha_security_guard_contact_details',
	)));

	//Social Icons(topbar)
	$wp_customize->add_section('suraksha_security_guard_topbar_header',array(
		'title'	=> __('Social Icon Section','suraksha-security-guard'),
		'description'	=> __('Add Header Content here','suraksha-security-guard'),
		'priority'	=> null,
		'panel' => 'suraksha_security_guard_panel_id',
	));

	$wp_customize->add_setting('suraksha_security_guard_facebook_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('suraksha_security_guard_facebook_url',array(
		'label'	=> __('Add Facebook link','suraksha-security-guard'),
		'section'	=> 'suraksha_security_guard_topbar_header',
		'setting'	=> 'suraksha_security_guard_facebook_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting('suraksha_security_guard_twitter_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('suraksha_security_guard_twitter_url',array(
		'label'	=> __('Add Twitter link','suraksha-security-guard'),
		'section'	=> 'suraksha_security_guard_topbar_header',
		'setting'	=> 'suraksha_security_guard_twitter_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting('suraksha_security_guard_insta_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('suraksha_security_guard_insta_url',array(
		'label'	=> __('Add Instagram link','suraksha-security-guard'),
		'section'	=> 'suraksha_security_guard_topbar_header',
		'setting'	=> 'suraksha_security_guard_insta_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting('suraksha_security_guard_pinterest_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('suraksha_security_guard_pinterest_url',array(
		'label'	=> __('Add Pinterest link','suraksha-security-guard'),
		'section'	=> 'suraksha_security_guard_topbar_header',
		'setting'	=> 'suraksha_security_guard_pinterest_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting('suraksha_security_guard_whatsapp_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('suraksha_security_guard_whatsapp_url',array(
		'label'	=> __('Add Whatsapp link','suraksha-security-guard'),
		'section'	=> 'suraksha_security_guard_topbar_header',
		'setting'	=> 'suraksha_security_guard_whatsapp_url',
		'type'	=> 'url'
	));	

	$wp_customize->add_setting('suraksha_security_guard_linkedin_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('suraksha_security_guard_linkedin_url',array(
		'label'	=> __('Add Linkedin link','suraksha-security-guard'),
		'section'	=> 'suraksha_security_guard_topbar_header',
		'setting'	=> 'suraksha_security_guard_linkedin_url',
		'type'	=> 'url'
	));	

	$wp_customize->add_setting( 'suraksha_security_guard_social_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_social_color', array(
		'label' => 'Social Icons Color',
		'section' => 'suraksha_security_guard_topbar_header',
	)));

	//home page slider
	$wp_customize->add_section( 'suraksha_security_guard_slider_section' , array(
    	'title'      => __( 'Slider Settings', 'suraksha-security-guard' ),
		'priority'   => null,
		'panel' => 'suraksha_security_guard_panel_id'
	) );

	$wp_customize->add_setting('suraksha_security_guard_slider_hide_show',array(
		'default' => false,
		'sanitize_callback' => 'suraksha_security_guard_sanitize_checkbox'
	));
	$wp_customize->add_control('suraksha_security_guard_slider_hide_show',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Slider','suraksha-security-guard'),
		'section' => 'suraksha_security_guard_slider_section'
	));

	$wp_customize->add_setting( 'suraksha_security_guard_slider_effect', array(
		'default'           => '',
		'sanitize_callback' => 'suraksha_security_guard_sanitize_choices'
	));
	$wp_customize->add_control( 'suraksha_security_guard_slider_effect', array(
		'label'    => __( 'Onload Transactions Effects', 'suraksha-security-guard' ),
		'section'  => 'suraksha_security_guard_slider_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInLeft'  => __('bounceInLeft', 'suraksha-security-guard'),
			'bounceInRight' => __('bounceInRight', 'suraksha-security-guard'),
			'bounceInUp'    => __('bounceInUp', 'suraksha-security-guard'),
			'bounceInDown'    => __('bounceInDown', 'suraksha-security-guard'),
			'zoomIn'  => __('zoomIn', 'suraksha-security-guard'),
			'zoomOut' => __('zoomOut', 'suraksha-security-guard'),
			'fadeInDown'    => __('fadeInDown', 'suraksha-security-guard'),
			'fadeInUp'    => __('fadeInUp', 'suraksha-security-guard'),
			'fadeInLeft'  => __('fadeInLeft', 'suraksha-security-guard'),
			'fadeInRight' => __('fadeInRight', 'suraksha-security-guard'),
			'flip-up'    => __('flip-up', 'suraksha-security-guard'),
			'none'    => __('none', 'suraksha-security-guard')
		),
	));

	$wp_customize->add_setting('suraksha_security_guard_slider_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_slider_title_font_size',array(
		'type' => 'number',
		'label' => __('Title Font Size','suraksha-security-guard'),
		'section' => 'suraksha_security_guard_slider_section',
	));

	$wp_customize->add_setting('suraksha_security_guard_slider_text_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_slider_text_font_size',array(
		'type' => 'number',
		'label' => __('Text Font Size','suraksha-security-guard'),
		'section' => 'suraksha_security_guard_slider_section',
	));

	for ( $count = 1; $count <= 4; $count++ ) {
		$wp_customize->add_setting( 'suraksha_security_guard_slider' . $count, array(
			'default'           => '',
			'sanitize_callback' => 'suraksha_security_guard_sanitize_dropdown_pages'
		) );
		$wp_customize->add_control( 'suraksha_security_guard_slider' . $count, array(
			'label'    => __( 'Select Slide Image Page', 'suraksha-security-guard' ),
			'section'  => 'suraksha_security_guard_slider_section',
			'description'=> __('Take the image size of 	1920*500 px.','suraksha-security-guard'),
			'type'     => 'dropdown-pages'
		) );
	}

	$wp_customize->add_setting('suraksha_security_guard_slider_excerpt_length',array(
		'default' => '30',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_slider_excerpt_length',array(
		'type' => 'number',
		'label' => __('Slider Excerpt Length','suraksha-security-guard'),
		'section' => 'suraksha_security_guard_slider_section',
	));

	$wp_customize->add_setting( 'suraksha_security_guard_slider_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_slider_color', array(
		'label' => 'Title Color',
		'section' => 'suraksha_security_guard_slider_section',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_slidertext_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_slidertext_color', array(
		'label' => 'Text Color',
		'section' => 'suraksha_security_guard_slider_section',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_sliderbtn_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_sliderbtn_color', array(
		'label' => 'Button Text Color',
		'section' => 'suraksha_security_guard_slider_section',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_sliderbox_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_sliderbox_color', array(
		'label' => 'Box Color',
		'section' => 'suraksha_security_guard_slider_section',
	)));

	//OUR services
	$wp_customize->add_section('suraksha_security_guard_our_services',array(
		'title'	=> __('Our Services','suraksha-security-guard'),
		'description'=> __('Note : This section will appear below the slider.','suraksha-security-guard'),
		'panel' => 'suraksha_security_guard_panel_id',
	));	

	$wp_customize->add_setting('suraksha_security_guard_section_title',array(
		'default'=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('suraksha_security_guard_section_title',array(
		'label'	=> __('Section Title','suraksha-security-guard'),
		'section'=> 'suraksha_security_guard_our_services',
		'setting'=> 'suraksha_security_guard_section_title',
		'type'=> 'text'
	));

	$wp_customize->add_setting('suraksha_security_guard_service_section_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_service_section_title_font_size',array(
		'type' => 'number',
		'label' => __('Section Title Font Size','suraksha-security-guard'),
		'section' => 'suraksha_security_guard_our_services',
	));

	for ( $count = 0; $count <= 3; $count++ ) {
		$wp_customize->add_setting( 'suraksha_security_guard_services' . $count, array(
			'default'           => '',
			'sanitize_callback' => 'suraksha_security_guard_sanitize_dropdown_pages'
		));
		$wp_customize->add_control( 'suraksha_security_guard_services' . $count, array(
			'label'    => __( 'Select Service Page', 'suraksha-security-guard' ),
			'section'  => 'suraksha_security_guard_our_services',
			'type'     => 'dropdown-pages'
		));
	}

	$wp_customize->add_setting('suraksha_security_guard_service_post_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_service_post_title_font_size',array(
		'type' => 'number',
		'label' => __('Post Title Font Size','suraksha-security-guard'),
		'section' => 'suraksha_security_guard_our_services',
	));

	$wp_customize->add_setting('suraksha_security_guard_service_post_text_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_service_post_text_font_size',array(
		'type' => 'number',
		'label' => __('Post Text Font Size','suraksha-security-guard'),
		'section' => 'suraksha_security_guard_our_services',
	));

	$wp_customize->add_setting('suraksha_security_guard_img_hight',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_img_hight',array(
		'type' => 'number',
		'label' => __('Image Hight','suraksha-security-guard'),
		'section' => 'suraksha_security_guard_our_services',
	));

	$wp_customize->add_setting('suraksha_security_guard_service_section_padding',array(
      'default' => '',
      'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_service_section_padding',array(
		'type' => 'number',
		'label' => __('Section Top Bottom Padding','suraksha-security-guard'),
		'section' => 'suraksha_security_guard_our_services',
	));

   $wp_customize->add_setting( 'suraksha_security_guard_service_color', array(
	'default' => '',
	'sanitize_callback' => 'sanitize_hex_color'
   ));
 	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_service_color', array(
	   'label' => 'Heading Color',
		'section' => 'suraksha_security_guard_our_services',
   )));

   $wp_customize->add_setting( 'suraksha_security_guard_servicetitle_color', array(
	'default' => '',
	'sanitize_callback' => 'sanitize_hex_color'
   ));
 	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_servicetitle_color', array(
	  	'label' => 'Title Color',
		'section' => 'suraksha_security_guard_our_services',
   )));

   $wp_customize->add_setting( 'suraksha_security_guard_servicetext_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
   ));
 	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_servicetext_color', array(
	   	'label' => 'Text Color',
		'section' => 'suraksha_security_guard_our_services',
   )));

 	$wp_customize->add_setting( 'suraksha_security_guard_servicebtn_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_servicebtn_color', array(
		'label' => 'Button Text Color',
		'section' => 'suraksha_security_guard_our_services',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_servicebtnbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_servicebtnbg_color', array(
		'label' => 'Button Bg Color',
		'section' => 'suraksha_security_guard_our_services',
	)));

	//Footer
    $wp_customize->add_section( 'suraksha_security_guard_footer', array(
    	'title'      => __( 'Footer Setting', 'suraksha-security-guard' ),
		'priority'   => null,
		'panel' => 'suraksha_security_guard_panel_id'
	) );

	$wp_customize->add_setting('suraksha_security_guard_show_back_totop',array(
 		'default' => true,
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_checkbox'
	));
	$wp_customize->add_control('suraksha_security_guard_show_back_totop',array(
   	'type' => 'checkbox',
   	'label' => __('Show / Hide Back to Top','suraksha-security-guard'),
   	'section' => 'suraksha_security_guard_footer'
	));

   $wp_customize->add_setting('suraksha_security_guard_footer_copy',array(
		'default'	=> 'Security Guard WordPress Theme By Luzuk',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('suraksha_security_guard_footer_copy',array(
		'label'	=> __('Copyright Text','suraksha-security-guard'),
		'section'	=> 'suraksha_security_guard_footer',
		'setting'	=> 'suraksha_security_guard_footer_copy',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('suraksha_security_guard_footer_copylink',array(
		'default'	=> 'https://www.luzuk.com/products/free-security-guard-wordpress-theme/',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('suraksha_security_guard_footer_copylink',array(
		'label'	=> __('Copyright Link','suraksha-security-guard'),
		'section'	=> 'suraksha_security_guard_footer',
		'setting'	=> 'suraksha_security_guard_footer_copylink',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('suraksha_security_guard_footer_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'suraksha_security_guard_sanitize_float'
	));
	$wp_customize->add_control('suraksha_security_guard_footer_font_size',array(
		'type' => 'number',
		'label' => __('Copyright Font Size','suraksha-security-guard'),
		'section' => 'suraksha_security_guard_footer',
	));

	$wp_customize->add_setting( 'suraksha_security_guard_footer_widgets_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_footer_widgets_color', array(
		'label' => 'Widgets Title Color',
		'section' => 'suraksha_security_guard_footer',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_footer_widgets_menus_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_footer_widgets_menus_color', array(
		'label' => 'Widgets Menus Color',
		'section' => 'suraksha_security_guard_footer',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_copyright_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_copyright_color', array(
		'label' => 'Copyright Text Color',
		'section' => 'suraksha_security_guard_footer',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_copyrightbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_copyrightbg_color', array(
		'label' => 'Copyright Background Color',
		'section' => 'suraksha_security_guard_footer',
	)));

	$wp_customize->add_setting( 'suraksha_security_guard_footerbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'suraksha_security_guard_footerbg_color', array(
		'label' => 'Footer Background Color',
		'section' => 'suraksha_security_guard_footer',
	)));

	$wp_customize->get_setting( 'blogname' )->transport          = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport   = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport  = 'postMessage';

	$wp_customize->selective_refresh->add_partial( 'blogname', array(
		'selector' => '.site-title a',
		'render_callback' => 'suraksha_security_guard_customize_partial_blogname',
	) );
	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => '.site-description',
		'render_callback' => 'suraksha_security_guard_customize_partial_blogdescription',
	) );
}
add_action( 'customize_register', 'suraksha_security_guard_customize_register' );

function suraksha_security_guard_customize_partial_blogname() {
	bloginfo( 'name' );
}

function suraksha_security_guard_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

function suraksha_security_guard_is_static_front_page() {
	return ( is_front_page() && ! is_home() );
}

function suraksha_security_guard_is_view_with_layout_option() {
	// This option is available on all pages. It's also available on archives when there isn't a sidebar.
	return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
}

/**
 * Singleton class for handling the theme's customizer integration.
 *
 * @since  1.0.0
 * @access public
 */
final class Suraksha_Security_Guard_Customize {

	/**
	 * Returns the instance.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return object
	 */
	public static function get_instance() {

		static $instance = null;

		if ( is_null( $instance ) ) {
			$instance = new self;
			$instance->setup_actions();
		}

		return $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 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  $manager
	 * @return void
	 */
	public function sections( $manager ) {

		// Load custom sections.
		load_template( trailingslashit( get_template_directory() ) . '/inc/section-pro.php' );

		// Register custom section types.
		$manager->register_section_type( 'Suraksha_Security_Guard_Customize_Section_Pro' );

		// Register sections.
		$manager->add_section(
			new Suraksha_Security_Guard_Customize_Section_Pro(
				$manager,
				'suraksha_security_guard_example_1',
				array(
					'priority' => 9,
					'title'    => esc_html__( 'Suraksha Security Pro', 'suraksha-security-guard' ),
					'pro_text' => esc_html__( 'Go Pro','suraksha-security-guard' ),
					'pro_url'  => esc_url( 'https://www.luzuk.com/products/security-guard-wordpress-theme/' ),
				)
			)
		);
	}

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

		wp_enqueue_script( 'suraksha-security-guard-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/assets/js/customize-controls.js', array( 'customize-controls' ) );

		wp_enqueue_style( 'suraksha-security-guard-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/assets/css/customize-controls.css' );
	}
}

// Doing this customizer thang!
Suraksha_Security_Guard_Customize::get_instance();