<?php
function watersports_blog_setting( $wp_customize ) {
$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
	$wp_customize->add_panel(
		'watersports_frontpage_sections', array(
			'priority' => 32,
			'title' => esc_html__( 'Frontpage Sections', 'water-sports' ),
		)
	);
	


	/*=========================================
	Slider Section
	=========================================*/
	$wp_customize->add_section(
		'slider_setting', array(
			'title' => esc_html__( 'Slider Section', 'water-sports' ),
			'description'=> __('<a>Note :</a> Image Size Should Be 3000*2000','water-sports'),
			'priority' => 1,
			'panel' => 'watersports_frontpage_sections',
		)
	);



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

	$wp_customize->add_control(new watersports_Tab_Control($wp_customize, 'watersports_slider_tabs', array(
	   'section' => 'slider_setting',
	   'priority' => 2,
	   'buttons' => array(
	      array(
         	'name' => esc_html__('General', 'water-sports'),
            'icon' => 'dashicons dashicons-welcome-write-blog',
            'fields' => array(
            	'slider1',
            	'slider2',
            	'slider3',
            	'slider4',
            	'slider5',
            	'slider6'
            ),
            'active' => true,
         ), 
	      array(
            'name' => esc_html__('Style', 'water-sports'),
        	'icon' => 'dashicons dashicons-art',
            'fields' => array(
				'slider_headingcolor',
                'slider_descriptioncolor',
				'slider_btntextcolor',
				'slider_btnbgcolor',
				'slider_btntexthrvcolor',
				'slider_arrowiconbrdcolor',
				'slider_arrowiconbgcolor'
            ),
     	)
	    
    	),
	))); 


	

	// General Tab

	// 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','water-sports'),
		    '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','water-sports'),
		    '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','water-sports'),
		    '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','water-sports'),
		    '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','water-sports'),
		    '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','water-sports'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);



	// Style setting

	// slider heading Color
	$sliderheadingcolor = esc_html__('#FC5307', 'water-sports' );
	$wp_customize->add_setting(
    	'slider_headingcolor',
    	array(
			'default' => $sliderheadingcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_headingcolor',
		array(
		    'label'   		=> __('Heading Color','water-sports'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider description Color
	$sliderdescriptioncolor = esc_html__('#000', 'water-sports' );
	$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','water-sports'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider btntext Color
	$sliderbtntextcolor = esc_html__('#fff', 'water-sports' );
	$wp_customize->add_setting(
    	'slider_btntextcolor',
    	array(
			'default' => $sliderbtntextcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_btntextcolor',
		array(
		    'label'   		=> __('Button Text Color','water-sports'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider btnbg Color
	$sliderbtnbgcolor = esc_html__('#FC5307', 'water-sports' );
	$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','water-sports'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider btntexthrv Color
	$sliderbtntexthrvcolor = esc_html__('#000', 'water-sports' );
	$wp_customize->add_setting(
    	'slider_btntexthrvcolor',
    	array(
			'default' => $sliderbtntexthrvcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

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

	// slider arrowiconbrd Color
	$sliderarrowiconbrdcolor = esc_html__('#1988C3', 'water-sports' );
	$wp_customize->add_setting(
    	'slider_arrowiconbrdcolor',
    	array(
			'default' => $sliderarrowiconbrdcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_arrowiconbrdcolor',
		array(
		    'label'   		=> __('Arrow Icon & Border Color','water-sports'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider arrowiconbg Color
	$sliderarrowiconbgcolor = esc_html__('#fff', 'water-sports' );
	$wp_customize->add_setting(
    	'slider_arrowiconbgcolor',
    	array(
			'default' => $sliderarrowiconbgcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_arrowiconbgcolor',
		array(
		    'label'   		=> __('Arrow BG Color','water-sports'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	
	
	
	/*=========================================
	aboutus Section
	=========================================*/
	$wp_customize->add_section(
		'aboutus_setting', array(
			'title' => esc_html__( 'AboutUs Section', 'water-sports' ),
			'priority' => 2,
			'panel' => 'watersports_frontpage_sections',
		)
	);

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

	$wp_customize->add_control(new watersports_Tab_Control($wp_customize, 'watersports_aboutus_tabs', array(
	   'section' => 'aboutus_setting',
	   'priority' => 2,
	   'buttons' => array(
	      array(
         	'name' => esc_html__('General', 'water-sports'),
            'icon' => 'dashicons dashicons-welcome-write-blog',
            'fields' => array(
            	'aboutus_image',
				'aboutus_subheading',
				'aboutus_heading',
				'aboutus_headingspan',
				'aboutus_description',
            	'aboutus_readmorebtn_link'
            ),
            'active' => true,
         ),
	      array(
            'name' => esc_html__('Style', 'water-sports'),
        	'icon' => 'dashicons dashicons-art',
            'fields' => array(
				'aboutus_subheadingcolor',
				'aboutus_headingspancolor',
				'aboutus_headingcolor',
				'aboutus_descriptioncolor',
				'aboutus_btntextcolor',
				'aboutus_btnbgcolor1',
				'aboutus_btntexthovercolor'
            ),
     	),
		 array(
		   'name' => esc_html__('Layout', 'water-sports'),
		   'icon' => 'dashicons dashicons-layout',
		   'fields' => array(
			   'water_sports_aboutus_section_width',
			   'watersports_aboutus_padding',
			   'water_sports_aboutus_top_padding',
			   'water_sports_aboutus_bottom_padding'
		   ),
		)
	    
    	),
	))); 


	// aboutus_image
	$wp_customize->add_setting(
    	'aboutus_image',
	    array(
	        'sanitize_callback' => 'esc_url_raw'
	    )
	);
	$wp_customize->add_control(
	    new WP_Customize_Image_Control(
	        $wp_customize,
	        'aboutus_image',
	        array(
			    'label'   		=> __('Image 1','water-sports'),
				'description'=> __('Image Size Should Be 769*468','water-sports'),
	            'section' => 'aboutus_setting',
	            'settings' => 'aboutus_image'
	        )
	    )
	);


	// aboutus_subheading
	$wp_customize->add_setting(
    	'aboutus_subheading',
    	array(
			'default' => '',
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_subheading',
		array(
		    'label'   		=> __('Sub Heading','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	// aboutus_headingspan
	$wp_customize->add_setting(
    	'aboutus_headingspan',
    	array(
			'default' => '',
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_headingspan',
		array(
		    'label'   		=> __('Heading Span','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	// aboutus_heading
	$wp_customize->add_setting(
    	'aboutus_heading',
    	array(
			'default' => '',
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_heading',
		array(
		    'label'   		=> __('Heading','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	
	// aboutus_description
	$wp_customize->add_setting(
    	'aboutus_description',
    	array(
			'default' => '',
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_description',
		array(
		    'label'   		=> __('Description','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	// aboutus_readmorebtn_link
	$aboutusreadmorebtnlink = esc_html__('#', 'water-sports' );
	$wp_customize->add_setting(
    	'aboutus_readmorebtn_link',
    	array(
			'default' => $aboutusreadmorebtnlink,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 7,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_readmorebtn_link',
		array(
		    'label'   		=> __('Read More Button Link','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);

	//style


	// aboutus subheading Color
	$aboutussubheadingcolor = esc_html__('#2E2E2E', 'water-sports' );
	$wp_customize->add_setting(
    	'aboutus_subheadingcolor',
    	array(
			'default' => $aboutussubheadingcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_subheadingcolor',
		array(
		    'label'   		=> __('Sub Heading Color','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// aboutus headingspan Color
	$aboutusheadingspancolor = esc_html__('#FC5307', 'water-sports' );
	$wp_customize->add_setting(
    	'aboutus_headingspancolor',
    	array(
			'default' => $aboutusheadingspancolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_headingspancolor',
		array(
		    'label'   		=> __('Heading Span Color','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// aboutus heading Color
	$aboutusheadingcolor = esc_html__('#1988C3', 'water-sports' );
	$wp_customize->add_setting(
    	'aboutus_headingcolor',
    	array(
			'default' => $aboutusheadingcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_headingcolor',
		array(
		    'label'   		=> __('Heading Color','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// aboutus description Color
	$aboutusdescriptioncolor = esc_html__('#292727', 'water-sports' );
	$wp_customize->add_setting(
    	'aboutus_descriptioncolor',
    	array(
			'default' => $aboutusdescriptioncolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_descriptioncolor',
		array(
		    'label'   		=> __('Description Color','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


	// aboutus btntext Color
	$aboutusbtntextcolor = esc_html__('#fff', 'water-sports' );
	$wp_customize->add_setting(
    	'aboutus_btntextcolor',
    	array(
			'default' => $aboutusbtntextcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_btntextcolor',
		array(
		    'label'   		=> __('Button Text Color','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// aboutus btnbg Color 1
	$aboutusbtnbgcolor1 = esc_html__('#FC5307', 'water-sports' );
	$wp_customize->add_setting(
    	'aboutus_btnbgcolor1',
    	array(
			'default' => $aboutusbtnbgcolor1,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_btnbgcolor1',
		array(
		    'label'   		=> __('Button BG Color','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


	// aboutus btntexthover Color
	$aboutusbtntexthovercolor = esc_html__('#000', 'water-sports' );
	$wp_customize->add_setting(
    	'aboutus_btntexthovercolor',
    	array(
			'default' => $aboutusbtntexthovercolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_btntexthovercolor',
		array(
		    'label'   		=> __('Button Text Hover Color','water-sports'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


	// aboutus layout setting
	$wp_customize->add_setting('water_sports_aboutus_section_width',array(
		'default' => 'Box Width',
		'sanitize_callback' => 'watersports_sanitize_choices',
	));
	$wp_customize->add_control('water_sports_aboutus_section_width',array(
		'type' => 'select',
		'label' => __('Section Width','water-sports'),
		'choices' => array (
			'Box Width' => __('Box Width','water-sports'),
			'Full Width' => __('Full Width','water-sports')
		),
		'section' => 'aboutus_setting',
	));


	// aboutus section padding 
	$wp_customize->add_setting('watersports_aboutus_padding',array(
		'sanitize_callback'   => 'esc_html'
	));
	$wp_customize->add_control('watersports_aboutus_padding',array(
		'label' => __('Section Padding','water-sports'),
		'section' => 'aboutus_setting'
	));

	$wp_customize->add_setting('water_sports_aboutus_top_padding',array(
		'default' => '5',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('water_sports_aboutus_top_padding',array(
		'type' => 'number',
		'label' => __('Top','water-sports'),
		'section' => 'aboutus_setting',
	));

		$wp_customize->add_setting('water_sports_aboutus_bottom_padding',array(
		'default' => '2',
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('water_sports_aboutus_bottom_padding',array(
		'type' => 'number',
		'label' => __('Bottom','water-sports'),
		'section' => 'aboutus_setting',
	));
	


	/*=========================================
	Service Section
	=========================================*/
	$wp_customize->add_section(
		'Service_setting', array(
			'title' => esc_html__( 'Service Section', 'water-sports' ),
			'priority' => 2,
			'panel' => 'watersports_frontpage_sections',
		)
	);



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

	$wp_customize->add_control(new watersports_Tab_Control($wp_customize, 'watersports_Service_tabs', array(
	   'section' => 'Service_setting',
	   'priority' => 2,
	   'buttons' => array(
	      array(
         	'name' => esc_html__('General', 'water-sports'),
            'icon' => 'dashicons dashicons-welcome-write-blog',
            'fields' => array(
            	'service_heading',
				'service_headingspan',
            	'Service1',
            	'Service2',
            	'Service3',
				'Service4',
            	'Service5',
            	'Service6'

			),
            'active' => true,
         ),
	      array(
            'name' => esc_html__('Style', 'water-sports'),
        	'icon' => 'dashicons dashicons-art',
            'fields' => array(
				'service_headingcolor',
				'service_headingspancolor',
				'service_boxbordercolor',
            	'service_boxtitlecolorcolor',
				'service_descriptioncolor',
            	'service_btntextcolor',
				'service_btnbgcolor',
				'service_btntexthrvcolor'
            ),
     	),
  		array(
	        'name' => esc_html__('Layout', 'water-sports'),
	        'icon' => 'dashicons dashicons-layout',
	        'fields' => array(
	            'water_sports_service_section_width',
	            'watersports_service_padding',
	            'water_sports_service_top_padding',
	            'water_sports_service_bottom_padding'
	        ),
     	)
	    
    	),
	))); 



	// General

    // service title
	$wp_customize->add_setting(
    	'service_heading',
    	array(
			'default' => '',
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'service_heading',
		array(
		    'label'   		=> __('Heading','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	// service headingspan span
	$wp_customize->add_setting(
    	'service_headingspan',
    	array(
			'default' => '',
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'service_headingspan',
		array(
		    'label'   		=> __('Heading Span','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	


	// Service 1
	$wp_customize->add_setting( 
    	'Service1',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'Service1',
		array(
		    'label'   		=> __('Service 1','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);		


	// Service 2
	$wp_customize->add_setting(
    	'Service2',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 2,
		)
	);	

	$wp_customize->add_control( 
		'Service2',
		array(
		    'label'   		=> __('Service 2','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);	


	// Service 3
	$wp_customize->add_setting(
    	'Service3',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'Service3',
		array(
		    'label'   		=> __('Service 3','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);	


	// Service 4
	$wp_customize->add_setting(
    	'Service4',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 4,
		)
	);	

	$wp_customize->add_control( 
		'Service4',
		array(
		    'label'   		=> __('Service 4','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);	

	// Service 5
	$wp_customize->add_setting(
    	'Service5',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 5,
		)
	);	

	$wp_customize->add_control( 
		'Service5',
		array(
		    'label'   		=> __('Service 5','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);	

	// Service 6
	$wp_customize->add_setting(
    	'Service6',
    	array(
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 6,
		)
	);	

	$wp_customize->add_control( 
		'Service6',
		array(
		    'label'   		=> __('Service 6','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'dropdown-pages',
			'transport'         => $selective_refresh,
		)  
	);	

	

	// style

	// service headingcolor color
	$serviceheadingcolor = esc_html__('#1988C3', 'water-sports' );
	$wp_customize->add_setting(
    	'service_headingcolor',
    	array(
			'default' => $serviceheadingcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 4,
		)
	);	

	$wp_customize->add_control( 
		'service_headingcolor',
		array(
		    'label'   		=> __('Heading Color','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// service headingspancolor color
	$serviceheadingspancolor = esc_html__('#FC5307', 'water-sports' );
	$wp_customize->add_setting(
    	'service_headingspancolor',
    	array(
			'default' => $serviceheadingspancolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 4,
		)
	);	

	$wp_customize->add_control( 
		'service_headingspancolor',
		array(
		    'label'   		=> __('Heading Span Color','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// service boxbordercolor color
	$serviceboxbordercolor = esc_html__('#1988C3', 'water-sports' );
	$wp_customize->add_setting(
    	'service_boxbordercolor',
    	array(
			'default' => $serviceboxbordercolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 4,
		)
	);	

	$wp_customize->add_control( 
		'service_boxbordercolor',
		array(
		    'label'   		=> __('Box Border Color','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


	// service boxtitlecolor color
	$serviceboxtitlecolorcolor = esc_html__('#1988C3', 'water-sports' );
	$wp_customize->add_setting(
    	'service_boxtitlecolorcolor',
    	array(
			'default' => $serviceboxtitlecolorcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 4,
		)
	);	

	$wp_customize->add_control( 
		'service_boxtitlecolorcolor',
		array(
		    'label'   		=> __('Title Color','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// service descriptioncolor color
	$servicedescriptioncolor = esc_html__('#707070', 'water-sports' );
	$wp_customize->add_setting(
    	'service_descriptioncolor',
    	array(
			'default' => $servicedescriptioncolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 4,
		)
	);	

	$wp_customize->add_control( 
		'service_descriptioncolor',
		array(
		    'label'   		=> __('Description Color','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// service btntext color
	$servicebtntextcolor = esc_html__('#fff', 'water-sports' );
	$wp_customize->add_setting(
    	'service_btntextcolor',
    	array(
			'default' => $servicebtntextcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 4,
		)
	);	

	$wp_customize->add_control( 
		'service_btntextcolor',
		array(
		    'label'   		=> __('Button Text Color','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// service btnbg color
	$servicebtnbgcolor = esc_html__('#FC5307', 'water-sports' );
	$wp_customize->add_setting(
    	'service_btnbgcolor',
    	array(
			'default' => $servicebtnbgcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 4,
		)
	);	

	$wp_customize->add_control( 
		'service_btnbgcolor',
		array(
		    'label'   		=> __('Button BG Color','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// service btntexthrv color
	$servicebtntexthrvcolor = esc_html__('#000', 'water-sports' );
	$wp_customize->add_setting(
    	'service_btntexthrvcolor',
    	array(
			'default' => $servicebtntexthrvcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 4,
		)
	);	

	$wp_customize->add_control( 
		'service_btntexthrvcolor',
		array(
		    'label'   		=> __('Button Text Hover Color','water-sports'),
		    'section'		=> 'Service_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	
	// layout setting
	$wp_customize->add_setting('water_sports_service_section_width',array(
        'default' => 'Box Width',
        'sanitize_callback' => 'watersports_sanitize_choices',
    ));
    $wp_customize->add_control('water_sports_service_section_width',array(
        'type' => 'select',
        'label' => __('Section Width','water-sports'),
        'choices' => array (
            'Box Width' => __('Box Width','water-sports'),
            'Full Width' => __('Full Width','water-sports')
        ),
        'section' => 'Service_setting',
    ));


    // service section padding 
	$wp_customize->add_setting('watersports_service_padding',array(
      'sanitize_callback'   => 'esc_html'
    ));
    $wp_customize->add_control('watersports_service_padding',array(
      'label' => __('Section Padding','water-sports'),
      'section' => 'Service_setting'
    ));

    $wp_customize->add_setting('water_sports_service_top_padding',array(
        'default' => '5',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('water_sports_service_top_padding',array(
	    'type' => 'number',
	    'label' => __('Top','water-sports'),
	    'section' => 'Service_setting',
    ));

 	$wp_customize->add_setting('water_sports_service_bottom_padding',array(
        'default' => '2',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('water_sports_service_bottom_padding',array(
	    'type' => 'number',
	    'label' => __('Bottom','water-sports'),
	    'section' => 'Service_setting',
    ));


	$wp_customize->register_control_type('watersports_Tab_Control');

}

add_action( 'customize_register', 'watersports_blog_setting' );

// service selective refresh
function watersports_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'  => 'watersports_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'  => 'watersports_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'  => 'watersports_blog_description_render_callback',
	
	) );	
	}

add_action( 'customize_register', 'watersports_blog_section_partials' );

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

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

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


