<?php
/**
 * Sweet Delights Bakery: Customizer
 *
 * @subpackage Sweet Delights Bakery
 * @since 1.0
 */

use WPTRT\Customize\Section\Luzuk_Sweet_Delights_Bakery_Button;

add_action( 'customize_register', function( $manager ) {

	$manager->register_section_type( Luzuk_Sweet_Delights_Bakery_Button::class );

	$manager->add_section(
		new Luzuk_Sweet_Delights_Bakery_Button( $manager, 'luzuk_sweet_delights_bakery_pro', [
			'title' => __( 'Sweet Delights Bakery Pro', 'sweet-delights-bakery' ),
			'priority' => 0,
			'button_text' => __( 'Go Pro', 'sweet-delights-bakery' ),
			'button_url'  => esc_url( 'https://www.luzuk.com/products/premium-bakery-wordpress-template/', 'sweet-delights-bakery')
		] )
	);

} );


// Load the JS and CSS.
add_action( 'customize_controls_enqueue_scripts', function() {

	$version = wp_get_theme()->get( 'Version' );

	wp_enqueue_script(
		'sweet-delights-bakery-customize-section-button',
		get_theme_file_uri( 'vendor/wptrt/customize-section-button/public/js/customize-controls.js' ),
		[ 'customize-controls' ],
		$version,
		true
	);

	wp_enqueue_style(
		'sweet-delights-bakery-customize-section-button',
		get_theme_file_uri( 'vendor/wptrt/customize-section-button/public/css/customize-controls.css' ),
		[ 'customize-controls' ],
 		$version
	);

} );

