<?php
	
	function health_customize_shop_tab($wp_customize, $theme_name){

		$health_pix_slider = array( 0 => esc_html__( 'No RevSlider', 'health' ) );
		if (class_exists('RevSlider')) {
			$arr = array( 0 => esc_html__( 'No RevSlider', 'health' ) );

			$pix_sliders 	= new RevSlider();
			$pix_arrSliders = $pix_sliders->getArrSliders();

			foreach($pix_arrSliders as $slider){
			  $arr[$slider->getAlias()] = $slider->getTitle();
			}
			if($arr){
			  $health_pix_slider = $arr;
			}

		}

		$wp_customize->add_section( 'health_shop_settings' , array(
		    'title'      => esc_html__( 'Shop', 'health' ),
		    'priority'   => 50,
		) );



		$wp_customize->add_setting( 'health_shop_header_slider' , array(
			'default'     => 0,
			'transport'   => 'refresh',
			'sanitize_callback' => 'sanitize_text_field'
		) );
		$wp_customize->add_control(
			'health_shop_header_slider',
			array(
					'label'    => esc_html__( 'Header RevSlider On Main Shop Page', 'health' ),
					'section'  => 'health_shop_settings',
					'settings' => 'health_shop_header_slider',
					'type'     => 'select',
					'choices'  => $health_pix_slider,
					'priority' => 10
			)
		);

		$wp_customize->add_setting( 'health_shop_header_image' , array(
			'default'     => '',
			'transport'   => 'refresh',
			'sanitize_callback' => 'sanitize_text_field'
		) );
        $wp_customize->add_control(
	        new WP_Customize_Image_Control(
	            $wp_customize,
	            'health_shop_header_image',
				array(
				   'label'      => esc_html__( 'Header Image', 'health' ),
				   'section'    => 'health_shop_settings',
				   'context'    => 'health_shop_header_image',
				   'settings'   => 'health_shop_header_image',
				   'priority'   => 20
				)
	       )
	    );

	    $wp_customize->add_setting( 'health_shop_settings_global_product' , array(
			'default'     => 'on',
			'transport'   => 'refresh',
			'sanitize_callback' => 'health_sanitize_onoff'
		) );
		$wp_customize->add_control(
			'health_shop_settings_global_product',
			array(
				'label'    => esc_html__( 'Global sidebar settings for Product pages', 'health' ),
				'section'  => 'health_shop_settings',
				'settings' => 'health_shop_settings_global_product',
				'description' => esc_html__( 'Global sidebar settings for all Product pages.', 'health' ),
				'type'     => 'select',
				'choices'  => array(
					'on'  => esc_html__( 'On', 'health' ),
					'off'  => esc_html__( 'Off', 'health' ),
				),
				'priority'   => 30
			)
		);

		$wp_customize->add_setting( 'health_shop_settings_sidebar_type' , array(
			'default'     => '2',
			'transport'   => 'refresh',
			'sanitize_callback' => 'health_sanitize_sidebar_blog_type'
		) );
		$wp_customize->add_control(
			'health_shop_settings_sidebar_type',
			array(
				'label'    => esc_html__( 'Product sidebar type', 'health' ),
				'section'  => 'health_shop_settings',
				'settings' => 'health_shop_settings_sidebar_type',
				'description' => esc_html__( 'Select sidebar type for Product pages.', 'health' ),
				'type'     => 'select',
				'choices'  => array(
					'1' => esc_html__( 'Full width', 'health' ),
					'2' => esc_html__( 'Right Sidebar', 'health' ),
					'3' => esc_html__( 'Left Sidebar', 'health' ),
				),
				'priority' => 40
			)
		);

		$wp_customize->add_setting( 'health_shop_settings_sidebar_content' , array(
			'default'     => 'product-sidebar-1',
			'transport'   => 'refresh',
			'sanitize_callback' => 'health_sanitize_sidebar_blog_content'
		) );
		$wp_customize->add_control(
			'health_shop_settings_sidebar_content',
			array(
				'label'    => esc_html__( 'Product sidebar content', 'health' ),
				'section'  => 'health_shop_settings',
				'settings' => 'health_shop_settings_sidebar_content',
				'description' => esc_html__( 'Select sidebar content for product pages', 'health' ),
				'type'     => 'select',
				'choices'  => array(
					'sidebar-1' => esc_html__( 'WP Default Sidebar', 'health' ),
					'global-sidebar-1' => esc_html__( 'Blog Sidebar', 'health' ),
					'portfolio-sidebar-1' => esc_html__( 'Portfolio Sidebar', 'health' ),
					'shop-sidebar-1' => esc_html__( 'Shop Sidebar', 'health' ),
					'product-sidebar-1' => esc_html__( 'Product Sidebar', 'health' ),
					'custom-area-1' => esc_html__( 'Custom Area', 'health' ),
				),
				'priority' => 50
			)
		);

		$wp_customize->add_setting( 'health_shop_settings_checkout' , array(
			'default'     => 'off',
			'transport'   => 'refresh',
			'sanitize_callback' => 'health_sanitize_onoff'
		) );
		$wp_customize->add_control(
			'health_shop_settings_checkout',
			array(
				'label'    => esc_html__( 'Checkout without Cart', 'health' ),
				'section'  => 'health_shop_settings',
				'settings' => 'health_shop_settings_checkout',
				'description' => esc_html__( 'Add to cart go to checkout', 'health' ),
				'type'     => 'select',
				'choices'  => array(
					'on'  => esc_html__( 'On', 'health' ),
					'off'  => esc_html__( 'Off', 'health' ),
				),
				'priority'   => 60
			)
		);
				
	}
?>