<?php
function lightingshop_blog_setting( $wp_customize ) {
$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
	$wp_customize->add_panel(
		'lightingshop_frontpage_sections', array(
			'priority' => 32,
			'title' => esc_html__( 'Frontpage Sections', 'lighting-shop' ),
		)
	);  
	


	/*=========================================
	Slider Section
	=========================================*/
	$wp_customize->add_section(
		'slider_setting', array(
			'title' => esc_html__( 'Slider Section', 'lighting-shop' ),
			'description'=> __('<a>Note :</a> Image Size Should Be 1500*600','lighting-shop'),
			'priority' => 1,
			'panel' => 'lightingshop_frontpage_sections',
		)
	);



	$wp_customize->add_setting('lightingshop_slider_tabs', array(
	   'sanitize_callback' => 'wp_kses_post',
	));

	$wp_customize->add_control(new lightingshop_Tab_Control($wp_customize, 'lightingshop_slider_tabs', array(
	   'section' => 'slider_setting',
	   'priority' => 2,
	   'buttons' => array(
	      array(
         	'name' => esc_html__('General', 'lighting-shop'),
            'icon' => 'dashicons dashicons-welcome-write-blog',
            'fields' => array(
				'slider_disable_section',
            	'slider1',
            	'slider2',
            	'slider3',
            	'slider4',
            	'slider5',
            	'slider6'
            ),
            'active' => true,
         ), 
	      array(
            'name' => esc_html__('Style', 'lighting-shop'),
        	'icon' => 'dashicons dashicons-art',
            'fields' => array(
                'slider_titlecolor',
                'slider_descriptioncolor',
                'slider_btntxt1color',
				'slider_btnbgcolor',
				'slider_btntxthovercolor',
				'slider_arrowiconcolor',
				'slider_arrowiconhovercolor'

            ),
     	),
		 array(
            'name' => esc_html__('Layout', 'lighting-shop'),
            'icon' => 'dashicons dashicons-layout',
            'fields' => array(
                'lightingshop_slider_section_width',
                'lightingshop_slider_padding',
                'lightingshop_slider_top_padding',
                'lightingshop_slider_bottom_padding'
            ),
         )
	    
    	),
	))); 


	// General Tab

	// hide show slider section
	$wp_customize->add_setting(
        'slider_disable_section',
        array(
            'sanitize_callback' => 'wp_kses_post',
        )
    ); 
    $wp_customize->add_control(
        new lightingshop_Toggle_Switch_Custom_Control(
            $wp_customize,
            'slider_disable_section',
            array(
                'settings'      => 'slider_disable_section',
                'section'       => 'slider_setting',
                'label'         => __( 'Hide Content', 'lighting-shop' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'lighting-shop' ),
                    'off' => __( 'No', 'lighting-shop' )
                ),
            )
        )
    );

	// Slider 1
	$wp_customize->add_setting( 
    	'slider1',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider1',
		array(
		    'label'   		=> __('Slider 1','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);		



	// Slider 2
	$wp_customize->add_setting(
    	'slider2',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 4,
		)
	);	

	$wp_customize->add_control( 
		'slider2',
		array(
		    'label'   		=> __('Slider 2','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);	


	// Slider 3
	$wp_customize->add_setting(
    	'slider3',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 5,
		)
	);	

	$wp_customize->add_control( 
		'slider3',
		array(
		    'label'   		=> __('Slider 3','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);	


	// Slider 4
	$wp_customize->add_setting(
    	'slider4',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 6,
		)
	);	

	$wp_customize->add_control( 
		'slider4',
		array(
		    'label'   		=> __('Slider 4','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);



	// Slider 5
	$wp_customize->add_setting(
    	'slider5',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 7,
		)
	);	

	$wp_customize->add_control( 
		'slider5',
		array(
		    'label'   		=> __('Slider 5','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);

	// Slider 6
	$wp_customize->add_setting(
    	'slider6',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 7,
		)
	);	

	$wp_customize->add_control( 
		'slider6',
		array(
		    'label'   		=> __('Slider 6','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);




	// Style setting


	// slider title Color
	$slidertitlecolor = esc_html__('#fff', 'lighting-shop' );
	$wp_customize->add_setting(
    	'slider_titlecolor',
    	array(
			'default' => $slidertitlecolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_titlecolor',
		array(
		    'label'   		=> __('Title Color','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider description Color
	$sliderdescriptioncolor = esc_html__('#fff', 'lighting-shop' );
	$wp_customize->add_setting(
    	'slider_descriptioncolor',
    	array(
			'default' => $sliderdescriptioncolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_descriptioncolor',
		array(
		    'label'   		=> __('Description Color','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	

	// slider btntxt1 Color
	$sliderbtntxt1color = esc_html__('#fff', 'lighting-shop' );
	$wp_customize->add_setting(
    	'slider_btntxt1color',
    	array(
			'default' => $sliderbtntxt1color,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_btntxt1color',
		array(
		    'label'   		=> __('Button Text Color','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider btnbg Color
	$sliderbtnbgcolor = esc_html__('#ff7b00', 'lighting-shop' );
	$wp_customize->add_setting(
    	'slider_btnbgcolor',
    	array(
			'default' => $sliderbtnbgcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_btnbgcolor',
		array(
		    'label'   		=> __('Button BG Color','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


	// slider btntxthover Color
	$sliderbtntxthovercolor = esc_html__('#000', 'lighting-shop' );
	$wp_customize->add_setting(
    	'slider_btntxthovercolor',
    	array(
			'default' => $sliderbtntxthovercolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_btntxthovercolor',
		array(
		    'label'   		=> __('Button Text Hover Color','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider arrowicon Color
	$sliderarrowiconcolor = esc_html__('#fff', 'lighting-shop' );
	$wp_customize->add_setting(
    	'slider_arrowiconcolor',
    	array(
			'default' => $sliderarrowiconcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_arrowiconcolor',
		array(
		    'label'   		=> __('Arrow Icon Color','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


		// slider arrowicon Hover Color
	$sliderarrowiconhovercolor = esc_html__('#000', 'lighting-shop' );
	$wp_customize->add_setting(
    	'slider_arrowiconhovercolor',
    	array(
			'default' => $sliderarrowiconhovercolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_arrowiconhovercolor',
		array(
		    'label'   		=> __('Arrow Icon Hover Color','lighting-shop'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


	// layout setting

	$wp_customize->add_setting('lightingshop_slider_section_width',array(
        'default' => 'Full Width',
        'sanitize_callback' => 'lightingshop_sanitize_choices',
    ));
    $wp_customize->add_control('lightingshop_slider_section_width',array(
        'type' => 'select',
        'label' => __('Section Width','lighting-shop'),
        'choices' => array (
            'Box Width' => __('Box Width','lighting-shop'),
            'Full Width' => __('Full Width','lighting-shop')
        ),
        'section' => 'slider_setting',
    ));


	// Slider section padding 
	$wp_customize->add_setting('lightingshop_slider_padding',array(
	'sanitize_callback'   => 'esc_html'
	));
	$wp_customize->add_control('lightingshop_slider_padding',array(
	'label' => __('Section Padding','lighting-shop'),
	'section' => 'slider_setting'
	));

	$wp_customize->add_setting('lightingshop_slider_top_padding',array(
		'default' => '0',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('lightingshop_slider_top_padding',array(
		'type' => 'number',
		'label' => __('Top','lighting-shop'),
		'section' => 'slider_setting',
	));

	$wp_customize->add_setting('lightingshop_slider_bottom_padding',array(
		'default' => '0',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('lightingshop_slider_bottom_padding',array(
		'type' => 'number',
		'label' => __('Bottom','lighting-shop'),
		'section' => 'slider_setting',
	));
	

	/*=========================================
	banner Section
	=========================================*/
	$wp_customize->add_section(
		'banner_setting', array(
			'title' => esc_html__( 'Banner Section', 'lighting-shop' ),
			'priority' => 2,
			'panel' => 'lightingshop_frontpage_sections',
		)
	);

	$wp_customize->add_setting('lightingshop_banner_tabs', array(
		'sanitize_callback' => 'wp_kses_post',
	 ));
 
	 $wp_customize->add_control(new lightingshop_Tab_Control($wp_customize, 'lightingshop_banner_tabs', array(
		'section' => 'banner_setting',
		'priority' => 2,
		'buttons' => array(
		   array(
			  'name' => esc_html__('General', 'lighting-shop'),
			 'icon' => 'dashicons dashicons-welcome-write-blog',
			 'fields' => array(
				 'banner_disable_section',
				 'banner1_image',
				 'banner1_offertext',
				 'banner1_title',
				 'banner1_btnlink',
				 'banner2_image',
				 'banner2_offertext',
				 'banner2_title',
				 'banner2_btnlink'
			 ),
			 'active' => true,
		  ),
		   array(
			 'name' => esc_html__('Style', 'lighting-shop'),
			 'icon' => 'dashicons dashicons-art',
			 'fields' => array(
				 'banner_offertextcolor',
				 'banner_titlecolor',
				 'banner_buttntextcolor',
				 'banner_buttonbgcolor',
				 'banner_buttonbghovercolor'
			 ),
		  ),
		  array(
			 'name' => esc_html__('Layout', 'lighting-shop'),
			 'icon' => 'dashicons dashicons-layout',
			 'fields' => array(
				 'lightingshop_banner_section_width',
				 'lightingshop_banner_padding',
				 'lightingshop_banner_top_padding',
				 'lightingshop_banner_bottom_padding',
				 'lightingshop_banner_image_height'
			 ),
		  )
		 
		 ),
	 ))); 


	// General


	// hide show banner section
	$wp_customize->add_setting(
        'banner_disable_section',
        array(
            'sanitize_callback' => 'wp_kses_post',
        )
    ); 
    $wp_customize->add_control(
        new lightingshop_Toggle_Switch_Custom_Control(
            $wp_customize,
            'banner_disable_section',
            array(
                'settings'      => 'banner_disable_section',
                'section'       => 'banner_setting',
                'label'         => __( 'Disable Section', 'lighting-shop' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'lighting-shop' ),
                    'off' => __( 'No', 'lighting-shop' )
                ),
            )
        )
    );


	// banner1image
	$wp_customize->add_setting(
    	'banner1_image',
	    array(
	        'sanitize_callback' => 'esc_url_raw'
	    )
	);
	$wp_customize->add_control(
	    new WP_Customize_Image_Control(
	        $wp_customize,
	        'banner1_image',
	        array(
			    'label'   		=> __('Banner 1 Image','lighting-shop'),
	            'section' => 'banner_setting',
	            'settings' => 'banner1_image'
	        )
	    )
	);

	// banner1offertext 
	$banner1offertext = esc_html__('Get Upto 50% OFF', 'lighting-shop' );
	$wp_customize->add_setting(
    	'banner1_offertext',
    	array(
			'default' => $banner1offertext,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'banner1_offertext',
		array(
		    'label'   		=> __('Banner 1 Offer Text','lighting-shop'),
		    'section'		=> 'banner_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	// banner1title 
	$banner1title = esc_html__('Home sake Lamps', 'lighting-shop' );
	$wp_customize->add_setting(
    	'banner1_title',
    	array(
			'default' => $banner1title,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'banner1_title',
		array(
		    'label'   		=> __('Banner 1 Title','lighting-shop'),
		    'section'		=> 'banner_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	// banner 1 btn link
	$banner1btnlink = esc_html__('', 'lighting-shop' );
	$wp_customize->add_setting(
    	'banner1_btnlink',
    	array(
			'default' => $banner1btnlink,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 7,
		)
	);	

	$wp_customize->add_control( 
		'banner1_btnlink',
		array(
		    'label'   		=> __('Banner Button 1 Link','lighting-shop'),
		    'section'		=> 'banner_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);


	// banner2image
	$wp_customize->add_setting(
    	'banner2_image',
	    array(
	        'sanitize_callback' => 'esc_url_raw'
	    )
	);
	$wp_customize->add_control(
	    new WP_Customize_Image_Control(
	        $wp_customize,
	        'banner2_image',
	        array(
			    'label'   		=> __('Banner 2 Image','lighting-shop'),
	            'section' => 'banner_setting',
	            'settings' => 'banner2_image'
	        )
	    )
	);

	// banner2offertext 
	$banner2offertext = esc_html__('Get Upto 50% OFF', 'lighting-shop' );
	$wp_customize->add_setting(
    	'banner2_offertext',
    	array(
			'default' => $banner2offertext,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'banner2_offertext',
		array(
		    'label'   		=> __('Banner 2 Offer Text','lighting-shop'),
		    'section'		=> 'banner_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	// banner2title 
	$banner2title = esc_html__('Home sake Lamps', 'lighting-shop' );
	$wp_customize->add_setting(
    	'banner2_title',
    	array(
			'default' => $banner2title,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'banner2_title',
		array(
		    'label'   		=> __('Banner 2 Title','lighting-shop'),
		    'section'		=> 'banner_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	// banner 2 btn link
	$banner2btnlink = esc_html__('', 'lighting-shop' );
	$wp_customize->add_setting(
    	'banner2_btnlink',
    	array(
			'default' => $banner2btnlink,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 7,
		)
	);	

	$wp_customize->add_control( 
		'banner2_btnlink',
		array(
		    'label'   		=> __('Banner Button 2 Link','lighting-shop'),
		    'section'		=> 'banner_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);


	//style

	// banner offertext Color
	$banneroffertextcolor = esc_html__('#fff', 'lighting-shop' );
	$wp_customize->add_setting(
    	'banner_offertextcolor',
    	array(
			'default' => $banneroffertextcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'banner_offertextcolor',
		array(
		    'label'   		=> __('Offer Text Color','lighting-shop'),
		    'section'		=> 'banner_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// banner title Color
	$bannertitlecolor = esc_html__('#fff', 'lighting-shop' );
	$wp_customize->add_setting(
    	'banner_titlecolor',
    	array(
			'default' => $bannertitlecolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'banner_titlecolor',
		array(
		    'label'   		=> __('Title Color','lighting-shop'),
		    'section'		=> 'banner_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// banner buttntext Color
	$bannerbuttntextcolor = esc_html__('#000', 'lighting-shop' );
	$wp_customize->add_setting(
    	'banner_buttntextcolor',
    	array(
			'default' => $bannerbuttntextcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'banner_buttntextcolor',
		array(
		    'label'   		=> __('Button Text Color','lighting-shop'),
		    'section'		=> 'banner_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// banner buttonbg Color
	$bannerbuttonbgcolor = esc_html__('#fff', 'lighting-shop' );
	$wp_customize->add_setting(
    	'banner_buttonbgcolor',
    	array(
			'default' => $bannerbuttonbgcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'banner_buttonbgcolor',
		array(
		    'label'   		=> __('Button BG Color','lighting-shop'),
		    'section'		=> 'banner_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// banner buttonbghover Color
	$bannerbuttonbghovercolor = esc_html__('#ff7b00', 'lighting-shop' );
	$wp_customize->add_setting(
    	'banner_buttonbghovercolor',
    	array(
			'default' => $bannerbuttonbghovercolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'banner_buttonbghovercolor',
		array(
		    'label'   		=> __('Button BG Hover Color','lighting-shop'),
		    'section'		=> 'banner_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);



	
	// layout setting

	$wp_customize->add_setting('lightingshop_banner_section_width',array(
        'default' => 'Box Width',
        'sanitize_callback' => 'lightingshop_sanitize_choices',
    ));
    $wp_customize->add_control('lightingshop_banner_section_width',array(
        'type' => 'select',
        'label' => __('Section Width','lighting-shop'),
        'choices' => array (
            'Box Width' => __('Box Width','lighting-shop'),
            'Full Width' => __('Full Width','lighting-shop')
        ),
        'section' => 'banner_setting',
    ));

	// banner section padding 
	$wp_customize->add_setting('lightingshop_banner_padding',array(
	'sanitize_callback'   => 'esc_html'
	));
	$wp_customize->add_control('lightingshop_banner_padding',array(
	'label' => __('Section Padding','lighting-shop'),
	'section' => 'banner_setting'
	));

	$wp_customize->add_setting('lightingshop_banner_top_padding',array(
		'default' => '3',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('lightingshop_banner_top_padding',array(
		'type' => 'number',
		'label' => __('Top','lighting-shop'),
		'section' => 'banner_setting',
	));

	$wp_customize->add_setting('lightingshop_banner_bottom_padding',array(
		'default' => '3',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('lightingshop_banner_bottom_padding',array(
		'type' => 'number',
		'label' => __('Bottom','lighting-shop'),
		'section' => 'banner_setting',
	));
  
	// banner img height
    $wp_customize->add_setting('lightingshop_banner_image_height',array(
        'default' => 330,
        'sanitize_callback' => 'lightingshop_sanitize_float'
    ));
    $wp_customize->add_control(new lightingshop_Custom_Control( $wp_customize, 'lightingshop_banner_image_height',array(
	    'label' => __('Image Height','lighting-shop'),
	    'section' => 'banner_setting',
	    'input_attrs' => array(
	            'min' => 0,
	            'max' => 500,
	            'step' => 1,
	        ),
    )));


	/*=========================================
	featuredproduct Section
	=========================================*/
	$wp_customize->add_section(
		'featuredproduct_setting', array(
			'title' => esc_html__( 'Featured Product Section', 'lighting-shop' ),
			'priority' => 2,
			'panel' => 'lightingshop_frontpage_sections',
		)
	);

	$wp_customize->add_setting('lightingshop_featuredproduct_tabs', array(
		'sanitize_callback' => 'wp_kses_post',
	 ));
 
	 $wp_customize->add_control(new lightingshop_Tab_Control($wp_customize, 'lightingshop_featuredproduct_tabs', array(
		'section' => 'featuredproduct_setting',
		'priority' => 2,
		'buttons' => array(
		   array(
			  'name' => esc_html__('General', 'lighting-shop'),
			 'icon' => 'dashicons dashicons-welcome-write-blog',
			 'fields' => array(
				'featured_disable_section',
				'featuredproduct_heading',
				'featuredproduct_subheading'
			 ),
			 'active' => true,
		  ),
		   array(
			 'name' => esc_html__('Style', 'lighting-shop'),
			 'icon' => 'dashicons dashicons-art',
			 'fields' => array(
				 'featuredproduct_headingcolor',
				 'featuredproduct_headingbrdcolor',
				 'featuredproduct_subheadingcolor',
				 'featuredproduct_titlecolor',
				 'featuredproduct_regularpricecolor',
				 'featuredproduct_salepricecolor'
			 ),
		  ),
		  array(
			 'name' => esc_html__('Layout', 'lighting-shop'),
			 'icon' => 'dashicons dashicons-layout',
			 'fields' => array(
				 'lightingshop_featuredproduct_section_width',
				 'lightingshop_featuredproduct_padding',
				 'lightingshop_featuredproduct_top_padding',
				 'lightingshop_featuredproduct_bottom_padding',
				 'lightingshop_featuredproduct_image_height'
			 ),
		  )
		 
		 ),
	 ))); 


	//  Genral Settings

	// hide show featured section
	$wp_customize->add_setting(
        'featured_disable_section',
        array(
            'sanitize_callback' => 'wp_kses_post',
        )
    ); 
    $wp_customize->add_control(
        new lightingshop_Toggle_Switch_Custom_Control(
            $wp_customize,
            'featured_disable_section',
            array(
                'settings'      => 'featured_disable_section',
                'section'       => 'featuredproduct_setting',
                'label'         => __( 'Disable Section', 'lighting-shop' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'lighting-shop' ),
                    'off' => __( 'No', 'lighting-shop' )
                ),
            )
        )
    );

	// featuredproduct title
	$featuredproductheading = esc_html__('Featured Products', 'lighting-shop' );
	$wp_customize->add_setting(
    	'featuredproduct_heading',
    	array(
			'default' => $featuredproductheading,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'featuredproduct_heading',
		array(
		    'label'   		=> __('Heading','lighting-shop'),
		    'section'		=> 'featuredproduct_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	// featuredproduct subtitle
	$featuredproductsubheading = esc_html__('Made with care for your little ones, our products are perfect for every occasion.', 'lighting-shop' );
	$wp_customize->add_setting(
    	'featuredproduct_subheading',
    	array(
			'default' => $featuredproductsubheading,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'featuredproduct_subheading',
		array(
		    'label'   		=> __('Sub Heading','lighting-shop'),
		    'section'		=> 'featuredproduct_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	

	// Style setting

	// featuredproduct heading Color
	$featuredproductheadingcolor = esc_html__('#000', 'lighting-shop' );
	$wp_customize->add_setting(
    	'featuredproduct_headingcolor',
    	array(
			'default' => $featuredproductheadingcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproduct_headingcolor',
		array(
		    'label'   		=> __('Heading Color','lighting-shop'),
		    'section'		=> 'featuredproduct_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	
	// featuredproduct headingbrd Color
	$featuredproductheadingbrdcolor = esc_html__('#ff7b00', 'lighting-shop' );
	$wp_customize->add_setting(
    	'featuredproduct_headingbrdcolor',
    	array(
			'default' => $featuredproductheadingbrdcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproduct_headingbrdcolor',
		array(
		    'label'   		=> __('Heading Border Color','lighting-shop'),
		    'section'		=> 'featuredproduct_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


	// featuredproduct subheading Color
	$featuredproductsubheadingcolor = esc_html__('#757272', 'lighting-shop' );
	$wp_customize->add_setting(
    	'featuredproduct_subheadingcolor',
    	array(
			'default' => $featuredproductsubheadingcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproduct_subheadingcolor',
		array(
		    'label'   		=> __('Sub Heading Color','lighting-shop'),
		    'section'		=> 'featuredproduct_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproduct title Color
	$featuredproducttitlecolor = esc_html__('#000', 'lighting-shop' );
	$wp_customize->add_setting(
    	'featuredproduct_titlecolor',
    	array(
			'default' => $featuredproducttitlecolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproduct_titlecolor',
		array(
		    'label'   		=> __('Title Color','lighting-shop'),
		    'section'		=> 'featuredproduct_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproduct price Color
	$featuredproductpricecolor = esc_html__('#979191', 'lighting-shop' );
	$wp_customize->add_setting(
    	'featuredproduct_regularpricecolor',
    	array(
			'default' => $featuredproductpricecolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproduct_regularpricecolor',
		array(
		    'label'   		=> __('Regular Price Color','lighting-shop'),
		    'section'		=> 'featuredproduct_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproduct price Color
	$featuredproductpricecolor = esc_html__('#ff7b00', 'lighting-shop' );
	$wp_customize->add_setting(
    	'featuredproduct_salepricecolor',
    	array(
			'default' => $featuredproductpricecolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproduct_salepricecolor',
		array(
		    'label'   		=> __('Sale Price Color','lighting-shop'),
		    'section'		=> 'featuredproduct_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// layout setting

	$wp_customize->add_setting('lightingshop_featuredproduct_section_width',array(
		'default' => 'Box Width',
		'sanitize_callback' => 'lightingshop_sanitize_choices',
	));
	$wp_customize->add_control('lightingshop_featuredproduct_section_width',array(
		'type' => 'select',
		'label' => __('Section Width','lighting-shop'),
		'choices' => array (
			'Box Width' => __('Box Width','lighting-shop'),
			'Full Width' => __('Full Width','lighting-shop')
		),
		'section' => 'featuredproduct_setting',
	));
		
	// featuredproduct section padding 
	$wp_customize->add_setting('lightingshop_featuredproduct_padding',array(
		'sanitize_callback'   => 'esc_html'
	));
	$wp_customize->add_control('lightingshop_featuredproduct_padding',array(
		'label' => __('Section Padding','lighting-shop'),
		'section' => 'featuredproduct_setting'
	));

	$wp_customize->add_setting('lightingshop_featuredproduct_top_padding',array(
		'default' => '2',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('lightingshop_featuredproduct_top_padding',array(
		'type' => 'number',
		'label' => __('Top','lighting-shop'),
		'section' => 'featuredproduct_setting',
	));

	$wp_customize->add_setting('lightingshop_featuredproduct_bottom_padding',array(
		'default' => '1',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('lightingshop_featuredproduct_bottom_padding',array(
		'type' => 'number',
		'label' => __('Bottom','lighting-shop'),
		'section' => 'featuredproduct_setting',
	));

	// featuredproduct img height
    $wp_customize->add_setting('lightingshop_featuredproduct_image_height',array(
        'default' => 300,
        'sanitize_callback' => 'lightingshop_sanitize_float'
    ));
    $wp_customize->add_control(new lightingshop_Custom_Control( $wp_customize, 'lightingshop_featuredproduct_image_height',array(
	    'label' => __('Image Height','lighting-shop'),
	    'section' => 'featuredproduct_setting',
	    'input_attrs' => array(
	            'min' => 0,
	            'max' => 500,
	            'step' => 1,
	        ),
    )));

	$wp_customize->register_control_type('lightingshop_Tab_Control');

}

add_action( 'customize_register', 'lightingshop_blog_setting' );

// service selective refresh
function lightingshop_blog_section_partials( $wp_customize ){	
	// blog_title
	$wp_customize->selective_refresh->add_partial( 'blog_title', array(
		'selector'            => '.home-blog .title h6',
		'settings'            => 'blog_title',
		'render_callback'  => 'lightingshop_blog_title_render_callback',
	
	) );
	
	// blog_subtitle
	$wp_customize->selective_refresh->add_partial( 'blog_subtitle', array(
		'selector'            => '.home-blog .title h2',
		'settings'            => 'blog_subtitle',
		'render_callback'  => 'lightingshop_blog_subtitle_render_callback',
	
	) );
	
	// blog_description
	$wp_customize->selective_refresh->add_partial( 'blog_description', array(
		'selector'            => '.home-blog .title p',
		'settings'            => 'blog_description',
		'render_callback'  => 'lightingshop_blog_description_render_callback',
	
	) );	
	}

add_action( 'customize_register', 'lightingshop_blog_section_partials' );

// blog_title
function lightingshop_blog_title_render_callback() {
	return get_theme_mod( 'blog_title' );
}

// blog_subtitle
function lightingshop_blog_subtitle_render_callback() {
	return get_theme_mod( 'blog_subtitle' );
}

// service description
function lightingshop_blog_description_render_callback() {
	return get_theme_mod( 'blog_description' );
}


