<?php

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

	/*********************
		Header settings.
		*******************/
		
		$wp_customize->add_section(
			'wrockmetro_theme_header_options',
			array(
				'title'       => __( 'Header Settings', 'wrock-metro' ),
				'capability'  => 'edit_theme_options',
				'description' => __( 'Customize Theme Header', 'wrock-metro' ),
				'priority'    => apply_filters( 'wrockmetro_theme_header_options_priority', 160 ),
			)
		);
		$wp_customize->add_setting(
				'wrockmetro_header_heading',
				array(
					'sanitize_callback' => 'wp_kses',
				));

			$wp_customize->add_control(
				new wrockmetro_Customizer_Heading_Control(
					$wp_customize,
					'wrockmetro_header_heading',
					array(
						'label'    => esc_html__( 'Choose Header Style', 'wrock-metro' ),
						'section'  => 'wrockmetro_theme_header_options',
						'priority' => 15,
					)));
	$wp_customize->add_setting(
			'wrockmetro_header_style',
			array(
				'default'           => 'stylefour',
				'type'              => 'theme_mod',
				'sanitize_callback' => 'wrockmetro_customize_sanitize_select',
				'capability'        => 'edit_theme_options',
			)
		);

		$wp_customize->add_control(
			new wrockmetro_Image_Radio_Control(
				$wp_customize,
				'wrockmetro_header_style',
				array(
					'label'       => __( 'Header Style', 'wrock-metro' ),
					'description' => __( 'Choose Theme Header Style. After Choosing & Public You need to REFRESH Website', 'wrock-metro' ),
					'section'     => 'wrockmetro_theme_header_options',
					'choices'     => array(
						'styleone'  => get_template_directory_uri() . '/images/headers/headerstyleone.png',
						'styletwo' => get_template_directory_uri() . '/images/headers/headerstyletwo.png',
						'stylethree' => get_template_directory_uri() . '/images/headers/headerstylethree.png',
						'stylefour' => get_template_directory_uri() . '/images/headers/headerstylefour.png',
						'stylefive' => get_template_directory_uri() . '/images/headers/headerstylefive.png',
					),
					'priority'    => apply_filters( 'wrockmetro_header_style_priority', 20 ),
				)
			));
			
			$wp_customize->add_setting(
				'wrockmetro_styletwo_heading',
				array(
					'sanitize_callback' => 'wp_kses',
				));

			$wp_customize->add_control(
				new wrockmetro_Customizer_Heading_Control(
					$wp_customize,
					'wrockmetro_styletwo_heading',
					array(
						'label'    => esc_html__( 'Header Settings', 'wrock-metro' ),
						'section'  => 'wrockmetro_theme_header_options',
						'priority' => 25,
					)));
			$wp_customize->add_setting(
				'wrockmetro_navbar_type',
				array(
					'default'           => 'collapse',
					'type'              => 'theme_mod',
					'sanitize_callback' => 'wrockmetro_customize_sanitize_select',
					'capability'        => 'edit_theme_options',
				));
	
			$wp_customize->add_control(
				new WP_Customize_Control(
					$wp_customize,
					'wrockmetro_navbar_type',
					array(
						'label'       => __( 'Responsive Navigation Type', 'wrock-metro' ),
						'description' => __(
							'Choose between an expanding and collapsing navbar or an offcanvas drawer.',
							'wrock-metro'
						),
						'section'     => 'wrockmetro_theme_header_options',
						'type'        => 'select',
						'choices'     => array(
							'collapse'  => __( 'Collapse', 'wrock-metro' ),
							'offcanvas' => __( 'Offcanvas', 'wrock-metro' ),
						),
						'priority'    => apply_filters( 'wrockmetro_styletwo_heading_priority', 35 ),
					)));
					
					//Home icon
					$wp_customize->add_setting('wrockmetro_homeicon',	
					array(
						'default'			=> true,
						'type'				=> 'theme_mod',
						'capability'		=> 'edit_theme_options',
						'sanitize_callback'	=> 'wrockmetro_customize_sanitize_checkbox'
					));
				$wp_customize->add_control('wrockmetro_homeicon',
					array (                             
						'type'    => 'checkbox',
						'label' => __('Home Icon','wrock-metro'),
						'description'        => __( 'Display Home Icon in Menu', 'wrock-metro' ),
						'settings'   => 'wrockmetro_homeicon',
						'section' => 'wrockmetro_theme_header_options',
						'priority'    => apply_filters( 'wrockmetro_homeicon_priority', 35 ),
					));	
		//hero under menu
		$wp_customize->add_setting('wrockmetro_heroarea',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'wrockmetro_customize_sanitize_select'
			));
		$wp_customize->add_control('wrockmetro_heroarea',
			 array (                             
				'type' => 'radio',
				'label' => __('Setting For This Header Style','wrock-metro'),
				'description'        => __( 'Hero & Slider Area Under Menu', 'wrock-metro' ),
				'settings'   => 'wrockmetro_heroarea',
				'section' => 'wrockmetro_theme_header_options',
				'choices' => array(
					'enable' => __('Under Menu','wrock-metro'),
					'disable' => __('Clear Menu','wrock-metro'),
				 ),
				 'priority'    => apply_filters( 'wrockmetro_styletwo_heading_priority', 40 ),
				 'active_callback' => 'wrockmetro_header_selected_styletwo',
			 ));
			 
		//hero under menu
		$wp_customize->add_setting('wrockmetro_stickymenu',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'wrockmetro_customize_sanitize_select'
			));
		$wp_customize->add_control('wrockmetro_stickymenu',
			 array (                             
				'type' => 'radio',
				'description'        => __( 'Sticky Menu', 'wrock-metro' ),
				'settings'   => 'wrockmetro_stickymenu',
				'section' => 'wrockmetro_theme_header_options',
				'choices' => array(
					'sticky-top' => __('Enable','wrock-metro'),
					'nonfixed' => __('Disable','wrock-metro'),
				 ),
				 'priority'    => apply_filters( 'wrockmetro_styletwo_heading_priority', 30 ),
				 'active_callback' => 'wrockmetro_header_selected_styletwo',
			 ));
			 $wp_customize->add_setting('wrockmetro_styletwo_logosize', array(
				'default'           => 10,
				'transport'         => 'refresh',
				'sanitize_callback' => 'absint', // Sanitize as integer
			));
	
			$wp_customize->add_control('wrockmetro_styletwo_logosize', array(
				'type'        => 'range',
				'section'     => 'wrockmetro_theme_header_options',
				'settings'    => 'wrockmetro_styletwo_logosize',
				'description' => __('Logo Size in Percentage (%)', 'wrock-metro'),
				'active_callback' => 'wrockmetro_header_selected_styletwo',
				'priority' => 30,
				'input_attrs' => array(
					'min'  => 1,
					'max'  => 100,
					'step' => 5,
				),
			));	 
		$wp_customize->add_setting('wrockmetro_styletwo_headingcolor',
				array(
					'sanitize_callback' => 'wp_kses',
				));

		$wp_customize->add_control(	new wrockmetro_Customizer_Heading_Control(
					$wp_customize,
					'wrockmetro_styletwo_headingcolor',
					array(
						'label'    => esc_html__( 'Colors', 'wrock-metro' ),
						'section'  => 'wrockmetro_theme_header_options',
						 'priority'    => apply_filters( 'wrockmetro_styletwo_headingcolor_priority', 35 ),
					)));	 
		$wp_customize->add_setting( 'wrockmetro_heroarea_links' , array(
			'default'     => '#343434',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_heroarea_links', array(
			'description'        => __( 'Menu Link Color', 'wrock-metro' ),
			'section'    => 'wrockmetro_theme_header_options',
			'settings'   => 'wrockmetro_heroarea_links',
			'priority'    => apply_filters( 'wrockmetro_styletwo_heading_priority', 40 ),			
			'active_callback' => 'wrockmetro_header_selected_styletwo',
		) ) );		 
		$wp_customize->add_setting( 'wrockmetro_heroarea_links_hover' , array(
			'default'     => '#FF9800',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_heroarea_links_hover', array(
			'description'        => __( 'Menu Link Hover Color ', 'wrock-metro' ),
			'section'    => 'wrockmetro_theme_header_options',
			'settings'   => 'wrockmetro_heroarea_links_hover',
			'priority'    => apply_filters( 'wrockmetro_styletwo_heading_priority', 40 ),		
			'active_callback' => 'wrockmetro_header_selected_styletwo',
		) ) );
		
			//top menu bg
		$wp_customize->add_setting( 'wrockmetro_topnavbgcolor' , array(
			'default'     => '#3387d0',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_topnavbgcolor', array(
		'label'        => __( 'Top Navigation (Pro Only)', 'wrock-metro' ),
		'description'        => __( 'Top Navigation Background Color', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_topnavbgcolor',
		'priority'    => apply_filters( 'wrockmetro_topnavbgcolor_priority', 40 ),
		'active_callback' => 'wrockmetro_header_selected_styleone',
		) ) );	
		// top menu hover						
		$wp_customize->add_setting( 'wrockmetro_topnavhover' , array(
			'default'     => '#359BED',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_topnavhover', array(
		'description'        => __( 'Top Navigation Hover', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_topnavhover',
		'priority'    => apply_filters( 'wrockmetro_topnavhover_priority', 40 ),
		'active_callback' => 'wrockmetro_header_selected_styleone',
		) ) );
		// top menu text color						
		$wp_customize->add_setting( 'wrockmetro_topnavtext' , array(
			'default'     => '#fcfcfc',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );

			$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_topnavtext', array(
			'description'  => __( 'Top Navigation Text', 'wrock-metro' ),
			'section'    => 'wrockmetro_theme_header_options',
			'settings'   => 'wrockmetro_topnavtext',
			'priority'    => apply_filters( 'wrockmetro_topnavtext_priority', 50 ),
			'active_callback' => 'wrockmetro_header_selected_styleone',
			) ) );
			
		
		//Primary menu
		$wp_customize->add_setting( 'wrockmetro_primarymenubg' , array(
			'default'     => '#485561',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_primarymenubg', array(
		'label'        => __( 'Primary Navigation Menu Background Color (Pro Only)', 'wrock-metro' ),
		'description'        => __( 'First Color ', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_primarymenubg',
		'priority'    => apply_filters( 'wrockmetro_primarymenubg_priority', 60 ),
		'active_callback' => 'wrockmetro_header_selected_styleone',
		) ) );
		$wp_customize->add_setting( 'wrockmetro_primarymenubgs' , array(
			'default'     => '#56636f',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_primarymenubgs', array(
		'description'        => __( 'Second Color', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_primarymenubgs',
		'priority'    => apply_filters( 'wrockmetro_topnavbgcolor_priority', 60 ),
		'active_callback' => 'wrockmetro_header_selected_styleone',
		) ) );	
		
		//Primary menu text
		$wp_customize->add_setting( 'wrockmetro_primarymenutext' , array(
			'default'     => '#ffffff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_primarymenutext', 
		array(
		'description'        => __( 'Primary Navigation Background Color', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_primarymenutext',
		'priority'    => apply_filters( 'wrockmetro_primarymenutext_priority', 70 ),
		'active_callback' => 'wrockmetro_header_selected_styleone',
		) ) );		
		//Primary menu text Hover
		$wp_customize->add_setting( 'wrockmetro_primarymenuhover' , array(
			'default'     => '#359BED',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_primarymenuhover', array(
		'description'        => __( 'Primary Navigation Hover', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_primarymenuhover',
		'priority'    => apply_filters( 'wrockmetro_primarymenuhover_priority', 90 ),	
		) ) );	
		$wp_customize->add_setting( 'wrockmetro_primarymenuhovertext' , array(
			'default'     => '#f3f3f3',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_primarymenuhovertext', array(
		'description'        => __( 'Primary Navigation Hover', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_primarymenuhovertext',
		'priority'    => apply_filters( 'wrockmetro_primarymenuhovertext_priority', 100 ),
		) ) );
		
		/************
		* Header Style Three
		*********/		
		
		$wp_customize->add_setting(
			'wrockmetro_topnavi_leftthree',
			array(
				'default'           => '<i class="fa fa-mobile" aria-hidden="true"></i> +123456789',
				'type'              => 'theme_mod',
				'sanitize_callback' => 'wp_kses_post',
				'capability'        => 'edit_theme_options',
			));
		$wp_customize->add_control(
			new WP_Customize_Control(
				$wp_customize,
				'wrockmetro_topnavi_leftthree',
				array( 
					'label'       => __( 'Top Navi Left Side HTML Allowed', 'wrock-metro' ),
					'section'     => 'wrockmetro_theme_header_options',
					'type'        => 'textarea',
					'priority'    => 60,
				)));
		$wp_customize->add_setting(
			'wrockmetro_topnavi_rightthree',
			array(
				'default'           => 'Get The Latest Offers On Our Products',
				'type'              => 'theme_mod',
				'sanitize_callback' => 'wp_kses_post',
				'capability'        => 'edit_theme_options',
			));
		$wp_customize->add_control(
			new WP_Customize_Control(
				$wp_customize,
				'wrockmetro_topnavi_rightthree',
				array( 
					'label'       => __( 'Top Navi Right Side HTML Allowed', 'wrock-metro' ),
					'section'     => 'wrockmetro_theme_header_options',
					'type'        => 'textarea',
					'priority'    => 60,
				)));
			$wp_customize->add_setting('wrockmetro_topnavi_enablethree',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'wrockmetro_customize_sanitize_select'
			));
		$wp_customize->add_control('wrockmetro_topnavi_enablethree',
				array (                             
				'type' => 'radio',
				'label' => __('Enable or Disable Top Bar','wrock-metro'),
				'settings'   => 'wrockmetro_topnavi_enablethree',
				'section' => 'wrockmetro_theme_header_options',
				'transport'   => 'refresh',
				'choices' => array(
					'enable' => __('Enable','wrock-metro'),
					'disable' => __('Disable','wrock-metro'),
					),
					'priority'    => apply_filters( 'wrockmetro_topnavi_enablethree', 65 ),
				));	
		//Top Navi bg
		$wp_customize->add_setting( 'wrockmetro_topnavibg_three' , array(
			'default'     => '#3e4451',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_topnavibg_three', 
		array(
		'label'        => __( 'Color (Pro Only)', 'wrock-metro' ),
		'description'        => __( 'Top Bar Background Color', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_topnavibg_three',
		'priority'    => apply_filters( 'wrockmetro_primarymenutext_priority', 70 ),
		) ) );
		//Top Navi text
		$wp_customize->add_setting( 'wrockmetro_topnavitext_three' , array(
			'default'     => '#e0e0e0',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_topnavitext_three', 
		array(
		'description'        => __( 'Top Bar Text Color', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_topnavitext_three',
		'priority'    => apply_filters( 'wrockmetro_primarymenutext_priority', 75 ),

		) ) );
		//Primary Background Color
		$wp_customize->add_setting( 'wrockmetro_primarymenubg_three' , array(
			'default'     => '#ffffff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_primarymenubg_three', 
		array(
		'description'        => __( 'Primary Navigation Background Color', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_primarymenubg_three',
		'priority'    => apply_filters( 'wrockmetro_primarymenubg_three_priority', 80 ),
		) ) );
		//Primary menu text
		$wp_customize->add_setting( 'wrockmetro_primarymenutext_three' , array(
			'default'     => '#2f2b2b',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_primarymenutext_three', 
		array(
		'description'        => __( 'Primary Navigation Text Color', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_primarymenutext_three',
		'priority'    => apply_filters( 'wrockmetro_primarymenutext_priority', 80 ),
		) ) );
		//Primary menu text hover
		$wp_customize->add_setting( 'wrockmetro_primarymenutexthover_three' , array(
			'default'     => '#3d951e',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_primarymenutexthover_three', 
		array(
		'description'        => __( 'Primary Navigation Text Hover Color', 'wrock-metro' ),
		'section'    => 'wrockmetro_theme_header_options',
		'settings'   => 'wrockmetro_primarymenutexthover_three',
		'priority'    => apply_filters( 'wrockmetro_primarymenutext_priority', 85 ),
		) ) );