<?php
function automotive_services_social_media_header_settings( $wp_customize ) {
$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';

	/*=========================================
	Social Media
	=========================================*/
	$wp_customize->add_section(
        'automotive_services_social_media_header',
        array(
        	'priority'      => 3,
            'title' 		=> __('Social Media','automotive-services'),
			'panel'  		=> 'automotive_services_frontpage_sections',
		)
    );

   	$wp_customize->add_setting(
    	'automotive_services_social_media_facebook',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'automotive_services_social_media_facebook',
		array(
		    'label'   		=> __('Facebook URL','automotive-services'),
		    'section'		=> 'automotive_services_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'automotive_services_social_media_twitter',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'automotive_services_social_media_twitter',
		array(
		    'label'   		=> __('Twitter URL','automotive-services'),
		    'section'		=> 'automotive_services_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);	

	$wp_customize->add_setting(
    	'automotive_services_social_media_instagram',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'automotive_services_social_media_instagram',
		array(
		    'label'   		=> __('Instagram URL','automotive-services'),
		    'section'		=> 'automotive_services_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting(
    	'automotive_services_social_media_youtube',
    	array(
			'default' => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);	
	$wp_customize->add_control( 
		'automotive_services_social_media_youtube',
		array(
		    'label'   		=> __('Youtube URL','automotive-services'),
		    'section'		=> 'automotive_services_social_media_header',
			'type' 			=> 'url',
			'transport'         => $selective_refresh,
		)  
	);

	$wp_customize->add_setting( 'automotive_services_upgrade_page_settings_15555',
	array(
		'sanitize_callback' => 'sanitize_text_field'
	)
	);
	$wp_customize->add_control( new Automotive_Services_Control_Upgrade(
		$wp_customize, 'automotive_services_upgrade_page_settings_15555',
			array(
				'priority'      => 200,
				'section'       => 'automotive_services_social_media_header',
				'settings'      => 'automotive_services_upgrade_page_settings_15555',
				'label'         => __( 'Automotive Services Pro comes with additional features.', 'automotive-services' ),
				'choices'       => array( __( '15+ Ready-Made Sections', 'automotive-services' ), __( 'One-Click Demo Import', 'automotive-services' ), __( 'WooCommerce Integrated', 'automotive-services' ), __( 'Drag & Drop Section Reordering', 'automotive-services' ),__( 'Advanced Typography Control', 'automotive-services' ),__( 'Intuitive Customization Options', 'automotive-services' ),__( '24/7 Support', 'automotive-services' ), )
			)
		)
	); 

}
add_action( 'customize_register', 'automotive_services_social_media_header_settings' );