<?php
/**
 * Electrician Services: Customizer-home-page
 *
 * @subpackage Electrician Services
 * @since 1.0
 */

	//  Home Page Panel
	$wp_customize->add_panel( 'electrician_services_custompage_panel', array(
		'title' => esc_html__( 'Custom Page Settings', 'electrician-services' ),
		'priority' => 2,
	));
	// Header
    $wp_customize->add_section('electrician_services_header',array(
        'title' => __('Header', 'electrician-services'),
       'priority' => 3,
       'panel' => 'electrician_services_custompage_panel',
    ) );
    $wp_customize->add_setting( 'electrician_services_section_contact_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Electrician_Services_Customizer_Customcontrol_Section_Heading( $wp_customize, 'electrician_services_section_contact_heading', array(
		'label'       => esc_html__( 'Header Settings', 'electrician-services' ),	
		'description' => __( 'Add header information in the below feilds', 'electrician-services' ),
		'section'     => 'electrician_services_header',
		'settings'    => 'electrician_services_section_contact_heading',
	) ) );
    $wp_customize->add_setting('electrician_services_location_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_location_text',array(
		'label' => esc_html__('Location Text','electrician-services'),
		'section' => 'electrician_services_header',
		'setting' => 'electrician_services_location_text',
		'type'    => 'text'
	));
	$wp_customize->add_setting('electrician_services_address_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('electrician_services_address_url',array(
		'label' => esc_html__('Add Map URL','electrician-services'),
		'section' => 'electrician_services_header',
		'setting' => 'electrician_services_address_url',
		'type'    => 'url'
	));
	$wp_customize->add_setting('electrician_services_location_address',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_location_address',array(
		'label' => esc_html__('Location Address','electrician-services'),
		'section' => 'electrician_services_header',
		'setting' => 'electrician_services_location_address',
		'type'    => 'text'
	));
	$wp_customize->add_setting('electrician_services_location_icon',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Electrician_Services_Fontawesome_Icon_Chooser(
        $wp_customize,'electrician_services_location_icon',array(
		'label'	=> __('Add Location Icon','electrician-services'),
		'transport' => 'refresh',
		'section'	=> 'electrician_services_header',
		'setting'	=> 'electrician_services_location_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('electrician_services_timing_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_timing_text',array(
		'label' => esc_html__('Timing Text','electrician-services'),
		'section' => 'electrician_services_header',
		'setting' => 'electrician_services_timing_text',
		'type'    => 'text'
	));
	$wp_customize->add_setting('electrician_services_timing_open_time',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_timing_open_time',array(
		'label' => esc_html__('Opening Timing','electrician-services'),
		'section' => 'electrician_services_header',
		'setting' => 'electrician_services_timing_open_time',
		'type'    => 'text'
	));
	$wp_customize->add_setting('electrician_services_timimg_icon',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Electrician_Services_Fontawesome_Icon_Chooser(
        $wp_customize,'electrician_services_timimg_icon',array(
		'label'	=> __('Add Timing Icon','electrician-services'),
		'transport' => 'refresh',
		'section'	=> 'electrician_services_header',
		'setting'	=> 'electrician_services_timimg_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('electrician_services_call_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_call_text',array(
		'label' => esc_html__('Call Text','electrician-services'),
		'section' => 'electrician_services_header',
		'setting' => 'electrician_services_call_text',
		'type'    => 'text'
	));
	$wp_customize->add_setting('electrician_services_call_phone_number',array(
		'default' => '',
		'sanitize_callback' => 'electrician_services_sanitize_phone_number'
	));
	$wp_customize->add_control('electrician_services_call_phone_number',array(
		'label' => esc_html__('Phone Number','electrician-services'),
		'section' => 'electrician_services_header',
		'setting' => 'electrician_services_call_phone_number',
		'type'    => 'text'
	));
	$wp_customize->add_setting('electrician_services_call_icon',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Electrician_Services_Fontawesome_Icon_Chooser(
        $wp_customize,'electrician_services_call_icon',array(
		'label'	=> __('Add Phone Number Icon','electrician-services'),
		'transport' => 'refresh',
		'section'	=> 'electrician_services_header',
		'setting'	=> 'electrician_services_call_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('electrician_services_mail_text',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_mail_text',array(
		'label' => esc_html__('Email Text','electrician-services'),
		'section' => 'electrician_services_header',
		'setting' => 'electrician_services_mail_text',
		'type'    => 'text'
	));
	$wp_customize->add_setting('electrician_services_mail_email_address',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_email'
	));
	$wp_customize->add_control('electrician_services_mail_email_address',array(
		'label' => esc_html__('Email Address','electrician-services'),
		'section' => 'electrician_services_header',
		'setting' => 'electrician_services_mail_email_address',
		'type'    => 'text'
	));
	$wp_customize->add_setting('electrician_services_mail_icon',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Electrician_Services_Fontawesome_Icon_Chooser(
        $wp_customize,'electrician_services_mail_icon',array(
		'label'	=> __('Add Email Address Icon','electrician-services'),
		'transport' => 'refresh',
		'section'	=> 'electrician_services_header',
		'setting'	=> 'electrician_services_mail_icon',
		'type'		=> 'icon'
	)));

	// Social Media
    $wp_customize->add_section('electrician_services_urls',array(
        'title' => __('Social Media', 'electrician-services'),
        'priority' => 3,
        'panel' => 'electrician_services_custompage_panel',
    ) );
    $wp_customize->add_setting( 'electrician_services_section_social_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Electrician_Services_Customizer_Customcontrol_Section_Heading( $wp_customize, 'electrician_services_section_social_heading', array(
		'label'       => esc_html__( 'Social Media Settings', 'electrician-services' ),
		'description' => __( 'Add social media links in the below feilds', 'electrician-services' ),			
		'section'     => 'electrician_services_urls',
		'settings'    => 'electrician_services_section_social_heading',
	) ) );
	$wp_customize->add_setting(
		'header_social_icon_enable',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'electrician_services_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Electrician_Services_Customizer_Customcontrol_Switch(
			$wp_customize,
			'header_social_icon_enable',
			array(
				'settings'        => 'header_social_icon_enable',
				'section'         => 'electrician_services_urls',
				'label'           => __( 'Check to show social fields', 'electrician-services' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'electrician-services' ),
					'off'    => __( 'Off', 'electrician-services' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'electrician_services_twitter_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Electrician_Services_Customizer_Customcontrol_Section_Heading( $wp_customize, 'electrician_services_twitter_heading', array(
		'label'       => esc_html__( 'Twitter Settings', 'electrician-services' ),
		'section'     => 'electrician_services_urls',
		'settings'    => 'electrician_services_twitter_heading',
	) ) );
    $wp_customize->add_setting('electrician_services_twitter_icon',array(
		'default'	=> 'fab fa-x-twitter',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Electrician_Services_Fontawesome_Icon_Chooser(
        $wp_customize,'electrician_services_twitter_icon',array(
		'label'	=> __('Add Icon','electrician-services'),
		'transport' => 'refresh',
		'section'	=> 'electrician_services_urls',
		'setting'	=> 'electrician_services_twitter_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('electrician_services_twitter',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('electrician_services_twitter',array(
		'label' => esc_html__('Add URL','electrician-services'),
		'section' => 'electrician_services_urls',
		'setting' => 'electrician_services_twitter',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'electrician_services_header_twt_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'electrician_services_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Electrician_Services_Customizer_Customcontrol_Switch(
			$wp_customize,
			'electrician_services_header_twt_target',
			array(
				'settings'        => 'electrician_services_header_twt_target',
				'section'         => 'electrician_services_urls',
				'label'           => __( 'Open link in a new tab', 'electrician-services' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'electrician-services' ),
					'off'    => __( 'Off', 'electrician-services' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'electrician_services_linkedin_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Electrician_Services_Customizer_Customcontrol_Section_Heading( $wp_customize, 'electrician_services_linkedin_heading', array(
		'label'       => esc_html__( 'Linkedin Settings', 'electrician-services' ),
		'section'     => 'electrician_services_urls',
		'settings'    => 'electrician_services_linkedin_heading',
	) ) );
	$wp_customize->add_setting('electrician_services_linkedin_icon',array(
		'default'	=> 'fab fa-linkedin',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Electrician_Services_Fontawesome_Icon_Chooser(
        $wp_customize,'electrician_services_linkedin_icon',array(
		'label'	=> __('Add Icon','electrician-services'),
		'transport' => 'refresh',
		'section'	=> 'electrician_services_urls',
		'setting'	=> 'electrician_services_linkedin_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('electrician_services_linkedin',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('electrician_services_linkedin',array(
		'label' => esc_html__('Add URL','electrician-services'),
		'section' => 'electrician_services_urls',
		'setting' => 'electrician_services_linkedin',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'electrician_services_header_linkedin_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'electrician_services_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Electrician_Services_Customizer_Customcontrol_Switch(
			$wp_customize,
			'electrician_services_header_linkedin_target',
			array(
				'settings'        => 'electrician_services_header_linkedin_target',
				'section'         => 'electrician_services_urls',
				'label'           => __( 'Open link in a new tab', 'electrician-services' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'electrician-services' ),
					'off'    => __( 'Off', 'electrician-services' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'electrician_services_youtube_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Electrician_Services_Customizer_Customcontrol_Section_Heading( $wp_customize, 'electrician_services_youtube_heading', array(
		'label'       => esc_html__( 'Youtube Settings', 'electrician-services' ),
		'section'     => 'electrician_services_urls',
		'settings'    => 'electrician_services_youtube_heading',
	) ) );
	$wp_customize->add_setting('electrician_services_youtube_icon',array(
		'default'	=> 'fab fa-youtube',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Electrician_Services_Fontawesome_Icon_Chooser(
        $wp_customize,'electrician_services_youtube_icon',array(
		'label'	=> __('Add Icon','electrician-services'),
		'transport' => 'refresh',
		'section'	=> 'electrician_services_urls',
		'setting'	=> 'electrician_services_youtube_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('electrician_services_youtube',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('electrician_services_youtube',array(
		'label' => esc_html__('Add URL','electrician-services'),
		'section' => 'electrician_services_urls',
		'setting' => 'electrician_services_youtube',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'electrician_services_header_youtube_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'electrician_services_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Electrician_Services_Customizer_Customcontrol_Switch(
			$wp_customize,
			'electrician_services_header_youtube_target',
			array(
				'settings'        => 'electrician_services_header_youtube_target',
				'section'         => 'electrician_services_urls',
				'label'           => __( 'Open link in a new tab', 'electrician-services' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'electrician-services' ),
					'off'    => __( 'Off', 'electrician-services' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'electrician_services_instagram_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Electrician_Services_Customizer_Customcontrol_Section_Heading( $wp_customize, 'electrician_services_instagram_heading', array(
		'label'       => esc_html__( 'Instagram Settings', 'electrician-services' ),
		'section'     => 'electrician_services_urls',
		'settings'    => 'electrician_services_instagram_heading',
	) ) );
	$wp_customize->add_setting('electrician_services_instagram_icon',array(
		'default'	=> 'fab fa-instagram',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Electrician_Services_Fontawesome_Icon_Chooser(
        $wp_customize,'electrician_services_instagram_icon',array(
		'label'	=> __('Add Icon','electrician-services'),
		'transport' => 'refresh',
		'section'	=> 'electrician_services_urls',
		'setting'	=> 'electrician_services_instagram_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('electrician_services_instagram',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('electrician_services_instagram',array(
		'label' => esc_html__('Add URL','electrician-services'),
		'section' => 'electrician_services_urls',
		'setting' => 'electrician_services_instagram',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'electrician_services_header_instagram_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'electrician_services_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Electrician_Services_Customizer_Customcontrol_Switch(
			$wp_customize,
			'electrician_services_header_instagram_target',
			array(
				'settings'        => 'electrician_services_header_instagram_target',
				'section'         => 'electrician_services_urls',
				'label'           => __( 'Open link in a new tab', 'electrician-services' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'electrician-services' ),
					'off'    => __( 'Off', 'electrician-services' ),
				),
				'active_callback' => '',
			)
		)
	);

    //Slider
	$wp_customize->add_section( 'electrician_services_slider_section' , array(
    	'title'      => __( 'Slider Settings', 'electrician-services' ),
    	'priority'   => 3,
    	'panel' => 'electrician_services_custompage_panel',
	) );
	$wp_customize->add_setting( 'electrician_services_section_slide_heading', array(
			'default'           => '',
			'transport'         => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Electrician_Services_Customizer_Customcontrol_Section_Heading( $wp_customize, 'electrician_services_section_slide_heading', array(
		'label'       => esc_html__( 'Slider Settings', 'electrician-services' ),
		'description' => __( 'Slider Image Dimension ( 1600px x 650px)', 'electrician-services' ),		
		'section'     => 'electrician_services_slider_section',
		'settings'    => 'electrician_services_section_slide_heading',
		'priority'   => 1,
	) ) );
	$wp_customize->add_setting(
		'electrician_services_slider_arrows',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'electrician_services_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Electrician_Services_Customizer_Customcontrol_Switch(
			$wp_customize,
			'electrician_services_slider_arrows',
			array(
				'settings'        => 'electrician_services_slider_arrows',
				'section'         => 'electrician_services_slider_section',
				'label'           => __( 'Check To show Slider', 'electrician-services' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'electrician-services' ),
					'off'    => __( 'Off', 'electrician-services' ),
				),
				'active_callback' => '',
				'priority'   => 1,
			)
		)
	);
	$wp_customize->add_setting('electrician_services_slide_heading',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_slide_heading',array(
		'label' => esc_html__('Slider Sub Heading','electrician-services'),
		'section' => 'electrician_services_slider_section',
		'setting' => 'electrician_services_slide_heading',
		'type'    => 'text',
		'priority'   => 2,
	));

	$wp_customize->add_setting('electrician_services_slider_count',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_slider_count',array(
		'label'	=> esc_html__('Slider Count','electrician-services'),
		'section'	=> 'electrician_services_slider_section',
		'type'		=> 'number',
		'priority'	  => 4,
	));

	$categories = get_categories();
	$cats = array();
	$i = 0;
	$cat_post[]= 'select';
	foreach($categories as $category){
	if($i==0){
	  $default = $category->slug;
	  $i++;
	}
	$cat_post[$category->slug] = $category->name;
	}

	$wp_customize->add_setting('electrician_services_post_setting',array(
		'default' => 'select',
		'sanitize_callback' => 'electrician_services_sanitize_select',
	));
	$wp_customize->add_control('electrician_services_post_setting',array(
		'type'    => 'select',
		'choices' => $cat_post,
		'label' => esc_html__('Select Category to display slider images','electrician-services'),
		'section' => 'electrician_services_slider_section',
		'priority'   => 4,
	));
	$wp_customize->add_setting('electrician_services_slider_heading_color', array(
	    'default' => '#2a2a34',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'electrician_services_slider_heading_color', array(
	    'section' => 'electrician_services_slider_section',
	    'label' => esc_html__('Slider Title Color', 'electrician-services'),
	 	'priority'    => 5,
	)));
	$wp_customize->add_setting(
		'electrician_services_slider_excerpt_show_hide',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => 'off',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'electrician_services_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Electrician_Services_Customizer_Customcontrol_Switch(
			$wp_customize,
			'electrician_services_slider_excerpt_show_hide',
			array(
				'settings'        => 'electrician_services_slider_excerpt_show_hide',
				'section'         => 'electrician_services_slider_section',
				'label'           => __( 'Show Hide excerpt', 'electrician-services' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'electrician-services' ),
					'off'    => __( 'Off', 'electrician-services' ),
				),
				'priority'   => 6,
			)
		)
	);
	$wp_customize->add_setting('electrician_services_slider_excerpt_count',array(
		'default'=> 30,
		'transport' => 'refresh',
		'sanitize_callback' => 'electrician_services_sanitize_integer'
	));
	$wp_customize->add_control(new Electrician_Services_Slider_Custom_Control( $wp_customize, 'electrician_services_slider_excerpt_count',array(
		'label' => esc_html__( 'Excerpt Limit','electrician-services' ),
		'section'=> 'electrician_services_slider_section',
		'settings'=>'electrician_services_slider_excerpt_count',
		'input_attrs' => array(
			'reset'			   => 30,
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
        'priority'    => 6,
	)));
	$wp_customize->add_setting('electrician_services_slider_excerpt_color', array(
	    'default' => '#2a2a34',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'electrician_services_slider_excerpt_color', array(
	    'section' => 'electrician_services_slider_section',
	    'label' => esc_html__('Slider Excerpt Color', 'electrician-services'),
	 	'priority'    => 7,
	)));
	$wp_customize->add_setting(
		'electrician_services_slider_button_show_hide',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'electrician_services_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Electrician_Services_Customizer_Customcontrol_Switch(
			$wp_customize,
			'electrician_services_slider_button_show_hide',
			array(
				'settings'        => 'electrician_services_slider_button_show_hide',
				'section'         => 'electrician_services_slider_section',
				'label'           => __( 'Show Hide Button', 'electrician-services' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'electrician-services' ),
					'off'    => __( 'Off', 'electrician-services' ),
				),
				'priority'    => 8,
			)
		)
	);
	$wp_customize->add_setting('electrician_services_slider_read_more',array(
		'default' => 'Read More',
		'sanitize_callback' => 'sanitize_text_field'
	)); 
	$wp_customize->add_control('electrician_services_slider_read_more',array(
		'label' => esc_html__('Button Text','electrician-services'),
		'section' => 'electrician_services_slider_section',
		'setting' => 'electrician_services_slider_read_more',
		'type'    => 'text',
		'priority'    => 8,
	));
	
	$wp_customize->add_setting('electrician_services_slider_content_alignment',array(
        'default' => 'LEFT-ALIGN',
        'sanitize_callback' => 'electrician_services_sanitize_choices'
	));
	$wp_customize->add_control('electrician_services_slider_content_alignment',array(
		'type' => 'radio',
		'label'     => __('Slider Content Alignment', 'electrician-services'),
		'section' => 'electrician_services_slider_section',
		'type' => 'select',
		'choices' => array(
			'LEFT-ALIGN' => __('LEFT','electrician-services'),
            'CENTER-ALIGN' => __('CENTER','electrician-services'),
            'RIGHT-ALIGN' => __('RIGHT','electrician-services'),
		),
		'priority'    => 9,
	) );

	$wp_customize->add_setting('electrician_services_slider_overlay', array(
	    'default' => '#000000',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'electrician_services_slider_overlay', array(
	    'section' => 'electrician_services_slider_section',
	    'label' => esc_html__('Slider Overlay Color', 'electrician-services'),
	 	'priority'    => 10,
	)));

	$wp_customize->add_setting('electrician_services_slider_opacity',array(
        'default' => '1',
        'sanitize_callback' => 'electrician_services_sanitize_choices'
	));
	$wp_customize->add_control('electrician_services_slider_opacity',array(
		'type' => 'radio',
		'label'     => __('Slider Opacity', 'electrician-services'),
		'section' => 'electrician_services_slider_section',
		'type' => 'select',
		'choices' => array(
			'0' => __('0','electrician-services'),
			'0.1' => __('0.1','electrician-services'),
			'0.2' => __('0.2','electrician-services'),
			'0.3' => __('0.3','electrician-services'),
			'0.4' => __('0.4','electrician-services'),
			'0.5' => __('0.5','electrician-services'),
			'0.6' => __('0.6','electrician-services'),
			'0.7' => __('0.7','electrician-services'),
			'0.8' => __('0.8','electrician-services'),
			'0.9' => __('0.9','electrician-services'),
			'1' => __('1','electrician-services')
		),
	) );


	// Project Section
	$wp_customize->add_section( 'electrician_services_project_section' , array(
    	'title'      => __( 'Project Section Settings', 'electrician-services' ),
		'priority'   => 4,
		'panel' => 'electrician_services_custompage_panel',
	) );
	$wp_customize->add_setting( 'electrician_services_section_project_heading', array(
			'default'           => '',
			'transport'         => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Electrician_Services_Customizer_Customcontrol_Section_Heading( $wp_customize, 'electrician_services_section_project_heading', array(
		'label'       => esc_html__( 'Project Settings', 'electrician-services' ),	
		'section'     => 'electrician_services_project_section',
		'settings'    => 'electrician_services_section_project_heading',
	) ) );
	$wp_customize->add_setting(
		'electrician_services_project_enable',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'electrician_services_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Electrician_Services_Customizer_Customcontrol_Switch(
			$wp_customize,
			'electrician_services_project_enable',
			array(
				'settings'        => 'electrician_services_project_enable',
				'section'         => 'electrician_services_project_section',
				'label'           => __( 'Check To Show Project Settings', 'electrician-services' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'electrician-services' ),
					'off'    => __( 'Off', 'electrician-services' ),
				),
				'active_callback' => '',
			)
		)
	);
    $wp_customize->add_setting('electrician_services_project_text',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_project_text',array(
		'label'	=> esc_html__('Add Short Heading','electrician-services'),
		'section'	=> 'electrician_services_project_section',
		'type'		=> 'text',
	));
	$wp_customize->add_setting('electrician_services_project_heading',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_project_heading',array(
		'label'	=> esc_html__('Add Heading','electrician-services'),
		'section'	=> 'electrician_services_project_section',
		'type'		=> 'text',
	));
	$wp_customize->add_setting('electrician_services_project_btn_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_project_btn_url',array(
		'label'	=> esc_html__('Add Button Url','electrician-services'),
		'section'	=> 'electrician_services_project_section',
		'type'		=> 'text',
	));

	$categories = get_categories();
	$cats = array();
	$i = 0;
	$cat_post[]= 'select';
	foreach($categories as $category){
	if($i==0){
	  $default = $category->slug;
	  $i++;
	}
	$cat_post[$category->slug] = $category->name;
	}

	$wp_customize->add_setting('electrician_services_project_setting',array(
		'default' => 'select',
		'sanitize_callback' => 'electrician_services_sanitize_select',
	));
	$wp_customize->add_control('electrician_services_project_setting',array(
		'type'    => 'select',
		'choices' => $cat_post,
		'label' => esc_html__('Select Category to display projects','electrician-services'),
		'section' => 'electrician_services_project_section',
	));

	$wp_customize->add_setting('electrician_services_project_count',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_project_count',array(
		'label'	=> esc_html__('Project Count','electrician-services'),
		'section'	=> 'electrician_services_project_section',
		'type'		=> 'number',
	));

	//Footer
    $wp_customize->add_section( 'electrician_services_footer_copyright', array(
    	'title' => esc_html__( 'Footer Text', 'electrician-services' ),
    	'priority' => 6,
    	'panel' => 'electrician_services_custompage_panel',
	) );
    $wp_customize->add_setting( 'electrician_services_section_footer_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Electrician_Services_Customizer_Customcontrol_Section_Heading( $wp_customize, 'electrician_services_section_footer_heading', array(
		'label'       => esc_html__( 'Footer Settings', 'electrician-services' ),		
		'section'     => 'electrician_services_footer_copyright',
		'settings'    => 'electrician_services_section_footer_heading',
		'priority' => 1,
	) ) );
    $wp_customize->add_setting('electrician_services_footer_text',array(
			'default'	=> 'Electrician WordPress Theme',
			'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('electrician_services_footer_text',array(
			'label'	=> esc_html__('Copyright Text','electrician-services'),
			'section'	=> 'electrician_services_footer_copyright',
			'type'		=> 'textarea'
	));
	$wp_customize->add_setting('electrician_services_footer_content_alignment',array(
        'default' => 'CENTER-ALIGN',
        'sanitize_callback' => 'electrician_services_sanitize_choices'
	));
	$wp_customize->add_control('electrician_services_footer_content_alignment',array(
		'type' => 'radio',
		'label'     => __('Footer Content Alignment', 'electrician-services'),
		'section' => 'electrician_services_footer_copyright',
		'type' => 'select',
		'choices' => array(
			'LEFT-ALIGN' => __('LEFT','electrician-services'),
            'CENTER-ALIGN' => __('CENTER','electrician-services'),
            'RIGHT-ALIGN' => __('RIGHT','electrician-services'),
		),
	) );

	$wp_customize->add_setting(
		'electrician_services_footer_widgets_show_hide',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'electrician_services_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Electrician_Services_Customizer_Customcontrol_Switch(
			$wp_customize,
			'electrician_services_footer_widgets_show_hide',
			array(
				'settings'        => 'electrician_services_footer_widgets_show_hide',
				'section'         => 'electrician_services_footer_copyright',
				'label'           => __( 'Check To show Footer Widgets', 'electrician-services' ),
				'choices'		  => array(
					'1'      => __( 'On', 'electrician-services' ),
					'off'    => __( 'Off', 'electrician-services' ),
				),
				'active_callback' => '',
			)
		)
	);

	$wp_customize->add_setting('electrician_services_footer_widget',array(
        'default' => '4',
        'sanitize_callback' => 'electrician_services_sanitize_choices'
	));
	$wp_customize->add_control('electrician_services_footer_widget',array(
		'type' => 'radio',
		'label'     => __('Footer Per Column', 'electrician-services'),
		'section' => 'electrician_services_footer_copyright',
		'type' => 'select',
		'choices' => array(
			'1' => __('1','electrician-services'),
            '2' => __('2','electrician-services'),
            '3' => __('3','electrician-services'),
            '4' => __('4','electrician-services'),
		)
	) );