function luzuk_sweet_delights_bakery_customize_register( $wp_customize ) {


	$wp_customize->add_panel( 'luzuk_sweet_delights_bakery_panel_id', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'theme_supports' => '',
		'title' => __( 'Theme Settings', 'sweet-delights-bakery' ),
		'description' => __( 'Description of what this panel does.', 'sweet-delights-bakery' ),
	) );

	$wp_customize->add_section( 'luzuk_sweet_delights_bakery_theme_options_section', array(
    	'title'      => __( 'General Settings', 'sweet-delights-bakery' ),
		'priority'   => 30,
		'panel' => 'luzuk_sweet_delights_bakery_panel_id'
	) );

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_theme_options',array(
		'default' => 'One Column',
		'sanitize_callback' => 'luzuk_sweet_delights_bakery_sanitize_choices'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_theme_options',array(
		'type' => 'select',
		'label' => __('Blog Page Sidebar Layout','sweet-delights-bakery'),
		'section' => 'luzuk_sweet_delights_bakery_theme_options_section',
		'choices' => array(
		   'Left Sidebar' => __('Left Sidebar','sweet-delights-bakery'),
		   'Right Sidebar' => __('Right Sidebar','sweet-delights-bakery'),
		   'One Column' => __('One Column','sweet-delights-bakery'),
		   'Grid Layout' => __('Grid Layout','sweet-delights-bakery')
		),
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_single_post_sidebar',array(
		'default' => 'Right Sidebar',
		'sanitize_callback' => 'luzuk_sweet_delights_bakery_sanitize_choices'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_single_post_sidebar',array(
        'type' => 'select',
        'label' => __('Single Post Sidebar Layout','sweet-delights-bakery'),
        'section' => 'luzuk_sweet_delights_bakery_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','sweet-delights-bakery'),
            'Right Sidebar' => __('Right Sidebar','sweet-delights-bakery'),
            'One Column' => __('One Column','sweet-delights-bakery')
        ),
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_page_sidebar',array(
		'default' => 'One Column',
		'sanitize_callback' => 'luzuk_sweet_delights_bakery_sanitize_choices'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_page_sidebar',array(
        'type' => 'select',
        'label' => __('Page Sidebar Layout','sweet-delights-bakery'),
        'section' => 'luzuk_sweet_delights_bakery_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','sweet-delights-bakery'),
            'Right Sidebar' => __('Right Sidebar','sweet-delights-bakery'),
            'One Column' => __('One Column','sweet-delights-bakery')
        ),
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_archive_page_sidebar',array(
		'default' => 'One Column',
		'sanitize_callback' => 'luzuk_sweet_delights_bakery_sanitize_choices'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_archive_page_sidebar',array(
        'type' => 'select',
        'label' => __('Archive & Search Page Sidebar Layout','sweet-delights-bakery'),
        'section' => 'luzuk_sweet_delights_bakery_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','sweet-delights-bakery'),
            'Right Sidebar' => __('Right Sidebar','sweet-delights-bakery'),
            'One Column' => __('One Column','sweet-delights-bakery'),
            'Grid Layout' => __('Grid Layout','sweet-delights-bakery')
        ),
	));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_boxfull_width', array(
		'default'           => '',
		'sanitize_callback' => 'luzuk_sweet_delights_bakery_sanitize_choices'
	));
	
	$wp_customize->add_control( 'luzuk_sweet_delights_bakery_boxfull_width', array(
		'label'    => __( 'Section Width', 'sweet-delights-bakery' ),
		'section'  => 'luzuk_sweet_delights_bakery_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'container'  => __('Box Width', 'sweet-delights-bakery'),
			'container-fluid' => __('Full Width', 'sweet-delights-bakery'),
			'none' => __('None', 'sweet-delights-bakery')
		),
	));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_shift', array(
		'default'           => 'left',
		'sanitize_callback' => 'luzuk_sweet_delights_bakery_sanitize_choices'
	));
	
	$wp_customize->add_control( 'luzuk_sweet_delights_bakery_shift', array(
		'label'    => __( 'Shift Header', 'sweet-delights-bakery' ),
		'section'  => 'luzuk_sweet_delights_bakery_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'left'  => __('Left', 'sweet-delights-bakery'),
			'right' => __('Right', 'sweet-delights-bakery')
		),
	));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_dropdown_anim', array(
		'default'           => 'None',
		'sanitize_callback' => 'luzuk_sweet_delights_bakery_sanitize_choices'
	));
	$wp_customize->add_control( 'luzuk_sweet_delights_bakery_dropdown_anim', array(
		'label'    => __( 'Menu Dropdown Animations', 'sweet-delights-bakery' ),
		'section'  => 'luzuk_sweet_delights_bakery_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInUp'  => __('bounceInUp', 'sweet-delights-bakery'),
			'fadeInUp' => __('fadeInUp', 'sweet-delights-bakery'),
			'zoomIn'    => __('zoomIn', 'sweet-delights-bakery'),
			'None'    => __('None', 'sweet-delights-bakery')
		),
	));
 
	//Header
	$wp_customize->add_section( 'luzuk_sweet_delights_bakery_header' , array(
    	'title'    => __( 'Side Panel Settings', 'sweet-delights-bakery' ),
		'priority' => null,
		'panel' => 'luzuk_sweet_delights_bakery_panel_id'
	) );
	
	
	$wp_customize->add_setting('luzuk_sweet_delights_bakery_sidepanel_phonenumber',array(
    	'default' => '111 222 333',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_sidepanel_phonenumber',array(
	   	'type' => 'text',
	   	'label' => __('Phone Number','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_header',
	));
	
	$wp_customize->add_setting('luzuk_sweet_delights_bakery_instagramlink',array(
    	'default' => '#',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));

	$wp_customize->add_control('luzuk_sweet_delights_bakery_instagramlink',array(
	   	'type' => 'url',
	   	'label' => __('Instagram Icon Link','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_header',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_pinterestlink',array(
    	'default' => '#',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));

	$wp_customize->add_control('luzuk_sweet_delights_bakery_pinterestlink',array(
	   	'type' => 'url',
	   	'label' => __('Pinterest Icon Link','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_header',
	));
	
	$wp_customize->add_setting('luzuk_sweet_delights_bakery_fblink',array(
    	'default' => '#',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));

	$wp_customize->add_control('luzuk_sweet_delights_bakery_fblink',array(
	   	'type' => 'url',
	   	'label' => __('Facebook Icon Link','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_header',
	));


	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_sitetitle_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_sitetitle_col', array(
		'label' => 'Site Title Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_sitetagline_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_sitetagline_col', array(
		'label' => 'Site Tagline Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_headerbg_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_headerbg_col', array(
		'label' => 'BG Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_cartbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_cartbg_color', array(
		'label' => 'Cart BG Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_carticontext_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_carticontext_color', array(
		'label' => 'Cart Icon Text Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_cartnumber_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_cartnumber_color', array(
		'label' => 'Cart Number Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_cartnumberbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_cartnumberbg_color', array(
		'label' => 'Cart Number BG Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_activemenubg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_activemenubg_color', array(
		'label' => 'Active Menu BG Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_activemenutext_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_activemenutext_color', array(
		'label' => 'Active Menu Text Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_menu_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_menu_color', array(
		'label' => 'Menu Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_menuhover_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_menuhover_color', array(
		'label' => 'Menu Hover Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));


	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_submenu_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_submenu_color', array(
		'label' => 'Submenu Text Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_submenubg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_submenubg_color', array(
		'label' => 'Submenu BG Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_phoneicon_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_phoneicon_color', array(
		'label' => 'Phone Icon Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_phonetext_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_phonetext_color', array(
		'label' => 'Phone Text Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_phonenumber_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_phonenumber_color', array(
		'label' => 'Phone Number Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_headertopsocialicon_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_headertopsocialicon_col', array(
		'label' => 'Social Icon Color',
		'section' => 'luzuk_sweet_delights_bakery_header',
	)));


	// banner Section
	$wp_customize->add_section('luzuk_sweet_delights_bakery_banner_section',array(
		'title'	=> __('Banner Section Settings','sweet-delights-bakery'),
		'panel' => 'luzuk_sweet_delights_bakery_panel_id',
	));

	$wp_customize->add_setting(
    	'luzuk_sweet_delights_bakery_banner_bgimg',
	    array(
	        'sanitize_callback' => 'esc_url_raw'
	    )
	);
	$wp_customize->add_control(
	    new WP_Customize_Image_Control(
	        $wp_customize,
	        'luzuk_sweet_delights_bakery_banner_bgimg',
	        array(
			    'label'   		=> __('BG Image','sweet-delights-bakery'),
				'description'   		=> __('Image size 1280*853','sweet-delights-bakery'),
	            'section' => 'luzuk_sweet_delights_bakery_banner_section',
	            'settings' => 'luzuk_sweet_delights_bakery_banner_bgimg',
	        )
	    )
	);

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_ratingheading',array(
    	'default' => 'Rated #1 Local Bakery',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_ratingheading',array(
	   	'type' => 'text',
	   	'label' => __('Rating Heading','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_heading1',array(
    	'default' => 'Fresh Baked',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_heading1',array(
	   	'type' => 'text',
	   	'label' => __('Heading 1','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_heading2',array(
    	'default' => 'Every Day',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_heading2',array(
	   	'type' => 'text',
	   	'label' => __('Heading 2','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_description',array(
    	'default' => 'Artisan breads, pastries, and cakes made with love using traditional recipes and the finest ingredients.',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_description',array(
	   	'type' => 'text',
	   	'label' => __('Description','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_button1_text',array(
    	'default' => 'Order Now',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_button1_text',array(
	   	'type' => 'text',
	   	'label' => __('Button 1 Text','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_button1_url',array(
    	'default' => '#',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_button1_url',array(
	   	'type' => 'text',
	   	'label' => __('Button 1 URL','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_button2_text',array(
    	'default' => 'View Menu',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_button2_text',array(
	   	'type' => 'text',
	   	'label' => __('Button 2 Text','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_button2_url',array(
    	'default' => '#',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_button2_url',array(
	   	'type' => 'text',
	   	'label' => __('Button 2 URL','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_trustnumber_yearofex_num',array(
    	'default' => '25+',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_trustnumber_yearofex_num',array(
	   	'type' => 'text',
	   	'label' => __('Year Of Experience Number','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_trustnumber_yearofex_text',array(
    	'default' => 'Years Experience',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_trustnumber_yearofex_text',array(
	   	'type' => 'text',
	   	'label' => __('Year Of Experience Text','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_trustnumber_happycust_num',array(
    	'default' => '500+',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_trustnumber_happycust_num',array(
	   	'type' => 'text',
	   	'label' => __('Happy Customer Number','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_trustnumber_happycust_text',array(
    	'default' => 'Happy Customers Daily',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_trustnumber_happycust_text',array(
	   	'type' => 'text',
	   	'label' => __('Happy Customer Text','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_trustnumber_freshdetail_num',array(
    	'default' => '100%',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_trustnumber_freshdetail_num',array(
	   	'type' => 'text',
	   	'label' => __('Fresh Ingredients Number','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_banner_trustnumber_freshdetail_text',array(
    	'default' => 'Fresh Ingredients',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_banner_trustnumber_freshdetail_text',array(
	   	'type' => 'text',
	   	'label' => __('Fresh Ingredients Text','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_banner_section',
	));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_banner_ratingheading_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_banner_ratingheading_col', array(
		'label' => 'Rating Heading Color',
		'section' => 'luzuk_sweet_delights_bakery_banner_section',
	)));
	
	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_banner_heading1_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_banner_heading1_col', array(
		'label' => 'Heading 1 Color',
		'section' => 'luzuk_sweet_delights_bakery_banner_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_banner_heading2_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_banner_heading2_col', array(
		'label' => 'Heading 2 Color',
		'section' => 'luzuk_sweet_delights_bakery_banner_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_banner_description_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_banner_description_col', array(
		'label' => 'Description Color',
		'section' => 'luzuk_sweet_delights_bakery_banner_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_banner_button1bg_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_banner_button1bg_col', array(
		'label' => 'Button 1 BG Color',
		'section' => 'luzuk_sweet_delights_bakery_banner_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_banner_button1text_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_banner_button1text_col', array(
		'label' => 'Button 1 Text Color',
		'section' => 'luzuk_sweet_delights_bakery_banner_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_banner_button2bg_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_banner_button2bg_col', array(
		'label' => 'Button 2 BG Color',
		'section' => 'luzuk_sweet_delights_bakery_banner_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_banner_button2text_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_banner_button2text_col', array(
		'label' => 'Button 2 Text Color',
		'section' => 'luzuk_sweet_delights_bakery_banner_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_banner_numbers_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_banner_numbers_col', array(
		'label' => 'Numbers Color',
		'section' => 'luzuk_sweet_delights_bakery_banner_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_banner_numberstext_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_banner_numberstext_col', array(
		'label' => 'Numbers Text Color',
		'section' => 'luzuk_sweet_delights_bakery_banner_section',
	)));


	// featuredproducts Section
	$wp_customize->add_section('luzuk_sweet_delights_bakery_featuredproducts_section',array(
		'title'	=> __('Featured Products Settings','sweet-delights-bakery'),
		'description'=> __('<b>Note :</b> This section will appear below the Banner Section.','sweet-delights-bakery'),
		'panel' => 'luzuk_sweet_delights_bakery_panel_id',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_featuredproducts_subheading',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_featuredproducts_subheading',array(
	   	'type' => 'text',
	   	'label' => __('Sub Heading','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_featuredproducts_heading',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_featuredproducts_heading',array(
	   	'type' => 'text',
	   	'label' => __('Heading','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_featuredproducts_head_descripton',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_featuredproducts_head_descripton',array(
	   	'type' => 'text',
	   	'label' => __('Description','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_bg_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_bg_col', array(
		'label' => 'BG Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_subheading_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_subheading_col', array(
		'label' => 'Sub Heading Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_heading_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_heading_col', array(
		'label' => 'Heading Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_description_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_description_col', array(
		'label' => 'Description Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_productbg_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_productbg_col', array(
		'label' => 'Product Box BG Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_productsaletext_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_productsaletext_col', array(
		'label' => 'Product Sale Text Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_productsalebg_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_productsalebg_col', array(
		'label' => 'Product Sale BG Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_productname_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_productname_col', array(
		'label' => 'Product Name Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_price_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_price_col', array(
		'label' => 'Product Price Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_addtocartbuttontext_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_addtocartbuttontext_col', array(
		'label' => 'Add To Cart Button Text Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_addtocartbuttonbg_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_addtocartbuttonbg_col', array(
		'label' => 'Add To Cart Button BG Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_addtocartbuttontexthrv_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_addtocartbuttontexthrv_col', array(
		'label' => 'Add To Cart Button Hover Text Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_featuredproducts_addtocartbuttonbghrv_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_featuredproducts_addtocartbuttonbghrv_col', array(
		'label' => 'Add To Cart Button Hover BG Color',
		'section' => 'luzuk_sweet_delights_bakery_featuredproducts_section',
	)));



	// categories Section
	$wp_customize->add_section('luzuk_sweet_delights_bakery_categories_section',array(
		'title'	=> __('Categories Settings','sweet-delights-bakery'),
		'description'=> __('<b>Note :</b> This section will appear below the Featured Products Section.','sweet-delights-bakery'),
		'panel' => 'luzuk_sweet_delights_bakery_panel_id',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_productcategory_subheading',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_productcategory_subheading',array(
	   	'type' => 'text',
	   	'label' => __('Sub Heading','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_categories_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_productcategory_heading',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_productcategory_heading',array(
	   	'type' => 'text',
	   	'label' => __('Heading','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_categories_section',
	));

	$wp_customize->add_setting('luzuk_sweet_delights_bakery_productcategory_head_descripton',array(
    	'default' => '',
    	'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('luzuk_sweet_delights_bakery_productcategory_head_descripton',array(
	   	'type' => 'text',
	   	'label' => __('Description','sweet-delights-bakery'),
	   	'section' => 'luzuk_sweet_delights_bakery_categories_section',
	));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_productcategory_bg_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_productcategory_bg_col', array(
		'label' => 'BG Color',
		'section' => 'luzuk_sweet_delights_bakery_categories_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_productcategory_subheading_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_productcategory_subheading_col', array(
		'label' => 'Sub Heading Color',
		'section' => 'luzuk_sweet_delights_bakery_categories_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_productcategory_heading_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_productcategory_heading_col', array(
		'label' => 'Heading Color',
		'section' => 'luzuk_sweet_delights_bakery_categories_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_productcategory_description_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_productcategory_description_col', array(
		'label' => 'Description Color',
		'section' => 'luzuk_sweet_delights_bakery_categories_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_productcategory_boxbg_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_productcategory_boxbg_col', array(
		'label' => 'Box BG Color',
		'section' => 'luzuk_sweet_delights_bakery_categories_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_productcategory_iconbg_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_productcategory_iconbg_col', array(
		'label' => 'Icon BG Color',
		'section' => 'luzuk_sweet_delights_bakery_categories_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_productcategory_boxtitle_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_productcategory_boxtitle_col', array(
		'label' => 'Box Title Color',
		'section' => 'luzuk_sweet_delights_bakery_categories_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_productcategory_boxdescription_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_productcategory_boxdescription_col', array(
		'label' => 'Box Description Color',
		'section' => 'luzuk_sweet_delights_bakery_categories_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_productcategory_boxnumber_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_productcategory_boxnumber_col', array(
		'label' => 'Box Number Color',
		'section' => 'luzuk_sweet_delights_bakery_categories_section',
	)));

	$wp_customize->add_setting( 'luzuk_sweet_delights_bakery_productcategory_boxnumberbg_col', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'luzuk_sweet_delights_bakery_productcategory_boxnumberbg_col', array(
		'label' => 'Box Number BG Color',
		'section' => 'luzuk_sweet_delights_bakery_categories_section',
	)));

	

	$wp_customize->get_setting( 'blogname' )->transport          = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport   = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport  = 'postMessage';

	$wp_customize->selective_refresh->add_partial( 'blogname', array(
		'selector' => '.site-title a',
		'render_callback' => 'luzuk_sweet_delights_bakery_customize_partial_blogname',
	) );
	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => '.site-description',
		'render_callback' => 'luzuk_sweet_delights_bakery_customize_partial_blogdescription',
	) );
}
add_action( 'customize_register', 'luzuk_sweet_delights_bakery_customize_register' );

function luzuk_sweet_delights_bakery_customize_partial_blogname() {
	bloginfo( 'name' );
}

function luzuk_sweet_delights_bakery_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

if (class_exists('WP_Customize_Control')) {

   	class Luzuk_Sweet_Delights_Bakery_Fontawesome_Icon_Chooser extends WP_Customize_Control {

      	public $type = 'icon';

      	public function render_content() { ?>
	     	<label>
	            <span class="customize-control-title">
	               <?php echo esc_html($this->label); ?>
	            </span>

	            <?php if ($this->description) { ?>
	                <span class="description customize-control-description">
	                   <?php echo wp_kses_post($this->description); ?>
	                </span>
	            <?php } ?>

	            <div class="sweet-delights-bakery-selected-icon">
	                <i class="fa <?php echo esc_attr($this->value()); ?>"></i>
	                <span><i class="fa fa-angle-down"></i></span>
	            </div>

	            <ul class="sweet-delights-bakery-icon-list clearfix">
	                <?php
	                $luzuk_sweet_delights_bakery_font_awesome_icon_array = luzuk_sweet_delights_bakery_font_awesome_icon_array();
	                foreach ($luzuk_sweet_delights_bakery_font_awesome_icon_array as $luzuk_sweet_delights_bakery_font_awesome_icon) {
	                   $icon_class = $this->value() == $luzuk_sweet_delights_bakery_font_awesome_icon ? 'icon-active' : '';
	                   echo '<li class=' . esc_attr($icon_class) . '><i class="' . esc_attr($luzuk_sweet_delights_bakery_font_awesome_icon) . '"></i></li>';
	                }
	                ?>
	            </ul>
	            <input type="hidden" value="<?php $this->value(); ?>" <?php $this->link(); ?> />
	        </label>
	        <?php
      	}
  	}
}
function luzuk_sweet_delights_bakery_customizer_script() {
   wp_enqueue_style( 'font-awesome-1', esc_url(get_template_directory_uri()).'/assets/css/fontawesome-all.css');
}
add_action( 'customize_controls_enqueue_scripts', 'luzuk_sweet_delights_bakery_customizer_script' );