<?php
/**
 * akhada-fitness-gym: Customizer
 *
 * @subpackage akhada-fitness-gym
 * @since 1.0
 */

function akhada_fitness_gym_customize_register( $wp_customize ) {

	$wp_customize->add_setting('akhada_fitness_gym_logo_size',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_logo_size',array(
		'type' => 'range',
		'description' => __('Logo Size (0-100%)','akhada-fitness-gym'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('akhada_fitness_gym_logo_padding',array(
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_logo_padding',array(
		'label' => __('Logo Padding','akhada-fitness-gym'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('akhada_fitness_gym_logo_top_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_logo_top_padding',array(
		'type' => 'number',
		'description' => __('Top','akhada-fitness-gym'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('akhada_fitness_gym_logo_bottom_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_logo_bottom_padding',array(
		'type' => 'number',
		'description' => __('Bottom','akhada-fitness-gym'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('akhada_fitness_gym_logo_left_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_logo_left_padding',array(
		'type' => 'number',
		'description' => __('Left','akhada-fitness-gym'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('akhada_fitness_gym_logo_right_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_logo_right_padding',array(
		'type' => 'number',
		'description' => __('Right','akhada-fitness-gym'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('akhada_fitness_gym_show_site_title',array(
		'default' => true,
		'sanitize_callback' => 'akhada_fitness_gym_sanitize_checkbox'
	));
	$wp_customize->add_control('akhada_fitness_gym_show_site_title',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Title','akhada-fitness-gym'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('akhada_fitness_gym_site_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_site_title_font_size',array(
		'type' => 'number',
		'description' => __('Site Title Font Size','akhada-fitness-gym'),
		'section' => 'title_tagline',
	));

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

	$wp_customize->add_setting('akhada_fitness_gym_show_tagline',array(
		'default' => true,
		'sanitize_callback' => 'akhada_fitness_gym_sanitize_checkbox'
	));
	$wp_customize->add_control('akhada_fitness_gym_show_tagline',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Tagline','akhada-fitness-gym'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('akhada_fitness_gym_site_tagline_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_site_tagline_font_size',array(
		'type' => 'number',
		'label' => __('Site Tagline Font Size','akhada-fitness-gym'),
		'section' => 'title_tagline',
	));

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

	$wp_customize->add_panel( 'akhada_fitness_gym_panel_id', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'theme_supports' => '',
		'title' => __( 'Theme Settings', 'akhada-fitness-gym' ),
	) );

	$wp_customize->add_section( 'akhada_fitness_gym_theme_options_section', array(
    	'title'      => __( 'General Settings', 'akhada-fitness-gym' ),
		'priority'   => 30,
		'panel' => 'akhada_fitness_gym_panel_id'
	) );

	$wp_customize->add_setting('akhada_fitness_gym_theme_color', array(
		'default' => '#ffcb21',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'akhada_fitness_gym_theme_color', array(
		'label' => __('Theme Primary Color', 'akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_theme_options_section',
	)));

	$wp_customize->add_setting('akhada_fitness_gym_blog_theme_options',array(
		'default' => 'One Column',
		'sanitize_callback' => 'akhada_fitness_gym_sanitize_choices'
	));
	$wp_customize->add_control('akhada_fitness_gym_blog_theme_options',array(
		'type' => 'select',
		'label' => __('Blog Page Sidebar Layout','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_theme_options_section',
		'choices' => array(
		   'Left Sidebar' => __('Left Sidebar','akhada-fitness-gym'),
		   'Right Sidebar' => __('Right Sidebar','akhada-fitness-gym'),
		   'One Column' => __('One Column','akhada-fitness-gym'),
		   'Grid Layout' => __('Grid Layout','akhada-fitness-gym')
		),
	));

	$wp_customize->add_setting('akhada_fitness_gym_single_post_sidebar',array(
		'default' => 'Right Sidebar',
		'sanitize_callback' => 'akhada_fitness_gym_sanitize_choices'
	));
	$wp_customize->add_control('akhada_fitness_gym_single_post_sidebar',array(
        'type' => 'select',
        'label' => __('Single Post Sidebar Layout','akhada-fitness-gym'),
        'section' => 'akhada_fitness_gym_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','akhada-fitness-gym'),
            'Right Sidebar' => __('Right Sidebar','akhada-fitness-gym'),
            'One Column' => __('One Column','akhada-fitness-gym')
        ),
	));

	$wp_customize->add_setting('akhada_fitness_gym_archive_page_sidebar',array(
		'default' => 'One Column',
		'sanitize_callback' => 'akhada_fitness_gym_sanitize_choices'
	));
	$wp_customize->add_control('akhada_fitness_gym_archive_page_sidebar',array(
        'type' => 'select',
        'label' => __('Archive & Search Page Sidebar Layout','akhada-fitness-gym'),
        'section' => 'akhada_fitness_gym_theme_options_section',
        'choices' => array(
            'Left Sidebar' => __('Left Sidebar','akhada-fitness-gym'),
            'Right Sidebar' => __('Right Sidebar','akhada-fitness-gym'),
            'One Column' => __('One Column','akhada-fitness-gym'),
            'Grid Layout' => __('Grid Layout','akhada-fitness-gym')
        ),
	));

	$wp_customize->add_setting( 'akhada_fitness_gym_dropdown_anim', array(
		'default'           => 'None',
		'sanitize_callback' => 'akhada_fitness_gym_sanitize_choices'
	));
	$wp_customize->add_control( 'akhada_fitness_gym_dropdown_anim', array(
		'label'    => __( 'Menu Dropdown Animations', 'akhada-fitness-gym' ),
		'section'  => 'akhada_fitness_gym_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInUp'  => __('bounceInUp', 'akhada-fitness-gym'),
			'fadeInUp' => __('fadeInUp', 'akhada-fitness-gym'),
			'zoomIn'    => __('zoomIn', 'akhada-fitness-gym'),
			'None'    => __('None', 'akhada-fitness-gym')
		),
	));

	$wp_customize->add_setting( 'akhada_fitness_gym_boxfull_width', array(
		'default'           => '',
		'sanitize_callback' => 'akhada_fitness_gym_sanitize_choices'
	));
	$wp_customize->add_control( 'akhada_fitness_gym_boxfull_width', array(
		'label'    => __( 'Section Width', 'akhada-fitness-gym' ),
		'section'  => 'akhada_fitness_gym_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'container'  => __('Box Width', 'akhada-fitness-gym'),
			'container-fluid' => __('Full Width', 'akhada-fitness-gym')
		),
	));

	// Social Icons
	$wp_customize->add_section( 'akhada_fitness_gym_social_icons', array(
    	'title'      => __( 'Social Icons', 'akhada-fitness-gym' ),
		'priority'   => null,
		'panel' => 'akhada_fitness_gym_panel_id'
	) );

	$wp_customize->add_setting('akhada_fitness_gym_facebook',array(
		'default'=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('akhada_fitness_gym_facebook',array(
		'label'	=> __('Add Facebook Link','akhada-fitness-gym'),
		'section'=> 'akhada_fitness_gym_social_icons',
		'setting'=> 'akhada_fitness_gym_facebook',
		'type'=> 'url'
	));	

	$wp_customize->add_setting('akhada_fitness_gym_twitter',array(
		'default'=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('akhada_fitness_gym_twitter',array(
		'label'	=> __('Add Twitter Link','akhada-fitness-gym'),
		'section'=> 'akhada_fitness_gym_social_icons',
		'setting'=> 'akhada_fitness_gym_twitter',
		'type'=> 'url'
	));

	$wp_customize->add_setting('akhada_fitness_gym_instagram',array(
		'default'=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('akhada_fitness_gym_instagram',array(
		'label'	=> __('Add Instagram Link','akhada-fitness-gym'),
		'section'=> 'akhada_fitness_gym_social_icons',
		'setting'=> 'akhada_fitness_gym_instagram',
		'type'=> 'url'
	));

	$wp_customize->add_setting('akhada_fitness_gym_linkedin',array(
		'default'=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('akhada_fitness_gym_linkedin',array(
		'label'	=> __('Add Linkedin Link','akhada-fitness-gym'),
		'section'=> 'akhada_fitness_gym_social_icons',
		'setting'=> 'akhada_fitness_gym_linkedin',
		'type'=> 'url'
	));

	$wp_customize->add_setting('akhada_fitness_gym_youtube',array(
		'default'=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('akhada_fitness_gym_youtube',array(
		'label'	=> __('Add Youtube Link','akhada-fitness-gym'),
		'section'=> 'akhada_fitness_gym_social_icons',
		'setting'=> 'akhada_fitness_gym_youtube',
		'type'=> 'url'
	));

	$wp_customize->add_setting( 'akhada_fitness_gym_social_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	   ));
	 $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'akhada_fitness_gym_social_color', array(
		   'label' => 'Social Icons Color',
		'section' => 'akhada_fitness_gym_social_icons',
	   )));

	// Banner
	$wp_customize->add_section( 'akhada_fitness_gym_banner_section' , array(
    	'title'      => __( 'Banner Section', 'akhada-fitness-gym' ),
		'priority'   => null,
		'panel' => 'akhada_fitness_gym_panel_id'
	) );

	$wp_customize->add_setting('akhada_fitness_gym_show_banner',array(
		'default' => false,
		'sanitize_callback' => 'akhada_fitness_gym_sanitize_checkbox'
	));
	$wp_customize->add_control('akhada_fitness_gym_show_banner',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Banner','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_banner_section'
	));

	$wp_customize->add_setting( 'akhada_fitness_gym_slider', array(
		'default'           => '',
		'sanitize_callback' => 'akhada_fitness_gym_sanitize_dropdown_pages'
	) );
	$wp_customize->add_control( 'akhada_fitness_gym_slider', array(
		'label'    => __( 'Select Banner Page', 'akhada-fitness-gym' ),
		'section'  => 'akhada_fitness_gym_banner_section',
		'type'     => 'dropdown-pages'
	) );

	$wp_customize->add_setting('akhada_fitness_gym_banner_excerpt_length',array(
		'default' => '15',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_banner_excerpt_length',array(
		'type' => 'number',
		'label' => __('Banner Excerpt Length','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_banner_section',
	));

	$wp_customize->add_setting( 'akhada_fitness_gym_banner_effect', array(
		'default'           => '',
		'sanitize_callback' => 'akhada_fitness_gym_sanitize_choices'
	));
	$wp_customize->add_control( 'akhada_fitness_gym_banner_effect', array(
		'label'    => __( 'Onload Transactions Effects', 'akhada-fitness-gym' ),
		'section'  => 'akhada_fitness_gym_banner_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInLeft'  => __('bounceInLeft', 'akhada-fitness-gym'),
			'bounceInRight' => __('bounceInRight', 'akhada-fitness-gym'),
			'bounceInUp'    => __('bounceInUp', 'akhada-fitness-gym'),
			'bounceInDown'    => __('bounceInDown', 'akhada-fitness-gym'),
			'zoomIn'  => __('zoomIn', 'akhada-fitness-gym'),
			'zoomOut' => __('zoomOut', 'akhada-fitness-gym'),
			'fadeInDown'    => __('fadeInDown', 'akhada-fitness-gym'),
			'fadeInUp'    => __('fadeInUp', 'akhada-fitness-gym'),
			'fadeInLeft'  => __('fadeInLeft', 'akhada-fitness-gym'),
			'fadeInRight' => __('fadeInRight', 'akhada-fitness-gym'),
			'flip-up'    => __('flip-up', 'akhada-fitness-gym'),
			'none'    => __('none', 'akhada-fitness-gym')
		),
	));

	$wp_customize->add_setting('akhada_fitness_gym_banner_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_banner_title_font_size',array(
		'type' => 'number',
		'label' => __('Title Font Size','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_banner_section',
	));

	$wp_customize->add_setting('akhada_fitness_gym_banner_text_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_banner_text_font_size',array(
		'type' => 'number',
		'label' => __('Text Font Size','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_banner_section',
	));

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

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

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

	$wp_customize->add_setting( 'akhada_fitness_gym_slider_btnbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'akhada_fitness_gym_slider_btnbg_color', array(
		'label' => 'Button Bg Color',
		'section' => 'akhada_fitness_gym_banner_section',
	)));

	//OUR services
	$wp_customize->add_section('akhada_fitness_gym_service_section',array(
		'title'	=> __('Our Services','akhada-fitness-gym'),
		'description'=> __('Note : This section will appear below the slider.','akhada-fitness-gym'),
		'panel' => 'akhada_fitness_gym_panel_id',
	));

	$wp_customize->add_setting('akhada_fitness_gym_service_title',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('akhada_fitness_gym_service_title',array(
		'label'	=> __('Section Title','akhada-fitness-gym'),
		'section'	=> 'akhada_fitness_gym_service_section',
		'setting'	=> 'akhada_fitness_gym_service_title',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('akhada_fitness_gym_service_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_service_title_font_size',array(
		'type' => 'number',
		'label' => __('Title Font Size','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_service_section',
	));

	$categories = get_categories();
	$cats = array();
	$i = 0;
	$cat_pst[]= 'select';
	foreach($categories as $category){
		if($i==0){
			$default = $category->slug;
			$i++;
		}
		$cat_pst[$category->slug] = $category->name;
	}

	$wp_customize->add_setting('akhada_fitness_gym_service_category',array(
		'default'	=> 'select',
		'sanitize_callback' => 'akhada_fitness_gym_sanitize_choices',
	));
	$wp_customize->add_control('akhada_fitness_gym_service_category',array(
		'type'    => 'select',
		'choices' => $cat_pst,
		'label' => __('Select Category To Display Post','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_service_section',
	));

	$wp_customize->add_setting('akhada_fitness_gym_service_post_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_service_post_title_font_size',array(
		'type' => 'number',
		'label' => __('Post Title Font Size','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_service_section',
	));

	$wp_customize->add_setting('akhada_fitness_gym_service_post_text_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_service_post_text_font_size',array(
		'type' => 'number',
		'label' => __('Post Text Font Size','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_service_section',
	));

	$wp_customize->add_setting('akhada_fitness_gym_services_section_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_services_section_padding',array(
		'type' => 'number',
		'label' => __('Section Top Bottom Padding','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_service_section',
	));

	$wp_customize->add_setting('akhada_fitness_gym_services_img_hight',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_services_img_hight',array(
		'type' => 'number',
		'label' => __('Image Hight','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_service_section',
	));

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

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

	//Footer
   $wp_customize->add_section( 'akhada_fitness_gym_footer', array(
    	'title'      => __( 'Footer Settings', 'akhada-fitness-gym' ),
		'priority'   => null,
		'panel' => 'akhada_fitness_gym_panel_id'
	) );

	$wp_customize->add_setting('akhada_fitness_gym_show_back_totop',array(
 		'default' => true,
   		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_checkbox'
	));
	$wp_customize->add_control('akhada_fitness_gym_show_back_totop',array(
	   	'type' => 'checkbox',
	   	'label' => __('Show / Hide Back to Top','akhada-fitness-gym'),
	   	'section' => 'akhada_fitness_gym_footer'
	));

   $wp_customize->add_setting('akhada_fitness_gym_footer_copy',array(
		'default'	=> 'Fitness WordPress Theme By Luzuk',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('akhada_fitness_gym_footer_copy',array(
		'label'	=> __('Copyright Text','akhada-fitness-gym'),
		'section'	=> 'akhada_fitness_gym_footer',
		'setting'	=> 'akhada_fitness_gym_footer_copy',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('akhada_fitness_gym_footer_copylink',array(
		'default'	=> 'https://www.luzuk.com/products/free-fitness-wordpress-theme/',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('akhada_fitness_gym_footer_copylink',array(
		'label'	=> __('Copyright Link','akhada-fitness-gym'),
		'section'	=> 'akhada_fitness_gym_footer',
		'setting'	=> 'akhada_fitness_gym_footer_copylink',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('akhada_fitness_gym_footer_copy_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
	));
	$wp_customize->add_control('akhada_fitness_gym_footer_copy_font_size',array(
		'type' => 'number',
		'label' => __('Font Size','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_footer',
	));
	
	$wp_customize->add_setting('akhada_fitness_gym_copyright_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'akhada_fitness_gym_sanitize_float'
 	));
 	$wp_customize->add_control('akhada_fitness_gym_copyright_padding',array(
		'type' => 'number',
		'label' => __('Copyright Top Bottom Padding','akhada-fitness-gym'),
		'section' => 'akhada_fitness_gym_footer',
	));

	$wp_customize->add_setting( 'akhada_fitness_gym_copyright_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'akhada_fitness_gym_copyright_color', array(
		'label' => 'Copyright Text Color',
		'section' => 'akhada_fitness_gym_footer',
	)));

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

	$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' => 'akhada_fitness_gym_customize_partial_blogname',
	) );
	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => '.site-description',
		'render_callback' => 'akhada_fitness_gym_customize_partial_blogdescription',
	) );
}
add_action( 'customize_register', 'akhada_fitness_gym_customize_register' );

function akhada_fitness_gym_sanitize_colorscheme( $input ) {
	$valid = array( 'light', 'dark', 'custom' );

	if ( in_array( $input, $valid, true ) ) {
		return $input;
	}

	return 'light';
}

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

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


function akhada_fitness_gym_is_static_front_page() {
	return ( is_front_page() && ! is_home() );
}

function akhada_fitness_gym_is_view_with_layout_option() {
	// This option is available on all pages. It's also available on archives when there isn't a sidebar.
	return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
}

/**
 * Singleton class for handling the theme's customizer integration.
 *
 * @since  1.0.0
 * @access public
 */
final class Akhada_Fitness_Gym_Customize {

	/**
	 * Returns the instance.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return object
	 */
	public static function get_instance() {

		static $instance = null;

		if ( is_null( $instance ) ) {
			$instance = new self;
			$instance->setup_actions();
		}

		return $instance;
	}

	/**
	 * Constructor method.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function __construct() {}

	/**
	 * Sets up initial actions.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function setup_actions() {

		// Register panels, sections, settings, controls, and partials.
		add_action( 'customize_register', array( $this, 'sections' ) );

		// Register scripts and styles for the controls.
		add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );
	}

	/**
	 * Sets up the customizer sections.
	 *
	 * @since  1.0.0
	 * @access public
	 * @param  object  $manager
	 * @return void
	 */
	public function sections( $manager ) {

		// Load custom sections.
		load_template( trailingslashit( get_template_directory() ) . '/inc/section-pro.php' );

		// Register custom section types.
		$manager->register_section_type( 'Akhada_Fitness_Gym_Customize_Section_Pro' );

		// Register sections.
		$manager->add_section(
			new Akhada_Fitness_Gym_Customize_Section_Pro(
				$manager,
				'akhada_fitness_gym_example_1',
				array(
					'priority' => 9,
					'title'    => esc_html__( 'Akhada Fitness Pro', 'akhada-fitness-gym' ),
					'pro_text' => esc_html__( 'Go Pro','akhada-fitness-gym' ),
					'pro_url'  => esc_url( 'https://www.luzuk.com/products/akhada-fitness-wordpress-theme/' ),
				)
			)
		);
	}

	/**
	 * Loads theme customizer CSS.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return void
	 */
	public function enqueue_control_scripts() {

		wp_enqueue_script( 'akhada-fitness-gym-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/assets/js/customize-controls.js', array( 'customize-controls' ) );

		wp_enqueue_style( 'akhada-fitness-gym-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/assets/css/customize-controls.css' );
	}
}

// Doing this customizer thang!
Akhada_Fitness_Gym_Customize::get_instance();