<?php

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}  
    
    /*********************
    Navigation
    *******************/
   $wp_customize->add_section(
				'magazinestyle_page_navi',
				array(
					'title'       => __( 'Page Navigation', 'magazine-style' ),
					'capability'  => 'edit_theme_options',						
					'panel'			=> 'panel_general',
				));

			
			//back to top
		$wp_customize->add_setting('magazinestyle_pagenavi_on',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'magazinestyle_customize_sanitize_select'
			));
		$wp_customize->add_control('magazinestyle_pagenavi_on',
			 array (                             
				'type' => 'radio',
				'label' => __('Page Navigation Enable or Disable','magazine-style'),
				'settings'   => 'magazinestyle_pagenavi_on',
				'section' => 'magazinestyle_page_navi',
				'choices' => array(
					'enable' => __('Enable','magazine-style'),
					'disable' => __('Disable','magazine-style'),
				 ),
			 ));
			 $wp_customize->add_setting(
				'magazinestyle_pagenavi_position',
				array(
					'transport'         => 'refresh',
					'default'           => 'center',
					'sanitize_callback' => 'magazinestyle_customize_sanitize_select',
				)
			);

			$wp_customize->add_control(
				new magazinestyle_Customizer_Buttonset_Control(
					$wp_customize,
					'magazinestyle_pagenavi_position',
					array(
						'label'           => esc_html__( 'Page Navi Position', 'magazine-style' ),
						'section'         => 'magazinestyle_page_navi',
						'settings'        => 'magazinestyle_pagenavi_position',
						'priority'        => 10,
						'choices'         => array(
							'start'  => esc_html__( 'Left', 'magazine-style' ),
							'center'  => esc_html__( 'Center', 'magazine-style' ),
							'end' => esc_html__( 'Right', 'magazine-style' ),
						),
					)
				)
			);
		$wp_customize->add_setting(
			'magazinestyle_pagenavi_setcolr',
			array(
				'sanitize_callback' => 'wp_kses',
			));

		$wp_customize->add_control(
			new magazinestyle_Customizer_Heading_Control(
				$wp_customize,
				'magazinestyle_pagenavi_setcolr',
				array(
					'label'    => esc_html__( 'Color Customize (Pro Only)', 'magazine-style' ),
					'section'  => 'magazinestyle_page_navi',
					'priority' => 15,
				)));		 
		 $wp_customize->add_setting( 'magazinestyle_pagenavi_current' , array(
			'default'     => '#5533ff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_pagenavi_current', array(
		'description'        => __( 'Current Active Link', 'magazine-style' ),
		'section'    => 'magazinestyle_page_navi',
		'settings'   => 'magazinestyle_pagenavi_current',
		'priority' => 20,
		) ) ); 
		 $wp_customize->add_setting( 'magazinestyle_pagenavi_bg' , array(
			'default'     => '#ffffff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_pagenavi_bg', array(
		'description'        => __( 'Pagination background', 'magazine-style' ),
		'section'    => 'magazinestyle_page_navi',
		'settings'   => 'magazinestyle_pagenavi_bg',
		'priority' => 25,
		) ) );
		 $wp_customize->add_setting( 'magazinestyle_pagenavia_hover' , array(
			'default'     => '#e9ecef',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_pagenavia_hover', array(
		'description'        => __( 'Pagination hover background', 'magazine-style' ),
		'section'    => 'magazinestyle_page_navi',
		'settings'   => 'magazinestyle_pagenavia_hover',
		'priority' => 30,
		) ) );		
		$wp_customize->add_setting( 'magazinestyle_pagenavia_textcurrent' , array(
			'default'     => '#ffffff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_pagenavia_textcurrent', array(
		'description'        => __( 'Text color active', 'magazine-style' ),
		'section'    => 'magazinestyle_page_navi',
		'settings'   => 'magazinestyle_pagenavia_textcurrent',
		'priority' => 35,
		) ) );
		$wp_customize->add_setting( 'magazinestyle_pagenavia_text' , array(
			'default'     => '#5533ff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'magazinestyle_pagenavia_text', array(
		'description'        => __( 'Text color', 'magazine-style' ),
		'section'    => 'magazinestyle_page_navi',
		'settings'   => 'magazinestyle_pagenavia_text',
		'priority' => 40,
		) ) );

			
			/* $wp_customize->add_setting('magazinestyle_scrolltop_radius', array(
				'default'           => 5,
				'transport'         => 'postMessage',
				'sanitize_callback' => 'absint', // Sanitize as integer
			));
	
			$wp_customize->add_control('magazinestyle_scrolltop_radius', array(
				'type'        => 'range',
				'section'     => 'magazinestyle_page_navi',
				'settings'    => 'magazinestyle_scrolltop_radius',
				'description' => __('Button Radius', 'magazine-style'),
				'priority' => 20,
				'input_attrs' => array(
					'min'  => 1,
					'max'  => 100,
					'step' => 5,
				),
			));	 */