<?php
/**
 * Senior Care Lite: Customizer-home-page
 *
 * @subpackage Senior Care Lite
 * @since 1.0
 */

//  Home Page Panel
	$wp_customize->add_panel( 'senior_care_lite_custompage_panel', array(
		'title' => esc_html__( 'Custom Page Settings', 'senior-care-lite' ),
		'priority' => 2,
	));

	// Top Header
    $wp_customize->add_section('senior_care_lite_top',array(
        'title' => __('Top Header', 'senior-care-lite'),
        'panel' => 'senior_care_lite_custompage_panel',
    ) );
	$wp_customize->add_setting( 'senior_care_lite_section_top_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Senior_Care_Lite_Customizer_Customcontrol_Section_Heading( $wp_customize, 'senior_care_lite_section_top_heading', array(
		'label'       => esc_html__( 'Top Header Settings', 'senior-care-lite' ),	
		'section'     => 'senior_care_lite_top',
		'settings'    => 'senior_care_lite_section_top_heading',
	) ) );
    $wp_customize->add_setting('senior_care_lite_top_text_btn1',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_top_text_btn1',array(
		'label' => esc_html__('Add Button Text','senior-care-lite'),
		'section' => 'senior_care_lite_top',
		'setting' => 'senior_care_lite_top_text_btn1',
		'type'    => 'text'
	));
    $wp_customize->add_setting('senior_care_lite_top_link_btn1',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('senior_care_lite_top_link_btn1',array(
		'label' => esc_html__('Add Button URL','senior-care-lite'),
		'section' => 'senior_care_lite_top',
		'setting' => 'senior_care_lite_top_link_btn1',
		'type'    => 'url'
	));
    $wp_customize->add_setting('senior_care_lite_top_text_btn2',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_top_text_btn2',array(
		'label' => esc_html__('Add Button Text','senior-care-lite'),
		'section' => 'senior_care_lite_top',
		'setting' => 'senior_care_lite_top_text_btn2',
		'type'    => 'text'
	));
    $wp_customize->add_setting('senior_care_lite_top_link_btn2',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('senior_care_lite_top_link_btn2',array(
		'label' => esc_html__('Add Button URL','senior-care-lite'),
		'section' => 'senior_care_lite_top',
		'setting' => 'senior_care_lite_top_link_btn2',
		'type'    => 'url'
	));
	$wp_customize->add_setting('senior_care_lite_top_text_btn3',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_top_text_btn3',array(
		'label' => esc_html__('Add Button Text','senior-care-lite'),
		'section' => 'senior_care_lite_top',
		'setting' => 'senior_care_lite_top_text_btn3',
		'type'    => 'text'
	));
    $wp_customize->add_setting('senior_care_lite_top_link_btn3',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('senior_care_lite_top_link_btn3',array(
		'label' => esc_html__('Add Button URL','senior-care-lite'),
		'section' => 'senior_care_lite_top',
		'setting' => 'senior_care_lite_top_link_btn3',
		'type'    => 'url'
	));

	// Social Media
    $wp_customize->add_section('senior_care_lite_urls',array(
        'title' => __('Social Media', 'senior-care-lite'),
        'panel' => 'senior_care_lite_custompage_panel',
    ) );
 	$wp_customize->add_setting( 'senior_care_lite_section_social_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Senior_Care_Lite_Customizer_Customcontrol_Section_Heading( $wp_customize, 'senior_care_lite_section_social_heading', array(
		'label'       => esc_html__( 'Social Media Settings', 'senior-care-lite' ),
		'description' => __( 'Add social media links in the below feilds', 'senior-care-lite' ),			
		'section'     => 'senior_care_lite_urls',
		'settings'    => 'senior_care_lite_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'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'header_social_icon_enable',
			array(
				'settings'        => 'header_social_icon_enable',
				'section'         => 'senior_care_lite_urls',
				'label'           => __( 'Check to show social fields', 'senior-care-lite' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'senior_care_lite_twitter_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Senior_Care_Lite_Customizer_Customcontrol_Section_Heading( $wp_customize, 'senior_care_lite_twitter_heading', array(
		'label'       => esc_html__( 'Twitter Settings', 'senior-care-lite' ),
		'section'     => 'senior_care_lite_urls',
		'settings'    => 'senior_care_lite_twitter_heading',
	) ) );
    $wp_customize->add_setting('senior_care_lite_twitter_icon',array(
		'default'	=> 'fab fa-x-twitter',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Senior_Care_Lite_Fontawesome_Icon_Chooser(
        $wp_customize,'senior_care_lite_twitter_icon',array(
		'label'	=> __('Add Icon','senior-care-lite'),
		'transport' => 'refresh',
		'section'	=> 'senior_care_lite_urls',
		'setting'	=> 'senior_care_lite_twitter_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('senior_care_lite_twitter',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('senior_care_lite_twitter',array(
		'label' => esc_html__('Add URL','senior-care-lite'),
		'section' => 'senior_care_lite_urls',
		'setting' => 'senior_care_lite_twitter',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'senior_care_lite_header_twt_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'senior_care_lite_header_twt_target',
			array(
				'settings'        => 'senior_care_lite_header_twt_target',
				'section'         => 'senior_care_lite_urls',
				'label'           => __( 'Open link in a new tab', 'senior-care-lite' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'senior_care_lite_linkedin_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Senior_Care_Lite_Customizer_Customcontrol_Section_Heading( $wp_customize, 'senior_care_lite_linkedin_heading', array(
		'label'       => esc_html__( 'Linkedin Settings', 'senior-care-lite' ),
		'section'     => 'senior_care_lite_urls',
		'settings'    => 'senior_care_lite_linkedin_heading',
	) ) );
	$wp_customize->add_setting('senior_care_lite_linkedin_icon',array(
		'default'	=> 'fab fa-linkedin',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Senior_Care_Lite_Fontawesome_Icon_Chooser(
        $wp_customize,'senior_care_lite_linkedin_icon',array(
		'label'	=> __('Add Icon','senior-care-lite'),
		'transport' => 'refresh',
		'section'	=> 'senior_care_lite_urls',
		'setting'	=> 'senior_care_lite_linkedin_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('senior_care_lite_linkedin',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('senior_care_lite_linkedin',array(
		'label' => esc_html__('Add URL','senior-care-lite'),
		'section' => 'senior_care_lite_urls',
		'setting' => 'senior_care_lite_linkedin',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'senior_care_lite_header_linkedin_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'senior_care_lite_header_linkedin_target',
			array(
				'settings'        => 'senior_care_lite_header_linkedin_target',
				'section'         => 'senior_care_lite_urls',
				'label'           => __( 'Open link in a new tab', 'senior-care-lite' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'senior_care_lite_youtube_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Senior_Care_Lite_Customizer_Customcontrol_Section_Heading( $wp_customize, 'senior_care_lite_youtube_heading', array(
		'label'       => esc_html__( 'Youtube Settings', 'senior-care-lite' ),
		'section'     => 'senior_care_lite_urls',
		'settings'    => 'senior_care_lite_youtube_heading',
	) ) );
	$wp_customize->add_setting('senior_care_lite_youtube_icon',array(
		'default'	=> 'fab fa-youtube',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Senior_Care_Lite_Fontawesome_Icon_Chooser(
        $wp_customize,'senior_care_lite_youtube_icon',array(
		'label'	=> __('Add Icon','senior-care-lite'),
		'transport' => 'refresh',
		'section'	=> 'senior_care_lite_urls',
		'setting'	=> 'senior_care_lite_youtube_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('senior_care_lite_youtube',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('senior_care_lite_youtube',array(
		'label' => esc_html__('Add URL','senior-care-lite'),
		'section' => 'senior_care_lite_urls',
		'setting' => 'senior_care_lite_youtube',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'senior_care_lite_header_youtube_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'senior_care_lite_header_youtube_target',
			array(
				'settings'        => 'senior_care_lite_header_youtube_target',
				'section'         => 'senior_care_lite_urls',
				'label'           => __( 'Open link in a new tab', 'senior-care-lite' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting( 'senior_care_lite_instagram_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Senior_Care_Lite_Customizer_Customcontrol_Section_Heading( $wp_customize, 'senior_care_lite_instagram_heading', array(
		'label'       => esc_html__( 'Instagram Settings', 'senior-care-lite' ),
		'section'     => 'senior_care_lite_urls',
		'settings'    => 'senior_care_lite_instagram_heading',
	) ) );
	$wp_customize->add_setting('senior_care_lite_instagram_icon',array(
		'default'	=> 'fab fa-instagram',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control(new Senior_Care_Lite_Fontawesome_Icon_Chooser(
        $wp_customize,'senior_care_lite_instagram_icon',array(
		'label'	=> __('Add Icon','senior-care-lite'),
		'transport' => 'refresh',
		'section'	=> 'senior_care_lite_urls',
		'setting'	=> 'senior_care_lite_instagram_icon',
		'type'		=> 'icon'
	)));
	$wp_customize->add_setting('senior_care_lite_instagram',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw'
	));
	$wp_customize->add_control('senior_care_lite_instagram',array(
		'label' => esc_html__('Add URL','senior-care-lite'),
		'section' => 'senior_care_lite_urls',
		'setting' => 'senior_care_lite_instagram',
		'type'    => 'url'
	));
	$wp_customize->add_setting(
		'senior_care_lite_header_instagram_target',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'senior_care_lite_header_instagram_target',
			array(
				'settings'        => 'senior_care_lite_header_instagram_target',
				'section'         => 'senior_care_lite_urls',
				'label'           => __( 'Open link in a new tab', 'senior-care-lite' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
				'active_callback' => '',
			)
		)
	);

    //Slider
	$wp_customize->add_section( 'senior_care_lite_slider_section' , array(
    	'title'      => __( 'Slider Settings', 'senior-care-lite' ),
		'panel' => 'senior_care_lite_custompage_panel',
	) );
	$wp_customize->add_setting( 'senior_care_lite_section_slide_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Senior_Care_Lite_Customizer_Customcontrol_Section_Heading( $wp_customize, 'senior_care_lite_section_slide_heading', array(
		'label'       => esc_html__( 'Slider Settings', 'senior-care-lite' ),
		'description' => __( 'Slider Image Dimension (1600px x 650px)', 'senior-care-lite' ),		
		'section'     => 'senior_care_lite_slider_section',
		'settings'    => 'senior_care_lite_section_slide_heading',
	) ) );
	$wp_customize->add_setting(
		'senior_care_lite_slider_arrows',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'senior_care_lite_slider_arrows',
			array(
				'settings'        => 'senior_care_lite_slider_arrows',
				'section'         => 'senior_care_lite_slider_section',
				'label'           => __( 'Check To Show Slider', 'senior-care-lite' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
				'active_callback' => '',
			)
		)
	);

	$wp_customize->add_setting('senior_care_lite_slide_heading',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_slide_heading',array(
		'label' => esc_html__('Slider Sub heading','senior-care-lite'),
		'section' => 'senior_care_lite_slider_section',
		'setting' => 'senior_care_lite_slide_heading',
		'type'    => 'text',
	));

	$wp_customize->add_setting('senior_care_lite_slider_sub_heading_color', array(
	    'default' => '#1f294b',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'senior_care_lite_slider_sub_heading_color', array(
	    'section' => 'senior_care_lite_slider_section',
	    'label' => esc_html__('Slider Sub heading Color', 'senior-care-lite'),
	)));

	$wp_customize->add_setting('senior_care_lite_slider_count',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_slider_count',array(
		'label'	=> esc_html__('Slider Count','senior-care-lite'),
		'section'	=> 'senior_care_lite_slider_section',
		'description' => __( 'After increasing/decreasing counter refresh site for changes to be applied.', 'senior-care-lite' ),
		'type'		=> 'number',
	));

	$senior_care_lite_slider_count = get_theme_mod('senior_care_lite_slider_count');

	$args = array('numberposts' => -1);
	$post_list = get_posts($args);
	$i = 0;
	$pst_sls[]= __('Select','senior-care-lite');
	foreach ($post_list as $key => $p_post) {
		$pst_sls[$p_post->ID]=$p_post->post_title;
	}
	for ( $i = 1; $i <= $senior_care_lite_slider_count; $i++ ) {
		$wp_customize->add_setting('senior_care_lite_post_setting'.$i,array(
			'sanitize_callback' => 'senior_care_lite_sanitize_select',
		));
		$wp_customize->add_control('senior_care_lite_post_setting'.$i,array(
			'type'    => 'select',
			'choices' => $pst_sls,
			'label' => __('Select post','senior-care-lite'),
			'section' => 'senior_care_lite_slider_section',
		));
	}
	wp_reset_postdata();

	$wp_customize->add_setting('senior_care_lite_slider_heading_color', array(
	    'default' => '#1f294b',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'senior_care_lite_slider_heading_color', array(
	    'section' => 'senior_care_lite_slider_section',
	    'label' => esc_html__('Slider Title Color', 'senior-care-lite'),
	)));

	$wp_customize->add_setting(
		'senior_care_lite_slider_excerpt_show_hide',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'senior_care_lite_slider_excerpt_show_hide',
			array(
				'settings'        => 'senior_care_lite_slider_excerpt_show_hide',
				'section'         => 'senior_care_lite_slider_section',
				'label'           => __( 'Show Hide excerpt', 'senior-care-lite' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
			)
		)
	);
	$wp_customize->add_setting('senior_care_lite_slider_excerpt_count',array(
		'default'=> 20,
		'transport' => 'refresh',
		'sanitize_callback' => 'senior_care_lite_sanitize_integer'
	));
	$wp_customize->add_control(new Senior_Care_Lite_Slider_Custom_Control( $wp_customize, 'senior_care_lite_slider_excerpt_count',array(
		'label' => esc_html__( 'Excerpt Limit','senior-care-lite' ),
		'section'=> 'senior_care_lite_slider_section',
		'settings'=>'senior_care_lite_slider_excerpt_count',
		'input_attrs' => array(
			'reset'			   => 20,
            'step'             => 1,
			'min'              => 0,
			'max'              => 50,
        ),
	)));
	$wp_customize->add_setting('senior_care_lite_slider_excerpt_color', array(
	    'default' => '#1f294b',
	    'sanitize_callback' => 'sanitize_hex_color',
	    'transport' => 'refresh',
	));

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'senior_care_lite_slider_excerpt_color', array(
	    'section' => 'senior_care_lite_slider_section',
	    'label' => esc_html__('Slider Excerpt Color', 'senior-care-lite'),
	)));
	$wp_customize->add_setting(
		'senior_care_lite_slider_button_show_hide',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'senior_care_lite_slider_button_show_hide',
			array(
				'settings'        => 'senior_care_lite_slider_button_show_hide',
				'section'         => 'senior_care_lite_slider_section',
				'label'           => __( 'Show Hide Button', 'senior-care-lite' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
			)
		)
	);
	$wp_customize->add_setting('senior_care_lite_slider_read_more',array(
		'default' => 'Donate Now',
		'sanitize_callback' => 'sanitize_text_field'
	)); 
	$wp_customize->add_control('senior_care_lite_slider_read_more',array(
		'label' => esc_html__('Button Text','senior-care-lite'),
		'section' => 'senior_care_lite_slider_section',
		'setting' => 'senior_care_lite_slider_read_more',
		'type'    => 'text',
	));

	$wp_customize->add_setting('senior_care_lite_slider_content_alignment',array(
        'default' => 'LEFT-ALIGN',
        'sanitize_callback' => 'senior_care_lite_sanitize_choices'
	));
	$wp_customize->add_control('senior_care_lite_slider_content_alignment',array(
		'type' => 'radio',
		'label'     => __('Slider Content Alignment', 'senior-care-lite'),
		'section' => 'senior_care_lite_slider_section',
		'type' => 'select',
		'choices' => array(
			'LEFT-ALIGN' => __('LEFT','senior-care-lite'),
            'CENTER-ALIGN' => __('CENTER','senior-care-lite'),
            'RIGHT-ALIGN' => __('RIGHT','senior-care-lite'),
		),
	) );

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

	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'senior_care_lite_slider_overlay', array(
	    'section' => 'senior_care_lite_slider_section',
	    'label' => esc_html__('Slider Overlay Color', 'senior-care-lite'),
	)));

	$wp_customize->add_setting('senior_care_lite_slider_opacity',array(
        'default' => '0.6',
        'sanitize_callback' => 'senior_care_lite_sanitize_choices'
	));
	$wp_customize->add_control('senior_care_lite_slider_opacity',array(
		'type' => 'radio',
		'label'     => __('Slider Opacity', 'senior-care-lite'),
		'section' => 'senior_care_lite_slider_section',
		'type' => 'select',
		'choices' => array(
			'0' => __('0','senior-care-lite'),
			'0.1' => __('0.1','senior-care-lite'),
			'0.2' => __('0.2','senior-care-lite'),
			'0.3' => __('0.3','senior-care-lite'),
			'0.4' => __('0.4','senior-care-lite'),
			'0.5' => __('0.5','senior-care-lite'),
			'0.6' => __('0.6','senior-care-lite'),
			'0.7' => __('0.7','senior-care-lite'),
			'0.8' => __('0.8','senior-care-lite'),
			'0.9' => __('0.9','senior-care-lite'),
			'1' => __('1','senior-care-lite')
		),
	) );
	
	// Support Section
	$wp_customize->add_section( 'senior_care_lite_support_section' , array(
    	'title'      => __( 'Support Section Settings', 'senior-care-lite' ),
		'panel' => 'senior_care_lite_custompage_panel',
	) );
	$wp_customize->add_setting( 'senior_care_lite_section_support_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Senior_Care_Lite_Customizer_Customcontrol_Section_Heading( $wp_customize, 'senior_care_lite_section_support_heading', array(
		'label'       => esc_html__( 'Support Section Settings', 'senior-care-lite' ),	
		'section'     => 'senior_care_lite_support_section',
		'settings'    => 'senior_care_lite_section_support_heading',
	) ) );
	$wp_customize->add_setting(
		'senior_care_lite_hide_show_support',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'senior_care_lite_hide_show_support',
			array(
				'settings'        => 'senior_care_lite_hide_show_support',
				'section'         => 'senior_care_lite_support_section',
				'label'           => __( 'Check To Show Support Section', 'senior-care-lite' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting('senior_care_lite_support_text',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_support_text',array(
		'label'	=> esc_html__('Support Text','senior-care-lite'),
		'section'	=> 'senior_care_lite_support_section',
		'type'		=> 'text',
	));
	$wp_customize->add_setting('senior_care_lite_support_phone_number',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_support_phone_number',array(
		'label'	=> esc_html__('Support Contact Info ','senior-care-lite'),
		'section'	=> 'senior_care_lite_support_section',
		'type'		=> 'text',
	));
	$wp_customize->add_setting('senior_care_lite_support_btn_text',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_support_btn_text',array(
		'label'	=> esc_html__('Support Button Text','senior-care-lite'),
		'section'	=> 'senior_care_lite_support_section',
		'type'		=> 'text',
	));
	$wp_customize->add_setting('senior_care_lite_support_btn_link',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));
	$wp_customize->add_control('senior_care_lite_support_btn_link',array(
		'label'	=> esc_html__('Support Button Link','senior-care-lite'),
		'section'	=> 'senior_care_lite_support_section',
		'type'		=> 'url',
	));

	// Event Section
	$wp_customize->add_section( 'senior_care_lite_mission_section' , array(
    	'title'      => __( 'Latest Event Section Settings', 'senior-care-lite' ),
		'panel' => 'senior_care_lite_custompage_panel',
	) );
	$wp_customize->add_setting( 'senior_care_lite_section_event_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Senior_Care_Lite_Customizer_Customcontrol_Section_Heading( $wp_customize, 'senior_care_lite_section_event_heading', array(
		'label'       => esc_html__( 'Latest Event Section Settings', 'senior-care-lite' ),	
		'section'     => 'senior_care_lite_mission_section',
		'settings'    => 'senior_care_lite_section_event_heading',
	) ) );
	$wp_customize->add_setting(
		'senior_care_lite_mission_show_hide',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'senior_care_lite_mission_show_hide',
			array(
				'settings'        => 'senior_care_lite_mission_show_hide',
				'section'         => 'senior_care_lite_mission_section',
				'label'           => __( 'Check To Show Section', 'senior-care-lite' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
				'active_callback' => '',
			)
		)
	);
	$wp_customize->add_setting('senior_care_lite_mission_main_title',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_mission_main_title',array(
		'label'	=> esc_html__('Section Main Title','senior-care-lite'),
		'section'	=> 'senior_care_lite_mission_section',
		'type'		=> 'text',
	));
	$wp_customize->add_setting('senior_care_lite_mission_short_title',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_mission_short_title',array(
		'label'	=> esc_html__('Section Short Title ','senior-care-lite'),
		'section'	=> 'senior_care_lite_mission_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('senior_care_lite_mission_category_setting',array(
		'default' => 'select',
		'sanitize_callback' => 'senior_care_lite_sanitize_select',
	));
	$wp_customize->add_control('senior_care_lite_mission_category_setting',array(
		'type'    => 'select',
		'choices' => $cat_post,
		'label' => esc_html__('Select Category to display events','senior-care-lite'),
		'section' => 'senior_care_lite_mission_section',
	));

	$wp_customize->add_setting('senior_care_lite_mission_category_order_type',array(
        'default' => 'descending',
        'sanitize_callback' => 'senior_care_lite_sanitize_choices'
	));
	$wp_customize->add_control('senior_care_lite_mission_category_order_type',array(
        'type' => 'select',
        'label' => __('Post Order','senior-care-lite'),
        'section' => 'senior_care_lite_mission_section',
        'choices' => array(
            'ascending' => __('Oldest to Newest','senior-care-lite'),
            'descending' => __('Newest to Oldest','senior-care-lite'),
            'a-to-z' => __('A&rarr;Z','senior-care-lite'),
            'z-to-a' => __('Z&rarr;A','senior-care-lite'),
        ),
	) );

	$wp_customize->add_setting('senior_care_lite_service_count',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_service_count',array(
		'label'	=> esc_html__('Post Count','senior-care-lite'),
		'section'	=> 'senior_care_lite_mission_section',
		'type'		=> 'number',
	));

	$wp_customize->add_setting('senior_care_lite_front_date',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'senior_care_lite_front_date',
			array(
				'settings'        => 'senior_care_lite_front_date',
				'section'         => 'senior_care_lite_mission_section',
				'label'           => __( 'Show Date', 'senior-care-lite' ),				
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
			)
		)
	);

	//Footer
    $wp_customize->add_section( 'senior_care_lite_footer_copyright', array(
    	'title'      => esc_html__( 'Footer Text', 'senior-care-lite' ),
    	'panel' => 'senior_care_lite_custompage_panel',
	) );
    $wp_customize->add_setting( 'senior_care_lite_section_footer_heading', array(
		'default'           => '',
		'transport'         => 'refresh',
		'sanitize_callback' => 'sanitize_text_field',
	) );
	$wp_customize->add_control( new Senior_Care_Lite_Customizer_Customcontrol_Section_Heading( $wp_customize, 'senior_care_lite_section_footer_heading', array(
		'label'       => esc_html__( 'Footer Settings', 'senior-care-lite' ),		
		'section'     => 'senior_care_lite_footer_copyright',
		'settings'    => 'senior_care_lite_section_footer_heading',
	) ) );
    $wp_customize->add_setting('senior_care_lite_footer_text',array(
		'default'	=> 'Senior Care WordPress Theme',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('senior_care_lite_footer_text',array(
		'label'	=> esc_html__('Copyright Text','senior-care-lite'),
		'section'	=> 'senior_care_lite_footer_copyright',
		'type'		=> 'textarea'
	));
	$wp_customize->add_setting('senior_care_lite_footer_content_alignment',array(
        'default' => 'CENTER-ALIGN',
        'sanitize_callback' => 'senior_care_lite_sanitize_choices'
	));
	$wp_customize->add_control('senior_care_lite_footer_content_alignment',array(
		'type' => 'radio',
		'label'     => __('Footer Content Alignment', 'senior-care-lite'),
		'section' => 'senior_care_lite_footer_copyright',
		'type' => 'select',
		'choices' => array(
			'LEFT-ALIGN' => __('LEFT','senior-care-lite'),
            'CENTER-ALIGN' => __('CENTER','senior-care-lite'),
            'RIGHT-ALIGN' => __('RIGHT','senior-care-lite'),
		),
	) );

	$wp_customize->add_setting(
		'senior_care_lite_footer_widgets_show_hide',
		array(
			'type'                 => 'option',
			'capability'           => 'edit_theme_options',
			'theme_supports'       => '',
			'default'              => '1',
			'transport'            => 'refresh',
			'sanitize_callback'    => 'senior_care_lite_callback_sanitize_switch',
		)
	);
	$wp_customize->add_control(
		new Senior_Care_Lite_Customizer_Customcontrol_Switch(
			$wp_customize,
			'senior_care_lite_footer_widgets_show_hide',
			array(
				'settings'        => 'senior_care_lite_footer_widgets_show_hide',
				'section'         => 'senior_care_lite_footer_copyright',
				'label'           => __( 'Check To show Footer Widgets', 'senior-care-lite' ),
				'choices'		  => array(
					'1'      => __( 'On', 'senior-care-lite' ),
					'off'    => __( 'Off', 'senior-care-lite' ),
				),
				'active_callback' => '',
			)
		)
	);

	$wp_customize->add_setting('senior_care_lite_footer_widget',array(
        'default' => '4',
        'sanitize_callback' => 'senior_care_lite_sanitize_choices'
	));
	$wp_customize->add_control('senior_care_lite_footer_widget',array(
		'type' => 'radio',
		'label'     => __('Footer Per Column', 'senior-care-lite'),
		'section' => 'senior_care_lite_footer_copyright',
		'type' => 'select',
		'choices' => array(
			'1' => __('1','senior-care-lite'),
            '2' => __('2','senior-care-lite'),
            '3' => __('3','senior-care-lite'),
            '4' => __('4','senior-care-lite'),
		)
	) );