<?php 
/**
 * shoBe Theme Customizer
 *
 * @package shoBe
 */

 /**
 * Simple Notice Custom Control
 */

function shobe_customizer( $wp_customize ){

################################ ShoBe Homepage Options ################################################
	$wp_customize->add_panel('theme_option',
        array(
            'title' => 'ShoBe Homepage Options',
			'capability'     => 'edit_theme_options',
            'priority' => 1
            )
        );

/*------------------------------------------------------------------ CTA Section */ 

	$wp_customize->add_section( 
		'sec_cta', array(
			'title' 		=> __( 'CTA Homepage', 'shobe'),
			'description' 	=> __( 'CTA Section', 'shobe' ),
			'panel' => 'theme_option'
		)
	);    
	                 	

			$wp_customize->add_setting(
				'set_cta_show', array(
					'type' 				=> 'theme_mod',
					'default' 			=> true,
					'sanitize_callback' => 'shobe_sanitize_checkbox' 
				)
			);
			$wp_customize->add_control(
				'set_cta_show', array(
					'label' 	=> __( 'Show Call To Action (CTA)?', 'shobe' ),
					'section' 	=> 'sec_cta',
					'type' 		=> 'checkbox'			
				)
			);
			// Field 1 - Call To Action Page 
			$wp_customize->add_setting(
				'set_cta_page', array(
					'type' 				=> 'theme_mod',
					'default' 			=> '',
					'sanitize_callback' => 'absint'
				)
			);

			$wp_customize->add_control(
				'set_cta_page', array(
					'label' 		=> __( 'Set CTA page', 'shobe' ),
					'description' 	=> __( 'Set CTA page', 'shobe' ),
					'section' 		=> 'sec_cta',
					'type' 			=> 'dropdown-pages'
				)
			);

			// Field 2 - CTA Button Text Number 
			$wp_customize->add_setting(
				'set_cta_button_text', array(
					'type' 				=> 'theme_mod',
					'default' 			=> '',
					'sanitize_callback' => 'sanitize_text_field'
				)
			);

			$wp_customize->add_control(
				'set_cta_button_text', array(
					'label' 		=> __( 'Button Text for Page ', 'shobe' ),
					'description' 	=> __( 'Button Text for page ', 'shobe' ),
					'section' 		=> 'sec_cta',
					'type' 			=> 'text'
				)
			);

			// Field 3 - CTA Button URL
			$wp_customize->add_setting(
				'set_cta_button_url', array(
					'type' 				=> 'theme_mod',
					'default' 			=> '',
					'sanitize_callback' => 'esc_url_raw'
				)
			);

			$wp_customize->add_control(
				'set_cta_button_url', array(
					'label' 		=> __( 'URL for Page 1', 'shobe' ),
					'description' 	=> __( 'URL for Page 1', 'shobe' ),
					'section' 		=> 'sec_cta',
					'type' 			=> 'url'
				)
			);

/*------------------------------------------------------------------- Services*/

	$wp_customize->add_section( 
		'service_section', array(
			'title' 		=> __( 'Services Homepage', 'shobe'),
			'description' 	=> __( 'Services Section', 'shobe' ),
			'panel' => 'theme_option'
		)
	);

	$IconList = array(
		'Truck' => __( '<i class="bi bi-truck"></i>', 'shobe' ),		
		'Rocket' => __( '<i class="bi bi-rocket"></i>', 'shobe' ),
		'Rocket Takeoff' => __( '<i class="bi bi-rocket-takeoff"></i>', 'shobe' ),
		'Archive' => __( '<i class="bi bi-archive"></i>', 'shobe' ),
		'Arrow repeat' => __( '<i class="bi bi-arrow-repeat"></i>', 'shobe' ),
		'Arrow up square' => __( '<i class="bi bi-arrow-up-square"></i>', 'shobe' ),			
		'Arrows fullscreen' => __( '<i class="bi bi-arrows-fullscreen"></i>', 'shobe' ),
		'Arrows move' => __( '<i class="bi bi-arrows-move"></i>', 'shobe' ),
		'Backpack' => __( '<i class="bi bi-backpack"></i>', 'shobe' ),
		'Award' => __( '<i class="bi bi-award"></i>', 'shobe' ),
		'Asterisk' => __( '<i class="bi bi-asterisk"></i>', 'shobe' ),
		'Bag heart' => __( '<i class="bi bi-bag-heart"></i>', 'shobe' ),
		'Bag check' => __( '<i class="bi bi-bag-check"></i>', 'shobe' ),
		'Bag' => __( '<i class="bi bi-bag"></i>', 'shobe' ),
		'Bag plus' => __( '<i class="bi bi-bag-plus"></i>', 'shobe' ),
		'Balloon' => __( '<i class="bi bi-balloon"></i>', 'shobe' ),
		'Balloon heart' => __( '<i class="bi bi-balloon-heart"></i>', 'shobe' ),
		'Bank' => __( '<i class="bi bi-bank"></i>', 'shobe' ),
		'Bar chart' => __( '<i class="bi bi-bar-chart"></i>', 'shobe' ),
		'Bandaid' => __( '<i class="bi bi-bandaid"></i>', 'shobe' ),
		'Basket' => __( '<i class="bi bi-basket"></i>', 'shobe' ),
		'Battery charging' => __( '<i class="bi bi-battery-charging"></i>', 'shobe' ),
		'Binoculars' => __( '<i class="bi bi-binoculars"></i>', 'shobe' ),
		'Bounding box' => __( '<i class="bi bi-bounding-box"></i>', 'shobe' ),
		'Alarm' => __( '<i class="bi bi-alarm"></i>', 'shobe' ),
		'Airplane' => __( '<i class="bi bi-airplane"></i>', 'shobe' ),
		'Activity' => __( '<i class="bi bi-activity"></i>', 'shobe' ),
		'Box' => __( '<i class="bi bi-box"></i>', 'shobe' ),
		'Box seam' => __( '<i class="bi bi-box-seam"></i>', 'shobe' ),
		'Box2 heart' => __( '<i class="bi bi-box2-heart"></i>', 'shobe' ),
		'Bricks' => __( '<i class="bi bi-bricks"></i>', 'shobe' ),
		'Boxes' => __( '<i class="bi bi-boxes"></i>', 'shobe' ),
		'Briefcase' => __( '<i class="bi bi-briefcase"></i>', 'shobe' ),
		'Brightness alt high' => __( '<i class="bi bi-brightness-alt-high"></i>', 'shobe' ),
		'Broadcast' => __( '<i class="bi bi-broadcast"></i>', 'shobe' ),
		'Broadcast pin' => __( '<i class="bi bi-broadcast-pin"></i>', 'shobe' ),
		'Bug' => __( '<i class="bi bi-bug"></i>', 'shobe' ),
		'Building' => __( '<i class="bi bi-building"></i>', 'shobe' ),
		'Building fill gear' => __( '<i class="bi bi-building-fill-gear"></i>', 'shobe' ),
		'Bullseye' => __( '<i class="bi bi-bullseye"></i>', 'shobe' ),
		'Buildings' => __( '<i class="bi bi-buildings"></i>', 'shobe' ),
		'Calculator' => __( '<i class="bi bi-calculator"></i>', 'shobe' ),
		'Camera' => __( '<i class="bi bi-camera2"></i>', 'shobe' ),
		'Camera' => __( '<i class="bi bi-camera"></i>', 'shobe' ),
		'Camera video' => __( '<i class="bi bi-camera-video"></i>', 'shobe' ),
		'Car front' => __( '<i class="bi bi-car-front"></i>', 'shobe' ),
		'Cash' => __( '<i class="bi bi-cash"></i>', 'shobe' ),
		'Cash coin' => __( '<i class="bi bi-cash-coin"></i>', 'shobe' ),
		'Cloud arrow up' => __( '<i class="bi bi-cloud-arrow-up"></i>', 'shobe' ),
		'Cloud haze' => __( '<i class="bi bi-cloud-haze"></i>', 'shobe' ),
		'Columns gap' => __( '<i class="bi bi-columns-gap"></i>', 'shobe' ),
		'Controller' => __( '<i class="bi bi-controller"></i>', 'shobe' ),
		'Currency bitcoin' => __( '<i class="bi bi-currency-bitcoin"></i>', 'shobe' ),
		'Currency dollar' => __( '<i class="bi bi-currency-dollar"></i>', 'shobe' ),
		'Currency euro' => __( '<i class="bi bi-currency-euro"></i>', 'shobe' ),
		'Currency exchange' => __( '<i class="bi bi-currency-exchange"></i>', 'shobe' ),
		'Currency pound' => __( '<i class="bi bi-currency-pound"></i>', 'shobe' ),
		'Cup hot' => __( '<i class="bi bi-cup-hot"></i>', 'shobe' ),
		'Display' => __( '<i class="bi bi-display"></i>', 'shobe' ),
		'Flower1' => __( '<i class="bi bi-flower1"></i>', 'shobe' ),
		'Flower2' => __( '<i class="bi bi-flower2"></i>', 'shobe' ),
		'Fuel pump' => __( '<i class="bi bi-fuel-pump"></i>', 'shobe' ),
		'Gear' => __( '<i class="bi bi-gear"></i>', 'shobe' ),
		'Gear wide' => __( '<i class="bi bi-gear-wide"></i>', 'shobe' ),
		'Gem' => __( '<i class="bi bi-gem"></i>', 'shobe' ),
		'Geo' => __( '<i class="bi bi-geo"></i>', 'shobe' ),
		'Geo alt' => __( '<i class="bi bi-geo-alt"></i>', 'shobe' ),
		'Globe' => __( '<i class="bi bi-globe"></i>', 'shobe' ),
		'Gift' => __( '<i class="bi bi-gift"></i>', 'shobe' ),
		'Globe Americas' => __( '<i class="bi bi-globe-americas"></i>', 'shobe' ),
		'Graph up' => __( '<i class="bi bi-graph-up"></i>', 'shobe' ),
		'Headphones' => __( '<i class="bi bi-headphones"></i>', 'shobe' ),
		'Headset' => __( '<i class="bi bi-headset"></i>', 'shobe' ),
		'House' => __( '<i class="bi bi-house"></i>', 'shobe' ),
		'House up' => __( '<i class="bi bi-house-up"></i>', 'shobe' ),
		'Hypnotize' => __( '<i class="bi bi-hypnotize"></i>', 'shobe' ),
		'Info circle' => __( '<i class="bi bi-info-circle"></i>', 'shobe' ),
		'Joystick' => __( '<i class="bi bi-joystick"></i>', 'shobe' ),
		'Keyboard' => __( '<i class="bi bi-keyboard"></i>', 'shobe' ),
		'Lightbulb' => __( '<i class="bi bi-lightbulb"></i>', 'shobe' ),
		'Link' => __( '<i class="bi bi-link"></i>', 'shobe' ),
		'Magic' => __( '<i class="bi bi-magic"></i>', 'shobe' ),
		'Magnet' => __( '<i class="bi bi-magnet"></i>', 'shobe' ),
		'Map' => __( '<i class="bi bi-map"></i>', 'shobe' ),
		'Music note list' => __( '<i class="bi bi-music-note-list"></i>', 'shobe' ),
		'Palette' => __( '<i class="bi bi-palette"></i>', 'shobe' ),
		'Patch exclamation' => __( '<i class="bi bi-patch-exclamation"></i>', 'shobe' ),
		'Patch question' => __( '<i class="bi bi-patch-question"></i>', 'shobe' ),
		'PC display' => __( '<i class="bi bi-pc-display"></i>', 'shobe' ),
		'Rainbow' => __( '<i class="bi bi-rainbow"></i>', 'shobe' ),
		'Shop' => __( '<i class="bi bi-shop"></i>', 'shobe' ),
		'Stars' => __( '<i class="bi bi-stars"></i>', 'shobe' ),
		'Shield' => __( '<i class="bi bi-shield"></i>', 'shobe' ),
		'Shield lock' => __( '<i class="bi bi-shield-lock"></i>', 'shobe' ),
		'Shield check' => __( '<i class="bi bi-shield-check"></i>', 'shobe' ),
		'Shield slash' => __( '<i class="bi bi-shield-slash"></i>', 'shobe' ),
		'Shield plus' => __( '<i class="bi bi-shield-plus"></i>', 'shobe' ),
		'Tools' => __( '<i class="bi bi-tools"></i>', 'shobe' ),
	);

		$wp_customize->add_setting(
			'set_service_show', array(
				'type' 				=> 'theme_mod',
				'default' 			=> true,
				'sanitize_callback' => 'shobe_sanitize_checkbox'
			)
		);

		$wp_customize->add_control(
			'set_service_show', array(
				'label' 	=> __( 'Show Services', 'shobe' ),
				'section' 	=> 'service_section',
				'type' 		=> 'checkbox'			
			)
		);

		for ( $srvjm = 1; $srvjm < 4; $srvjm++ ) :

			$wp_customize->add_setting( 'service_list_section_' . $srvjm, array(
				'transport' 		=> 'refresh',
				'default'           => '',
				'type'              => 'theme_mod',
				'sanitize_callback' => 'absint',
			) );
			$wp_customize->add_control( 'service_list_section_' . $srvjm . '_svr', array(
				'settings'          => 'service_list_section_' . $srvjm,
				'section'           => 'service_section',
				'type'              => 'dropdown-pages',
				'label'             => sprintf( __( 'Service %d', 'shobe' ), $srvjm),
				'description' 		=> sprintf( __( 'Set Service %d', 'shobe' ), $srvjm),
			) );

			// Dropdown Select2 Control for icons
			$wp_customize->add_setting( 'dropdown_select_icon_'.$srvjm, array(
				'transport' => 'refresh',
				'sanitize_callback' => 'skyrocket_text_sanitization'
			) );
			$wp_customize->add_control( new Skyrocket_Dropdown_Select2_Custom_Control( $wp_customize, 'dropdown_select_icon_'.$srvjm.'_abs', array(
				'label' => sprintf( __( 'Icon %d', 'shobe' ), $srvjm),
				'description' => sprintf( __( 'Select Icon for Service %d', 'shobe' ), $srvjm),
				'section' => 'service_section',
				'settings'          => 'dropdown_select_icon_' . $srvjm,
				'input_attrs' => array(
					'placeholder' => esc_html__( 'Please select a icon...', 'shobe' ),
					'multiselect' => false,
				),
				'choices' => array(
					'bi bi-rocket' => __('Rocket', 'shobe'),
					'bi bi-rocket-takeoff' => __('Rocket Takeoff', 'shobe'),
					'bi bi-archive' => __('Archive', 'shobe'),
					'bi bi-arrow-repeat' => __('Arrow repeat', 'shobe'),
					'bi bi-arrow-up-square' => __('Arrow up square', 'shobe'),
					'bi bi-arrows-fullscreen' => __('Arrows fullscreen', 'shobe'),
					'bi bi-arrows-move' => __('Arrows move', 'shobe'),
					'bi bi-backpack' => __('Backpack', 'shobe'),
					'bi bi-award' => __('Award', 'shobe'),
					'bi bi-asterisk' => __('Asterisk', 'shobe'),
					'bi bi-bag-heart' => __('Bag heart', 'shobe'),
					'bi bi-bag-check' => __('Bag check', 'shobe'),
					'bi bi-bag' => __('Bag', 'shobe'),
					'bi bi-bag-plus' => __('Bag plus', 'shobe'),
					'bi bi-balloon' => __('Balloon', 'shobe'),
					'bi bi-balloon-heart' => __('Balloon heart', 'shobe'),
					'bi bi-bank' => __('Bank', 'shobe'),
					'bi bi-bar-chart' => __('Bar chart', 'shobe'),
					'bi bi-bandaid' => __('Bandaid', 'shobe'),
					'bi bi-basket' => __('Basket', 'shobe'),
					'bi bi-battery-charging' => __('Battery charging', 'shobe'),
					'bi bi-binoculars' => __('Binoculars', 'shobe'),
					'bi bi-bounding-box' => __('Bounding box', 'shobe'),
					'bi bi-alarm' => __('Alarm', 'shobe'),
					'bi bi-airplane' => __('Airplane', 'shobe'),
					'bi bi-activity' => __('Activity', 'shobe'),
					'bi bi-box' => __('Box', 'shobe'),
					'bi bi-box-seam' => __('Box seam', 'shobe'),
					'bi bi-box2-heart' => __('Box2 heart', 'shobe'),
					'bi bi-bricks' => __('Bricks', 'shobe'),
					'bi bi-boxes' => __('Boxes', 'shobe'),
					'bi bi-briefcase' => __('Briefcase', 'shobe'),
					'bi bi-brightness-alt-high' => __('Brightness alt high', 'shobe'),
					'bi bi-broadcast' => __('Broadcast', 'shobe'),
					'bi bi-broadcast-pin' => __('Broadcast pin', 'shobe'),
					'bi bi-bug' => __('Bug', 'shobe'),
					'bi bi-building' => __('Building', 'shobe'),
					'bi bi-building-fill-gear' => __('Building fill gear', 'shobe'),
					'bi bi-bullseye' => __('Bullseye', 'shobe'),
					'bi bi-buildings' => __('Buildings', 'shobe'),
					'bi bi-calculator' => __('Calculator', 'shobe'),
					'bi bi-camera' => __('Camera', 'shobe'),
					'bi bi-camera-video' => __('Camera video', 'shobe'),
					'bi bi-car-front' => __('Car front', 'shobe'),
					'bi bi-cash' => __('Cash', 'shobe'),
					'bi bi-cash-coin' => __('Cash coin', 'shobe'),
					'bi bi-cloud-arrow-up' => __('Cloud arrow up', 'shobe'),
					'bi bi-cloud-haze' => __('Cloud haze', 'shobe'),
					'bi bi-columns-gap' => __('Columns gap', 'shobe'),
					'bi bi-controller' => __('Controller', 'shobe'),
					'bi bi-currency-bitcoin' => __('Currency bitcoin', 'shobe'),
					'bi bi-currency-dollar' => __('Currency dollar', 'shobe'),
					'bi bi-currency-euro' => __('Currency euro', 'shobe'),
					'bi bi-currency-exchange' => __('Currency exchange', 'shobe'),
					'bi bi-currency-pound' => __('Currency pound', 'shobe'),
					'bi bi-cup-hot' => __('Cup hot', 'shobe'),
					'bi bi-display' => __('Display', 'shobe'),
					'bi bi-flower1' => __('Flower1', 'shobe'),
					'bi bi-flower2' => __('Flower2', 'shobe'),
					'bi bi-fuel-pump' => __('Fuel pump', 'shobe'),
					'bi bi-gear' => __('Gear', 'shobe'),
					'bi bi-gear-wide' => __('Gear wide', 'shobe'),
					'bi bi-gem' => __('Gem', 'shobe'),
					'bi bi-geo' => __('Geo', 'shobe'),
					'bi bi-geo-alt' => __('Geo alt', 'shobe'),
					'bi bi-globe' => __('Globe', 'shobe'),
					'bi bi-gift' => __('Gift', 'shobe'),
					'bi bi-globe-americas' => __('Globe Americas', 'shobe'),
					'bi bi-graph-up' => __('Graph up', 'shobe'),
					'bi bi-headphones' => __('Headphones', 'shobe'),
					'bi bi-headset' => __('Headset', 'shobe'),
					'bi bi-house' => __('House', 'shobe'),
					'bi bi-house-up' => __('House up', 'shobe'),
					'bi bi-hypnotize' => __('Hypnotize', 'shobe'),
					'bi bi-info-circle' => __('Info circle', 'shobe'),
					'bi bi-joystick' => __('Joystick', 'shobe'),
					'bi bi-keyboard' => __('Keyboard', 'shobe'),
					'bi bi-lightbulb' => __('Lightbulb', 'shobe'),
					'bi bi-link' => __('Link', 'shobe'),
					'bi bi-magic' => __('Magic', 'shobe'),
					'bi bi-magnet' => __('Magnet', 'shobe'),
					'bi bi-map' => __('Map', 'shobe'),
					'bi bi-music-note-list' => __('Music note list', 'shobe'),
					'bi bi-palette' => __('Palette', 'shobe'),
					'bi bi-patch-exclamation' => __('Patch exclamation', 'shobe'),
					'bi bi-patch-question' => __('Patch question', 'shobe'),
					'bi bi-pc-display' => __('PC display', 'shobe'),
					'bi bi-rainbow' => __('Rainbow', 'shobe'),
					'bi bi-shop' => __('Shop', 'shobe'),
					'bi bi-stars' => __('Stars', 'shobe'),
					'bi bi-shield' => __('Shield', 'shobe'),
					'bi bi-shield-lock' => __('Shield lock', 'shobe'),
					'bi bi-shield-check' => __('Shield check', 'shobe'),
					'bi bi-shield-slash' => __('Shield slash', 'shobe'),
					'bi bi-shield-plus' => __('Shield plus', 'shobe'),
					'bi bi-tools' => __('Tools', 'shobe'),
					'bi bi-truck' => __('Truck', 'shobe'), 
				)
			) ) );
		
		endfor;

		

		$wp_customize->add_setting( 'service_icons',
			array(
				'transport' => 'refresh',
				'sanitize_callback' => 'skyrocket_text_sanitization'
			)
		);
		$wp_customize->add_control( new Skyrocket_Single_Accordion_Custom_Control( $wp_customize, 'service_icons',
			array(
				'label' => __( 'View list of available icons', 'shobe' ),
				'description' => $IconList,
				'section' => 'service_section'
			)
		) );


/*------------------------------------------------------------------- Woocommerce  */
if( class_exists( 'WooCommerce' )):
/*------------------------------------------------------------------- Popular Product Setting */
	$wp_customize->add_section( 
		'sec_popular', array(
			'title' 		=> __( 'Popular Product', 'shobe'),
			'description' 	=> __( 'Popular Product Section', 'shobe' ),
			'panel' => 'theme_option'
		)
	);

		$wp_customize->add_setting(
			'set_deal_show', array(
				'type' 				=> 'theme_mod',
				'default' 			=> true,
				'sanitize_callback' => 'shobe_sanitize_checkbox'
			)
		);

		$wp_customize->add_control(
			'set_deal_show', array(
				'label' 	=> __( 'Show Popular Product', 'shobe' ),
				'section' 	=> 'sec_popular',
				'type' 		=> 'checkbox'			
			)
		);

		// Field 1 - Popular Products Title
		$wp_customize->add_setting(
			'set_popular_title', array(
				'type' 				=> 'theme_mod',
				'default' 			=> __( 'Popular Products', 'shobe' ),
				'sanitize_callback' => 'sanitize_text_field'
			)
		);

		$wp_customize->add_control(
			'set_popular_title', array(
				'label' 		=> __( 'Popular Products Title', 'shobe' ),
				'description' 	=> __( 'Popular Products Title', 'shobe' ),
				'section' 		=> 'sec_popular',
				'type' 			=> 'text'
			)
		);

		// Field 2 - Popular Products Limit
		$wp_customize->add_setting(
			'set_popular_max_num', array(
				'type' 				=> 'theme_mod',
				'default' 			=> 4,
				'sanitize_callback' => 'absint'
			)
		);

		$wp_customize->add_control(
			'set_popular_max_num', array(
				'label' 		=> __( 'Popular Products Max Number', 'shobe' ),
				'description' 	=> __( 'Popular Products Max Number', 'shobe' ),
				'section' 		=> 'sec_popular',
				'type' 			=> 'number',
				'input_attrs' => array(
					'min' => 4,
					'max' => 16
				)
			)
		);

/*------------------------------------------------------------------- New arrival Setting */
	$wp_customize->add_section( 
		'sec_newarrival', array(
			'title' 		=> __( 'New Arrivals', 'shobe'),
			'description' 	=> __( 'New Arrivals Product Section', 'shobe' ),
			'panel' => 'theme_option'
		)
	);

		$wp_customize->add_setting(
			'set_arrival_show', array(
				'type' 				=> 'theme_mod',
				'default' 			=> true,
				'sanitize_callback' => 'shobe_sanitize_checkbox'
			)
		);

		$wp_customize->add_control(
			'set_arrival_show', array(
				'label' 	=> __( 'Show New Arrivals Product', 'shobe' ),
				'section' 	=> 'sec_newarrival',
				'type' 		=> 'checkbox'			
			)
		);

		// Field 1 - New Arrival Products Title
		$wp_customize->add_setting(
			'set_arrival_title', array(
				'type' 				=> 'theme_mod',
				'default' 			=> '',
				'sanitize_callback' => 'sanitize_text_field'
			)
		);

		$wp_customize->add_control(
			'set_arrival_title', array(
				'label' 		=> __( 'New Arrivals Products Title', 'shobe' ),
				'description' 	=> __( 'New Arrivals Products Title', 'shobe' ),
				'section' 		=> 'sec_newarrival',
				'type' 			=> 'text'
			)
		);

		// Field 2 - New Arrivals Products Limit
		$wp_customize->add_setting(
			'set_arrival_max_num', array(
				'type' 				=> 'theme_mod',
				'default' 			=> 4,
				'sanitize_callback' => 'absint'
			)
		);

		$wp_customize->add_control(
			'set_arrival_max_num', array(
				'label' 		=> __( 'New Arrivals Products Max Number', 'shobe' ),
				'description' 	=> __( 'New Arrivals Products Max Number', 'shobe' ),
				'section' 		=> 'sec_newarrival',
				'type' 			=> 'number',
				'input_attrs' => array(
					'min' => 4,
					'max' => 16
				)
			)
		);



endif;
/*------------------------------------------------------------------- Latest News */
	$wp_customize->add_section( 
		'sec_news', array(
			'title' 		=> __( 'News Homepage', 'shobe'),
			'description' 	=> __( 'News Homepage Section', 'shobe' ),
			'panel' => 'theme_option'
		)
	);

		$wp_customize->add_setting(
			'set_news_show', array(
				'type' 				=> 'theme_mod',
				'default' 			=> true,
				'sanitize_callback' => 'shobe_sanitize_checkbox'
			)
		);

		$wp_customize->add_control(
			'set_news_show', array(
				'label' 	=> __( 'Show Latest News', 'shobe' ),
				'section' 	=> 'sec_news',
				'type' 		=> 'checkbox'			
			)
		);

		// Field 1 - New Latest News Title
		$wp_customize->add_setting(
			'set_news_title', array(
				'type' 				=> 'theme_mod',
				'default' 			=> '',
				'sanitize_callback' => 'sanitize_text_field'
			)
		);

		$wp_customize->add_control(
			'set_news_title', array(
				'label' 		=> __( 'Latest News Title', 'shobe' ),
				'description' 	=> __( 'Latest News Title', 'shobe' ),
				'section' 		=> 'sec_news',
				'type' 			=> 'text'
			)
		);

		// Field 2 - New Latest News Limit
		$wp_customize->add_setting(
			'set_news_max_num', array(
				'type' 				=> 'theme_mod',
				'default' 			=> 3,
				'sanitize_callback' => 'absint'
			)
		);

		$wp_customize->add_control(
			'set_news_max_num', array(
				'label' 		=> __( 'Latest News Max Number', 'shobe' ),
				'description' 	=> __( 'Latest News Max Number', 'shobe' ),
				'section' 		=> 'sec_news',
				'type' 			=> 'number',
				'input_attrs' => array(
					'min' => 3,
					'max' => 9
				)
			)
		);
	
################################ End ShoBe Homepage Options ########################################	

################################ ShoBe About Options ################################################
$wp_customize->add_panel( 'panel_about', array(
	'priority' => 2,
	'capability' => 'edit_theme_options',
	'theme_supports' => '',
	'title' => __( 'About & Informations', 'shobe' ),
	'description' => __( 'About Company & Informations.', 'shobe'
),
) );

/*------------------------------------------------------------------------- Contact Section */
		$wp_customize->add_setting( 'contact_about',
		array(
			'transport' => 'refresh',
			'sanitize_callback' => 'wp_filter_nohtml_kses'
		)
		);
		$wp_customize->add_control( 'contact_about',
		array(
			'label' => __( 'Display about', 'shobe' ),
			'type' => 'textarea',
			'input_attrs' => array(
					'class' => 'my-custom-class',
					'style' => 'border: 1px solid #999',
					'placeholder' => __( 'Enter message...', 'shobe' ),
				),
			'section' => 'contact_section',
		)
		);

		// Add our Text field setting and Control for displaying the phone number
		$wp_customize->add_section( 'contact_section',
			array(
				'title' => __( 'Contact', 'shobe' ),
				'description' => esc_html__( 'Add your address and phone number to the site footer.', 'shobe' ),
				'panel' => 'panel_about'
			)
		);
		$wp_customize->add_setting( 'contact_address',
		array(
			'transport' => 'postMessage',
			'sanitize_callback' => 'wp_filter_nohtml_kses'
		)
		);
		$wp_customize->add_control( 'contact_address',
		array(
			'label' => __( 'Display address', 'shobe' ),
			'type' => 'text',
			'section' => 'contact_section'
		)
		);
		$wp_customize->selective_refresh->add_partial( 'contact_address',
		array(
			'selector' => '.contact',
			'container_inclusive' => false,
			'render_callback' => function() {
				echo shobe_get_contact_address();
			},
			'fallback_refresh' => true
		)
		);
		$wp_customize->add_setting( 'contact_phone',
		array(
			'transport' => 'postMessage',
			'sanitize_callback' => 'wp_filter_nohtml_kses'
		)
		);
		$wp_customize->add_control( 'contact_phone',
		array(
			'label' => __( 'Display phone number', 'shobe' ),
			'type' => 'tel',
			'section' => 'contact_section'
		)
		);
		$wp_customize->selective_refresh->add_partial( 'contact_phone',
		array(
			'selector' => '.contact',
			'container_inclusive' => false,
			'render_callback' => function() {
				echo shobe_get_contact_address();
			},
			'fallback_refresh' => true
		)
		);
		
		$wp_customize->add_setting( 'contact_email',
		array(
			'transport' => 'postMessage',
			'sanitize_callback' => 'wp_filter_nohtml_kses'
		)
		);
		$wp_customize->add_control( 'contact_email',
		array(
			'label' => __( 'Display email', 'shobe' ),
			'type' => 'text',
			'section' => 'contact_section'
		)
		);
		$wp_customize->selective_refresh->add_partial( 'contact_email',
		array(
			'selector' => '.contact',
			'container_inclusive' => false,
			'render_callback' => function() {
				echo shobe_get_contact_address();
			},
			'fallback_refresh' => true
		)
		);
		
/*------------------------------------------------------------------------- Social Icons Section */
		$wp_customize->add_section( 'social_icons_section',
			array(
				'title' => __( 'Social Icons', 'shobe' ),
				'description' => esc_html__( 'Add your social media links and we\'ll automatically match them with the appropriate icons. Drag and drop the URLs to rearrange their order.', 'shobe' ),
				'panel' => 'panel_about'
			)
		);
		// Add our Checkbox switch setting and control for opening URLs in a new tab
		$wp_customize->add_setting( 'social_newtab',
		array(
			'transport' => 'postMessage',
			'sanitize_callback' => 'skyrocket_switch_sanitization'
		)
		);
		$wp_customize->add_control( new Skyrocket_Toggle_Switch_Custom_control( $wp_customize, 'social_newtab',
		array(
			'label' => __( 'Open in new browser tab', 'shobe' ),
			'section' => 'social_icons_section'
		)
		) );
		$wp_customize->selective_refresh->add_partial( 'social_newtab',
		array(
			'selector' => '.social',
			'container_inclusive' => false,
			'render_callback' => function() {
				echo get_social_media();
			},
			'fallback_refresh' => true
		)
		);
		// Add our Sortable Repeater setting and Custom Control for Social media URLs
		$wp_customize->add_setting( 'social_urls',
			array(
				'transport' => 'postMessage',
				'sanitize_callback' => 'skyrocket_url_sanitization'
			)
		);
		$wp_customize->add_control( new Skyrocket_Sortable_Repeater_Custom_Control( $wp_customize, 'social_urls',
			array(
				'label' => __( 'Social URLs', 'shobe' ),
				'description' => esc_html__( 'Add your social media links.', 'shobe' ),
				'section' => 'social_icons_section',
				'button_labels' => array(
					'add' => __( 'Add Icon', 'shobe' ),
				)
			)
		) );
		$wp_customize->selective_refresh->add_partial( 'social_urls',
			array(
				'selector' => '.social',
				'container_inclusive' => false,
				'render_callback' => function() {
					echo get_social_media();
				},
				'fallback_refresh' => true
			)
		);

		// Add our Single Accordion setting and Custom Control to list the available Social Media icons
		$shobe_socialIconsList = array(
			'Behance' => __( '<i class="bi bi-behance"></i>', 'shobe' ),
			
			'Discord' => __( '<i class="bi bi-discord"></i>', 'shobe' ),
			'Dribbble' => __( '<i class="bi bi-dribbble"></i>', 'shobe' ),
			'Facebook' => __( '<i class="bi bi-facebook"></i>', 'shobe' ),
			'GitHub' => __( '<i class="bi bi-github"></i>', 'shobe' ),
			'Instagram' => __( '<i class="bi bi-instagram"></i>', 'shobe' ),			
			'LinkedIn' => __( '<i class="bi bi-linkedin"></i>', 'shobe' ),
			'Mastadon' => __( '<i class="bi bi-mastodon"></i>', 'shobe' ),
			'Medium' => __( '<i class="bi bi-medium"></i>', 'shobe' ),
			'Pinterest' => __( '<i class="bi bi-pinterest"></i>', 'shobe' ),
			'Quora' => __( '<i class="bi bi-quora"></i>', 'shobe' ),
			'Reddit' => __( '<i class="bi bi-reddit-alien"></i>', 'shobe' ),
			'Slack' => __( '<i class="bi bi-slack"></i>', 'shobe' ),
			'Snapchat' => __( '<i class="bi bi-snapchat"></i>', 'shobe' ),
			'Spotify' => __( '<i class="bi bi-spotify"></i>', 'shobe' ),
			'Stack Overflow' => __( '<i class="bi bi-stack-overflow"></i>', 'shobe' ),
			'Steam' => __( '<i class="bi bi-steam"></i>', 'shobe' ),
			'Telegram' => __( '<i class="bi bi-telegram"></i>', 'shobe' ),
			'TikTok' => __( '<i class="bi bi-tiktok"></i>', 'shobe' ),
			'Twitch' => __( '<i class="bi bi-twitch"></i>', 'shobe' ),
			'Twitter' => __( '<i class="bi bi-twitter-x"></i>', 'shobe' ),
			'Unity' => __( '<i class="bi bi-unity"></i>', 'shobe' ),
			'Vimeo' => __( '<i class="bi bi-vimeo"></i>', 'shobe' ),
			'Weibo' => __( '<i class="bi bi-sina-weibo"></i>', 'shobe' ),
			'WhatsApp' => __( '<i class="bi bi-whatsapp"></i>', 'shobe' ),
			'YouTube' => __( '<i class="bi bi-youtube"></i>', 'shobe' ),
		);

		$wp_customize->add_setting( 'social_url_icons',
			array(
				'transport' => 'refresh',
				'sanitize_callback' => 'skyrocket_text_sanitization'
			)
		);
		$wp_customize->add_control( new Skyrocket_Single_Accordion_Custom_Control( $wp_customize, 'social_url_icons',
			array(
				'label' => __( 'View list of available icons', 'shobe' ),
				'description' => $shobe_socialIconsList,
				'section' => 'social_icons_section'
			)
		) );


	
################################ End ShoBe About Options ################################################			

}

/**
 * Load all our Customizer Custom Controls
 */
require_once trailingslashit( get_template_directory()) . 'framework/classes/custom-controls.php';
require_once trailingslashit( get_template_directory()) . 'framework/classes/library.php';

add_action( 'customize_register', 'shobe_customizer' );

function shobe_sanitize_checkbox( $checked ){
    //returns true if checkbox is checked
    return ( ( isset( $checked ) && true == $checked ) ? true : false );
}
