<?php

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

			
			//back to top
		$wp_customize->add_setting('wrockmetro_pagenavi_on',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'wrockmetro_customize_sanitize_select'
			));
		$wp_customize->add_control('wrockmetro_pagenavi_on',
			 array (                             
				'type' => 'radio',
				'label' => __('Page Navigation Enable or Disable','wrock-metro'),
				'settings'   => 'wrockmetro_pagenavi_on',
				'section' => 'wrockmetro_page_navi',
				'choices' => array(
					'enable' => __('Enable','wrock-metro'),
					'disable' => __('Disable','wrock-metro'),
				 ),
			 ));
			 $wp_customize->add_setting(
				'wrockmetro_pagenavi_position',
				array(
					'transport'         => 'refresh',
					'default'           => 'center',
					'sanitize_callback' => 'wrockmetro_customize_sanitize_select',
				)
			);

			$wp_customize->add_control(
				new wrockmetro_Customizer_Buttonset_Control(
					$wp_customize,
					'wrockmetro_pagenavi_position',
					array(
						'label'           => esc_html__( 'Page Navi Position', 'wrock-metro' ),
						'section'         => 'wrockmetro_page_navi',
						'settings'        => 'wrockmetro_pagenavi_position',
						'priority'        => 10,
						'choices'         => array(
							'start'  => esc_html__( 'Left', 'wrock-metro' ),
							'center'  => esc_html__( 'Center', 'wrock-metro' ),
							'end' => esc_html__( 'Right', 'wrock-metro' ),
						),
					)
				)
			);		 
		 $wp_customize->add_setting( 'wrockmetro_pagenavi_current' , array(
			'default'     => '#5533ff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_pagenavi_current', array(
		'description'        => __( 'Current Active Link (Pro Only)', 'wrock-metro' ),
		'section'    => 'wrockmetro_page_navi',
		'settings'   => 'wrockmetro_pagenavi_current',
		) ) ); 
		 $wp_customize->add_setting( 'wrockmetro_pagenavi_bg' , array(
			'default'     => '#ffffff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_pagenavi_bg', array(
		'description'        => __( 'Pagination background (Pro Only)', 'wrock-metro' ),
		'section'    => 'wrockmetro_page_navi',
		'settings'   => 'wrockmetro_pagenavi_bg',
		) ) );
		 $wp_customize->add_setting( 'wrockmetro_pagenavia_hover' , array(
			'default'     => '#e9ecef',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_pagenavia_hover', array(
		'description'        => __( 'Pagination hover background (Pro Only)', 'wrock-metro' ),
		'section'    => 'wrockmetro_page_navi',
		'settings'   => 'wrockmetro_pagenavia_hover',
		) ) );		
		$wp_customize->add_setting( 'wrockmetro_pagenavia_textcurrent' , array(
			'default'     => '#ffffff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_pagenavia_textcurrent', array(
		'description'        => __( 'Text color active (Pro Only)', 'wrock-metro' ),
		'section'    => 'wrockmetro_page_navi',
		'settings'   => 'wrockmetro_pagenavia_textcurrent',
		) ) );
		$wp_customize->add_setting( 'wrockmetro_pagenavia_text' , array(
			'default'     => '#5533ff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'wrockmetro_pagenavia_text', array(
		'description'        => __( 'Text color (Pro Only)', 'wrock-metro' ),
		'section'    => 'wrockmetro_page_navi',
		'settings'   => 'wrockmetro_pagenavia_text',
		) ) );

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