<?php

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

	/*********************
		Header settings.
		*******************/
		
		$wp_customize->add_section(
			'magazinestyle_theme_header_options',
			array(
				'title'       => __( 'Header Settings', 'magazine-style' ),
				'capability'  => 'edit_theme_options',
				'description' => __( 'Customize Theme Header', 'magazine-style' ),
				'priority'    => apply_filters( 'magazinestyle_theme_header_options_priority', 160 ),
			)
		);
		$wp_customize->add_setting(
				'magazinestyle_header_heading',
				array(
					'sanitize_callback' => 'wp_kses',
				));

			$wp_customize->add_control(
				new magazinestyle_Customizer_Heading_Control(
					$wp_customize,
					'magazinestyle_header_heading',
					array(
						'label'    => esc_html__( 'Choose Header Style', 'magazine-style' ),
						'section'  => 'magazinestyle_theme_header_options',
						'priority' => 15,
					)));
	$wp_customize->add_setting(
			'magazinestyle_header_style',
			array(
				'default'           => 'stylefive',
				'type'              => 'theme_mod',
				'sanitize_callback' => 'magazinestyle_customize_sanitize_select',
				'capability'        => 'edit_theme_options',
			)
		);

		$wp_customize->add_control(
			new magazinestyle_Image_Radio_Control(
				$wp_customize,
				'magazinestyle_header_style',
				array(
					'label'       => __( 'Header Style', 'magazine-style' ),
					'description' => __( 'Choose Theme Header Style. After Choosing & Public You need to REFRESH Website', 'magazine-style' ),
					'section'     => 'magazinestyle_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( 'magazinestyle_header_style_priority', 20 ),
				)
			));
			
			$wp_customize->add_setting(
				'magazinestyle_styletwo_heading',
				array(
					'sanitize_callback' => 'wp_kses',
				));

			$wp_customize->add_control(
				new magazinestyle_Customizer_Heading_Control(
					$wp_customize,
					'magazinestyle_styletwo_heading',
					array(
						'label'    => esc_html__( 'Header Settings', 'magazine-style' ),
						'section'  => 'magazinestyle_theme_header_options',
						'priority' => 25,
					)));
			$wp_customize->add_setting(
				'magazinestyle_navbar_type',
				array(
					'default'           => 'collapse',
					'type'              => 'theme_mod',
					'sanitize_callback' => 'magazinestyle_customize_sanitize_select',
					'capability'        => 'edit_theme_options',
				));
	
			$wp_customize->add_control(
				new WP_Customize_Control(
					$wp_customize,
					'magazinestyle_navbar_type',
					array(
						'label'       => __( 'Responsive Navigation Type', 'magazine-style' ),
						'description' => __(
							'Choose between an expanding and collapsing navbar or an offcanvas drawer.',
							'magazine-style'
						),
						'section'     => 'magazinestyle_theme_header_options',
						'type'        => 'select',
						'choices'     => array(
							'collapse'  => __( 'Collapse', 'magazine-style' ),
							'offcanvas' => __( 'Offcanvas', 'magazine-style' ),
						),
						'priority'    => apply_filters( 'magazinestyle_styletwo_heading_priority', 30 ),
					)));
					//Home icon
					$wp_customize->add_setting('magazinestyle_homeicon',	
					array(
						'default'			=> true,
						'type'				=> 'theme_mod',
						'capability'		=> 'edit_theme_options',
						'sanitize_callback'	=> 'magazinestyle_customize_sanitize_checkbox'
					));
				$wp_customize->add_control('magazinestyle_homeicon',
					array (                             
						'type'    => 'checkbox',
						'label' => __('Home Icon','magazine-style'),
						'description'        => __( 'Display Home Icon in Menu', 'magazine-style' ),
						'settings'   => 'magazinestyle_homeicon',
						'section' => 'magazinestyle_theme_header_options',
						'priority'    => apply_filters( 'magazinestyle_homeicon_priority', 35 ),
					));	
		//hero under menu
		$wp_customize->add_setting('magazinestyle_heroarea',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'magazinestyle_customize_sanitize_select'
			));
		$wp_customize->add_control('magazinestyle_heroarea',
			 array (                             
				'type' => 'radio',
				'label' => __('Setting For This Header Style','magazine-style'),
				'description'        => __( 'Hero & Slider Area Under Menu', 'magazine-style' ),
				'settings'   => 'magazinestyle_heroarea',
				'section' => 'magazinestyle_theme_header_options',
				'choices' => array(
					'enable' => __('Under Menu','magazine-style'),
					'disable' => __('Clear Menu','magazine-style'),
				 ),
				 'priority'    => apply_filters( 'magazinestyle_styletwo_heading_priority', 40 ),
				 'active_callback' => 'magazinestyle_header_selected_styletwo',
			 ));
			 
		//hero under menu
		$wp_customize->add_setting('magazinestyle_stickymenu',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'magazinestyle_customize_sanitize_select'
			));
		$wp_customize->add_control('magazinestyle_stickymenu',
			 array (                             
				'type' => 'radio',
				'description'        => __( 'Sticky Menu', 'magazine-style' ),
				'settings'   => 'magazinestyle_stickymenu',
				'section' => 'magazinestyle_theme_header_options',
				'choices' => array(
					'sticky-top' => __('Enable','magazine-style'),
					'nonfixed' => __('Disable','magazine-style'),
				 ),
				 'priority'    => apply_filters( 'magazinestyle_styletwo_heading_priority', 30 ),
				 'active_callback' => 'magazinestyle_header_selected_styletwo',
			 ));
			 $wp_customize->add_setting('magazinestyle_styletwo_logosize', array(
				'default'           => 10,
				'transport'         => 'refresh',
				'sanitize_callback' => 'absint', // Sanitize as integer
			));
	
			$wp_customize->add_control('magazinestyle_styletwo_logosize', array(
				'type'        => 'range',
				'section'     => 'magazinestyle_theme_header_options',
				'settings'    => 'magazinestyle_styletwo_logosize',
				'description' => __('Logo Size in Percentage (%)', 'magazine-style'),
				'active_callback' => 'magazinestyle_header_selected_styletwo',
				'priority' => 30,
				'input_attrs' => array(
					'min'  => 1,
					'max'  => 100,
					'step' => 5,
				),
			));	 
		$wp_customize->add_setting('magazinestyle_styletwo_headingcolor',
				array(
					'sanitize_callback' => 'wp_kses',
				));

		$wp_customize->add_control(	new magazinestyle_Customizer_Heading_Control(
					$wp_customize,
					'magazinestyle_styletwo_headingcolor',
					array(
						'label'    => esc_html__( 'Colors & Design (Pro Only)', 'magazine-style' ),
						'section'  => 'magazinestyle_theme_header_options',
						 'priority'    => apply_filters( 'magazinestyle_styletwo_headingcolor_priority', 35 ),
					)));	 
		$wp_customize->add_setting( 'magazinestyle_heroarea_links' , array(
			'default'     => '#343434',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_heroarea_links', array(
			'description'        => __( 'Menu Link Color', 'magazine-style' ),
			'section'    => 'magazinestyle_theme_header_options',
			'settings'   => 'magazinestyle_heroarea_links',
			'priority'    => apply_filters( 'magazinestyle_styletwo_heading_priority', 40 ),			
			'active_callback' => 'magazinestyle_header_selected_styletwo',
		) ) );		 
		$wp_customize->add_setting( 'magazinestyle_heroarea_links_hover' , array(
			'default'     => '#FF9800',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_heroarea_links_hover', array(
			'description'        => __( 'Menu Link Hover Color ', 'magazine-style' ),
			'section'    => 'magazinestyle_theme_header_options',
			'settings'   => 'magazinestyle_heroarea_links_hover',
			'priority'    => apply_filters( 'magazinestyle_styletwo_heading_priority', 40 ),		
			'active_callback' => 'magazinestyle_header_selected_styletwo',
		) ) );
		
			//top menu bg
		$wp_customize->add_setting( 'magazinestyle_topnavbgcolor' , array(
			'default'     => '#3387d0',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_topnavbgcolor', array(
		'label'        => __( 'Top Navigation', 'magazine-style' ),
		'description'        => __( 'Top Navigation Background Color', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_topnavbgcolor',
		'priority'    => apply_filters( 'magazinestyle_topnavbgcolor_priority', 40 ),
		'active_callback' => 'magazinestyle_header_selected_styleone',
		) ) );	
		// top menu hover						
		$wp_customize->add_setting( 'magazinestyle_topnavhover' , array(
			'default'     => '#359BED',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_topnavhover', array(
		'description'        => __( 'Top Navigation Hover', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_topnavhover',
		'priority'    => apply_filters( 'magazinestyle_topnavhover_priority', 40 ),
		'active_callback' => 'magazinestyle_header_selected_styleone',
		) ) );
		// top menu text color						
		$wp_customize->add_setting( 'magazinestyle_topnavtext' , array(
			'default'     => '#fcfcfc',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );

			$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_topnavtext', array(
			'description'  => __( 'Top Navigation Text', 'magazine-style' ),
			'section'    => 'magazinestyle_theme_header_options',
			'settings'   => 'magazinestyle_topnavtext',
			'priority'    => apply_filters( 'magazinestyle_topnavtext_priority', 50 ),
			'active_callback' => 'magazinestyle_header_selected_styleone',
			) ) );
			
		
		//Primary menu
		$wp_customize->add_setting( 'magazinestyle_primarymenubg' , array(
			'default'     => '#485561',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarymenubg', array(
		'label'        => __( 'Primary Navigation Menu Background Color', 'magazine-style' ),
		'description'        => __( 'First Color ', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarymenubg',
		'priority'    => apply_filters( 'magazinestyle_primarymenubg_priority', 60 ),
		'active_callback' => 'magazinestyle_header_selected_styleone',
		) ) );
		$wp_customize->add_setting( 'magazinestyle_primarymenubgs' , array(
			'default'     => '#56636f',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarymenubgs', array(
		'description'        => __( 'Second Color', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarymenubgs',
		'priority'    => apply_filters( 'magazinestyle_topnavbgcolor_priority', 60 ),
		'active_callback' => 'magazinestyle_header_selected_styleone',
		) ) );	
		
		//Primary menu text
		$wp_customize->add_setting( 'magazinestyle_primarymenutext' , array(
			'default'     => '#ffffff',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarymenutext', 
		array(
		'description'        => __( 'Primary Navigation Background Color', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarymenutext',
		'priority'    => apply_filters( 'magazinestyle_primarymenutext_priority', 70 ),
		'active_callback' => 'magazinestyle_header_selected_styleone',
		) ) );		
		//Primary menu text Hover
		$wp_customize->add_setting( 'magazinestyle_primarymenuhover' , array(
			'default'     => '#359BED',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarymenuhover', array(
		'description'        => __( 'Primary Navigation Hover', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarymenuhover',
		'priority'    => apply_filters( 'magazinestyle_primarymenuhover_priority', 90 ),	
		) ) );	
		$wp_customize->add_setting( 'magazinestyle_primarymenuhovertext' , array(
			'default'     => '#f3f3f3',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarymenuhovertext', array(
		'description'        => __( 'Primary Navigation Hover', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarymenuhovertext',
		'priority'    => apply_filters( 'magazinestyle_primarymenuhovertext_priority', 100 ),
		) ) );
		
		/************
		* Header Style Five
		*********/		
		//Primary menu text
		$wp_customize->add_setting( 'magazinestyle_primarybgfive' , array(
			'default'     => '#383e41',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarybgfive', 
		array(
		'description'        => __( 'Primary Navigation Background Color', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarybgfive',
		'priority'    => apply_filters( 'magazinestyle_primarybgfive_priority', 70 ),
		'active_callback' => 'magazinestyle_header_selected_stylefive',
		) ) );		
		//Primary menu text Hover
		$wp_customize->add_setting( 'magazinestyle_primarymenuhoverfive' , array(
			'default'     => '#F44336',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarymenuhoverfive', array(
		'description'        => __( 'Hover Color - Primary Menu', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarymenuhoverfive',
		'priority'    => apply_filters( 'magazinestyle_primarymenuhoverfive_priority', 90 ),
		'active_callback' => 'magazinestyle_header_selected_stylefive',	
		) ) );	
		$wp_customize->add_setting( 'magazinestyle_primarytextfive' , array(
			'default'     => '#ffffff',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarytextfive', array(
		'description'        => __( 'Text Color - Primary Menu', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarytextfive',
		'priority'    => apply_filters( 'magazinestyle_primarytextfive_priority', 100 ),
		'active_callback' => 'magazinestyle_header_selected_stylefive',
		) ) );
		$wp_customize->add_setting( 'magazinestyle_primarymenuhovertextfive' , array(
			'default'     => '#ffffff',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarymenuhovertextfive', array(
		'description'        => __( 'Hover Text Color - Primary Menu', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarymenuhovertextfive',
		'priority'    => apply_filters( 'magazinestyle_primarymenuhovertextfive_priority', 100 ),
		'active_callback' => 'magazinestyle_header_selected_stylefive',
		) ) );
		$wp_customize->add_setting( 'magazinestyle_primarybordercolorfive' , array(
			'default'     => '#F44336',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarybordercolorfive', array(
		'description'        => __( 'Border Color - Primary Navigation', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarybordercolorfive',
		'priority'    => apply_filters( 'magazinestyle_primarybordercolorfive_priority', 100 ),
		'active_callback' => 'magazinestyle_header_selected_stylefive',
		) ) );
		
		/************
		* Header Style Three
		*********/		
		
		$wp_customize->add_setting(
			'magazinestyle_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,
				'magazinestyle_topnavi_leftthree',
				array( 
					'label'       => __( 'Top Navi Left Side HTML Allowed', 'magazine-style' ),
					'section'     => 'magazinestyle_theme_header_options',
					'type'        => 'textarea',
					'priority'    => 60,
				)));
		$wp_customize->add_setting(
			'magazinestyle_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,
				'magazinestyle_topnavi_rightthree',
				array( 
					'label'       => __( 'Top Navi Right Side HTML Allowed', 'magazine-style' ),
					'section'     => 'magazinestyle_theme_header_options',
					'type'        => 'textarea',
					'priority'    => 60,
				)));
			$wp_customize->add_setting('magazinestyle_topnavi_enablethree',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'magazinestyle_customize_sanitize_select'
			));
		$wp_customize->add_control('magazinestyle_topnavi_enablethree',
				array (                             
				'type' => 'radio',
				'label' => __('Enable or Disable Top Bar','magazine-style'),
				'settings'   => 'magazinestyle_topnavi_enablethree',
				'section' => 'magazinestyle_theme_header_options',
				'transport'   => 'refresh',
				'choices' => array(
					'enable' => __('Enable','magazine-style'),
					'disable' => __('Disable','magazine-style'),
					),
					'priority'    => apply_filters( 'magazinestyle_topnavi_enablethree', 65 ),
				));	
		//Top Navi bg
		$wp_customize->add_setting( 'magazinestyle_topnavibg_three' , array(
			'default'     => '#3e4451',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_topnavibg_three', 
		array(
		'description'        => __( 'Top Bar Background Color', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_topnavibg_three',
		'priority'    => apply_filters( 'magazinestyle_primarymenutext_priority', 70 ),
		) ) );
		//Top Navi text
		$wp_customize->add_setting( 'magazinestyle_topnavitext_three' , array(
			'default'     => '#e0e0e0',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_topnavitext_three', 
		array(
		'description'        => __( 'Top Bar Text Color', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_topnavitext_three',
		'priority'    => apply_filters( 'magazinestyle_primarymenutext_priority', 75 ),

		) ) );
		//Primary Background Color
		$wp_customize->add_setting( 'magazinestyle_primarymenubg_three' , array(
			'default'     => '#ffffff',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarymenubg_three', 
		array(
		'description'        => __( 'Primary Navigation Background Color', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarymenubg_three',
		'priority'    => apply_filters( 'magazinestyle_primarymenubg_three_priority', 80 ),
		) ) );
		//Primary menu text
		$wp_customize->add_setting( 'magazinestyle_primarymenutext_three' , array(
			'default'     => '#2f2b2b',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarymenutext_three', 
		array(
		'description'        => __( 'Primary Navigation Text Color', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarymenutext_three',
		'priority'    => apply_filters( 'magazinestyle_primarymenutext_priority', 80 ),
		) ) );
		//Primary menu text hover
		$wp_customize->add_setting( 'magazinestyle_primarymenutexthover_three' , array(
			'default'     => '#3d951e',
			'transport'   => 'refresh',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_primarymenutexthover_three', 
		array(
		'description'        => __( 'Primary Navigation Text Hover Color', 'magazine-style' ),
		'section'    => 'magazinestyle_theme_header_options',
		'settings'   => 'magazinestyle_primarymenutexthover_three',
		'priority'    => apply_filters( 'magazinestyle_primarymenutext_priority', 85 ),
		) ) );