<?php
function freshfoodrestaurant_blog_setting( $wp_customize ) {
$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
	$wp_customize->add_panel(
		'freshfoodrestaurant_frontpage_sections', array(
			'priority' => 32,
			'title' => esc_html__( 'Frontpage Sections', 'fresh-food-restaurant' ),
		)
	);
	 

	/*=========================================
	Slider Section
	=========================================*/
	$wp_customize->add_section(
		'slider_setting', array(
			'title' => esc_html__( 'Slider Section', 'fresh-food-restaurant' ),
			'description'=> __('<a>Note :</a> Image Size Should Be 1016*1016px','fresh-food-restaurant'),
			'priority' => 1,
			'panel' => 'freshfoodrestaurant_frontpage_sections',
		)
	);


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

	$wp_customize->add_control(new freshfoodrestaurant_Tab_Control($wp_customize, 'freshfoodrestaurant_slider_tabs', array(
	   'section' => 'slider_setting',
	   'priority' => 2,
	   'buttons' => array(
	      array(
         	'name' => esc_html__('General', 'fresh-food-restaurant'),
            'icon' => 'dashicons dashicons-welcome-write-blog',
            'fields' => array(
            	'slider1',
            	'slider2',
            	'slider3',
            	'slider4',
            	'slider5',
            	'slider6',
				'slider_btntext1',
				'slider_btnlink1',
				'slider_btntext2',
				'slider_btnlink2'
            ),
            'active' => true,
         ), 
	      array(
            'name' => esc_html__('Style', 'fresh-food-restaurant'),
        	'icon' => 'dashicons dashicons-art',
            'fields' => array(
                'slider_titlecolor',
                'slider_descriptioncolor',
                'slider_btntxt1color',
				'slider_btn1bgcolor',
				'slider_btn1txthrvcolor',
				'slider_btntxt2color',
				'slider_btn2txthrvcolor',
				'slider_arrowiconcolor',
				'slider_arrowiconbgcolor',
				'slider_arrowiconhrvcolor'

            ),
     	)
	    
    	),
	))); 


	

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

	// slider btntext1
	$sliderbtntext1 = esc_html__('PICK UP', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'slider_btntext1',
    	array(
			'default' => $sliderbtntext1,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 7,
		)
	);	

	$wp_customize->add_control( 
		'slider_btntext1',
		array(
		    'label'   		=> __('Button 1 Text','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);


	// slider btnlink1
	$sliderbtnlink1 = esc_html__('#', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'slider_btnlink1',
    	array(
			'default' => $sliderbtnlink1,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 7,
		)
	);	

	$wp_customize->add_control( 
		'slider_btnlink1',
		array(
		    'label'   		=> __('Button 1 Link','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);

	// slider btntext2
	$sliderbtntext2 = esc_html__('DELIVERY', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'slider_btntext2',
    	array(
			'default' => $sliderbtntext2,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 7,
		)
	);	

	$wp_customize->add_control( 
		'slider_btntext2',
		array(
		    'label'   		=> __('Button 2 Text','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);


	// slider btnlink2
	$sliderbtnlink2 = esc_html__('#', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'slider_btnlink2',
    	array(
			'default' => $sliderbtnlink2,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 7,
		)
	);	

	$wp_customize->add_control( 
		'slider_btnlink2',
		array(
		    'label'   		=> __('Button 2 Link','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);



	// Style setting

	// slider title Color
	$slidertitlecolor = esc_html__('#000', 'fresh-food-restaurant' );
	$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','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


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

	// slider btntxt1 Color
	$sliderbtntxt1color = esc_html__('#000', 'fresh-food-restaurant' );
	$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 1 Text Color','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider btn1bg Color
	$sliderbtn1bgcolor = esc_html__('#FE9900', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'slider_btn1bgcolor',
    	array(
			'default' => $sliderbtn1bgcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_btn1bgcolor',
		array(
		    'label'   		=> __('Button 1 BG Color','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


	// slider btn1txthrv Color
	$sliderbtn1txthrvcolor = esc_html__('#fff', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'slider_btn1txthrvcolor',
    	array(
			'default' => $sliderbtn1txthrvcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_btn1txthrvcolor',
		array(
		    'label'   		=> __('Button 1 Text Hover Color','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider btntxt2 Color
	$sliderbtntxt2color = esc_html__('#000', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'slider_btntxt2color',
    	array(
			'default' => $sliderbtntxt2color,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_btntxt2color',
		array(
		    'label'   		=> __('Button 2 Text Color','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider btn2txthrv Color
	$sliderbtn2txthrvcolor = esc_html__('#FE9900', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'slider_btn2txthrvcolor',
    	array(
			'default' => $sliderbtn2txthrvcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_btn2txthrvcolor',
		array(
		    'label'   		=> __('Button 2 Text Hover Color','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider arrowicon Color
	$sliderarrowiconcolor = esc_html__('#FE9900', 'fresh-food-restaurant' );
	$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'   		=> __('Arrows Icon Color','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider arrowiconbg Color
	$sliderarrowiconbgcolor = esc_html__('#fff', 'fresh-food-restaurant' );
	$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'   		=> __('Arrows Icon BG Color','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// slider arrowiconhrv Color
	$sliderarrowiconhrvcolor = esc_html__('#002434', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'slider_arrowiconhrvcolor',
    	array(
			'default' => $sliderarrowiconhrvcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'slider_arrowiconhrvcolor',
		array(
		    'label'   		=> __('Arrows Icon Hover Color','fresh-food-restaurant'),
		    'section'		=> 'slider_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);
	
	/*=========================================
	featuredproducts Section
	=========================================*/
	$wp_customize->add_section(
		'featuredproducts_setting', array(
			'title' => esc_html__( 'Featured Products Section', 'fresh-food-restaurant' ),
			'priority' => 2,
			'panel' => 'freshfoodrestaurant_frontpage_sections',
		)
	);
	

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

	$wp_customize->add_control(new freshfoodrestaurant_Tab_Control($wp_customize, 'freshfoodrestaurant_featuredproducts_tabs', array(
	   'section' => 'featuredproducts_setting',
	   'priority' => 2,
	   'buttons' => array(
	      array(
         	'name' => esc_html__('General', 'fresh-food-restaurant'),
            'icon' => 'dashicons dashicons-welcome-write-blog',
            'fields' => array(
            	'featuredproducts_disable_section',
				'featuredproducts_subheading',
				'featuredproducts_heading',
            	'featuredproducts1',
            	'featuredproducts2',
            	'featuredproducts3',
				'featuredproducts4',
            	'featuredproducts5',
            	'featuredproducts6',
				'featuredproducts_bottomtext',
				'featuredproducts_bottombtntext',
				'featuredproducts_bottombtnlink'
            ),
            'active' => true,
         ),
	      array(
            'name' => esc_html__('Style', 'fresh-food-restaurant'),
        	'icon' => 'dashicons dashicons-art',
            'fields' => array(
            	'featuredproducts_subheadingcolor',
				'featuredproducts_headingcolor',
				'featuredproducts_boxbgcolor',
				'featuredproducts_iconcolor',
				'featuredproducts_iconbgcolor',
            	'featuredproducts_titlecolor',
				'featuredproducts_shortdescriptioncolor',
				'featuredproducts_pricecolor',
				'featuredproducts_viewallbtntextcolor',
				'featuredproducts_viewallbtnbgcolor',
				'featuredproducts_viewallbtntexthvrcolor'
            ),
     	)
	    
    	),
	))); 



	// General

	// hide show featuredproducts section
	$wp_customize->add_setting(
        'featuredproducts_disable_section',
        array(
            'sanitize_callback' => 'wp_kses_post',
        )
    ); 
    $wp_customize->add_control(
        new freshfoodrestaurant_Toggle_Switch_Custom_Control(
            $wp_customize,
            'featuredproducts_disable_section',
            array(
                'settings'      => 'featuredproducts_disable_section',
                'section'       => 'featuredproducts_setting',
                'label'         => __( 'Disable Section', 'fresh-food-restaurant' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'fresh-food-restaurant' ),
                    'off' => __( 'No', 'fresh-food-restaurant' )
                ),
            )
        )
    );

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

	$wp_customize->add_control( 
		'featuredproducts_subheading',
		array(
			'label'   		=> __('Sub Heading','fresh-food-restaurant'),
			'section'		=> 'featuredproducts_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	


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

	$wp_customize->add_control( 
		'featuredproducts_heading',
		array(
			'label'   		=> __('Heading','fresh-food-restaurant'),
			'section'		=> 'featuredproducts_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	


	// style

	// featuredproducts subheading Color
	$featuredproductssubheadingcolor = esc_html__('#FE9900', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'featuredproducts_subheadingcolor',
    	array(
			'default' => $featuredproductssubheadingcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproducts_subheadingcolor',
		array(
		    'label'   		=> __('Sub Heading Color','fresh-food-restaurant'),
		    'section'		=> 'featuredproducts_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproducts heading Color
	$featuredproductsheadingcolor = esc_html__('#000', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'featuredproducts_headingcolor',
    	array(
			'default' => $featuredproductsheadingcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproducts_headingcolor',
		array(
		    'label'   		=> __('Heading Color','fresh-food-restaurant'),
		    'section'		=> 'featuredproducts_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproducts boxbg Color
	$featuredproductsboxbgcolor = esc_html__('#fff', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'featuredproducts_boxbgcolor',
    	array(
			'default' => $featuredproductsboxbgcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproducts_boxbgcolor',
		array(
		    'label'   		=> __('Box BG Color','fresh-food-restaurant'),
		    'section'		=> 'featuredproducts_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproducts icon Color
	$featuredproductsiconcolor = esc_html__('#fff', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'featuredproducts_iconcolor',
    	array(
			'default' => $featuredproductsiconcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproducts_iconcolor',
		array(
		    'label'   		=> __('Icon Color','fresh-food-restaurant'),
		    'section'		=> 'featuredproducts_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproducts iconbg Color
	$featuredproductsiconbgcolor = esc_html__('#FF5B07', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'featuredproducts_iconbgcolor',
    	array(
			'default' => $featuredproductsiconbgcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproducts_iconbgcolor',
		array(
		    'label'   		=> __('Icon BG Color','fresh-food-restaurant'),
		    'section'		=> 'featuredproducts_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproducts title Color
	$featuredproductstitlecolor = esc_html__('#000', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'featuredproducts_titlecolor',
    	array(
			'default' => $featuredproductstitlecolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproducts_titlecolor',
		array(
		    'label'   		=> __('Title Color','fresh-food-restaurant'),
		    'section'		=> 'featuredproducts_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproducts shortdescription Color
	$featuredproductsshortdescriptioncolor = esc_html__('#777777', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'featuredproducts_shortdescriptioncolor',
    	array(
			'default' => $featuredproductsshortdescriptioncolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproducts_shortdescriptioncolor',
		array(
		    'label'   		=> __('Short Description Color','fresh-food-restaurant'),
		    'section'		=> 'featuredproducts_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproducts price Color
	$featuredproductspricecolor = esc_html__('#FF5B07', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'featuredproducts_pricecolor',
    	array(
			'default' => $featuredproductspricecolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproducts_pricecolor',
		array(
		    'label'   		=> __('Price Color','fresh-food-restaurant'),
		    'section'		=> 'featuredproducts_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproducts viewallbtntext Color
	$featuredproductsviewallbtntextcolor = esc_html__('#000', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'featuredproducts_viewallbtntextcolor',
    	array(
			'default' => $featuredproductsviewallbtntextcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproducts_viewallbtntextcolor',
		array(
		    'label'   		=> __('View All Button Text Color','fresh-food-restaurant'),
		    'section'		=> 'featuredproducts_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproducts viewallbtnbg Color
	$featuredproductsviewallbtnbgcolor = esc_html__('#FE9900', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'featuredproducts_viewallbtnbgcolor',
    	array(
			'default' => $featuredproductsviewallbtnbgcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproducts_viewallbtnbgcolor',
		array(
		    'label'   		=> __('View All Button BG Color','fresh-food-restaurant'),
		    'section'		=> 'featuredproducts_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// featuredproducts viewallbtntexthvr Color
	$featuredproductsviewallbtntexthvrcolor = esc_html__('#fff', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'featuredproducts_viewallbtntexthvrcolor',
    	array(
			'default' => $featuredproductsviewallbtntexthvrcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'featuredproducts_viewallbtntexthvrcolor',
		array(
		    'label'   		=> __('View All Button Text Hover Color','fresh-food-restaurant'),
		    'section'		=> 'featuredproducts_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


	/*=========================================
	aboutus Section
	=========================================*/
	$wp_customize->add_section(
		'aboutus_setting', array(
			'title' => esc_html__( 'AboutUs Section', 'fresh-food-restaurant' ),
			'priority' => 2,
			'panel' => 'freshfoodrestaurant_frontpage_sections',
		)
	);

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

	$wp_customize->add_control(new freshfoodrestaurant_Tab_Control($wp_customize, 'freshfoodrestaurant_aboutus_tabs', array(
	   'section' => 'aboutus_setting',
	   'priority' => 2,
	   'buttons' => array(
	      array(
         	'name' => esc_html__('General', 'fresh-food-restaurant'),
            'icon' => 'dashicons dashicons-welcome-write-blog',
            'fields' => array(
				'aboutus_disable_section',
				'aboutus_image',
				'aboutus_title',
				'aboutus_description',
            	'aboutus_aboutusbtn_link',
				'aboutus_image2'
            ),
            'active' => true,
		),
		array(
		'name' => esc_html__('Style', 'fresh-food-restaurant'),
		'icon' => 'dashicons dashicons-art',
		'fields' => array(
			'aboutus_titlecolor',
			'aboutus_descriptioncolor',
			'aboutus_btntextcolor',
			'aboutus_btnbgcolor',
			'aboutus_btntexthrvcolor'
		),
     	)
    	),
	))); 


	// hide show aboutus section
	$wp_customize->add_setting(
        'aboutus_disable_section',
        array(
            'sanitize_callback' => 'wp_kses_post',
        )
    ); 
    $wp_customize->add_control(
        new freshfoodrestaurant_Toggle_Switch_Custom_Control(
            $wp_customize,
            'aboutus_disable_section',
            array(
                'settings'      => 'aboutus_disable_section',
                'section'       => 'aboutus_setting',
                'label'         => __( 'Disable Section', 'fresh-food-restaurant' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'fresh-food-restaurant' ),
                    'off' => __( 'No', 'fresh-food-restaurant' )
                ),
            )
        )
    );

	// 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','fresh-food-restaurant'),
				'description'=> __('Image Size Should Be 552*690','fresh-food-restaurant'),
	            'section' => 'aboutus_setting',
	            'settings' => 'aboutus_image'
	        )
	    )
	);

	// aboutus_title
	$wp_customize->add_setting(
    	'aboutus_title',
    	array(
			'default' => 'DISCOVER THE BOLD AND SPICYO TASTES OF THAT CUISINE',
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_title',
		array(
		    'label'   		=> __('Title','fresh-food-restaurant'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);	

	// aboutus_description
	$wp_customize->add_setting(
    	'aboutus_description',
    	array(
			'default' => 'Lacus sed turpis tincidunt id. Nulla at volutpat diam ut venenatis tellus. Dolor sit amet consectetur adipiscing facilisis leo.',
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 1,
		)
	);	

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

	// aboutus_aboutusbtn_link
	$aboutusaboutusbtnlink = esc_html__('#', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'aboutus_aboutusbtn_link',
    	array(
			'default' => $aboutusaboutusbtnlink,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 7,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_aboutusbtn_link',
		array(
		    'label'   		=> __('About Us Button Link','fresh-food-restaurant'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'text',
			'transport'         => $selective_refresh,
		)  
	);
	

	// aboutus_image2
	$wp_customize->add_setting(
    	'aboutus_image2',
	    array(
	        'sanitize_callback' => 'esc_url_raw'
	    )
	);
	$wp_customize->add_control(
	    new WP_Customize_Image_Control(
	        $wp_customize,
	        'aboutus_image2',
	        array(
			    'label'   		=> __('Image 2','fresh-food-restaurant'),
				'description'=> __('Image Size Should Be 651*413','fresh-food-restaurant'),
	            'section' => 'aboutus_setting',
	            'settings' => 'aboutus_image2'
	        )
	    )
	);


	
	//style

	// aboutus title Color
	$aboutustitlecolor = esc_html__('#000', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'aboutus_titlecolor',
    	array(
			'default' => $aboutustitlecolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_titlecolor',
		array(
		    'label'   		=> __('Title Color','fresh-food-restaurant'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);


	// aboutus description Color
	$aboutusdescriptioncolor = esc_html__('#8e9297', 'fresh-food-restaurant' );
	$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','fresh-food-restaurant'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// aboutus btntext Color
	$aboutusbtntextcolor = esc_html__('#fff', 'fresh-food-restaurant' );
	$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','fresh-food-restaurant'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// aboutus btnbg Color 
	$aboutusbtnbgcolor = esc_html__('#FE9900', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'aboutus_btnbgcolor',
    	array(
			'default' => $aboutusbtnbgcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_btnbgcolor',
		array(
		    'label'   		=> __('Button BG Color','fresh-food-restaurant'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);

	// aboutus btntexthrv Color
	$aboutusbtntexthrvcolor = esc_html__('#000', 'fresh-food-restaurant' );
	$wp_customize->add_setting(
    	'aboutus_btntexthrvcolor',
    	array(
			'default' => $aboutusbtntexthrvcolor,
			'capability'     	=> 'edit_theme_options',
			'sanitize_callback' => 'wp_kses_post',
			'priority'      => 3,
		)
	);	

	$wp_customize->add_control( 
		'aboutus_btntexthrvcolor',
		array(
		    'label'   		=> __('Button Text Hover Color','fresh-food-restaurant'),
		    'section'		=> 'aboutus_setting',
			'type' 			=> 'color',
			'transport'         => $selective_refresh,
		)  
	);
	
	$wp_customize->register_control_type('freshfoodrestaurant_Tab_Control');

}

add_action( 'customize_register', 'freshfoodrestaurant_blog_setting' );

// feature selective refresh
function freshfoodrestaurant_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'  => 'freshfoodrestaurant_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'  => 'freshfoodrestaurant_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'  => 'freshfoodrestaurant_blog_description_render_callback',
	
	) );	
	}

add_action( 'customize_register', 'freshfoodrestaurant_blog_section_partials' );

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

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

// feature description
function freshfoodrestaurant_blog_description_render_callback() {
	return get_theme_mod( 'blog_description' );
}


