<?php

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

			
			//back to top
		$wp_customize->add_setting('poster_pagenavi_on',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'poster_customize_sanitize_select'
			));
		$wp_customize->add_control('poster_pagenavi_on',
			 array (                             
				'type' => 'radio',
				'label' => __('Page Navigation Enable or Disable','poster'),
				'settings'   => 'poster_pagenavi_on',
				'section' => 'poster_page_navi',
				'choices' => array(
					'enable' => __('Enable','poster'),
					'disable' => __('Disable','poster'),
				 ),
			 ));
			 $wp_customize->add_setting(
				'poster_pagenavi_position',
				array(
					'transport'         => 'refresh',
					'default'           => 'center',
					'sanitize_callback' => 'poster_customize_sanitize_select',
				)
			);

			$wp_customize->add_control(
				new poster_Customizer_Buttonset_Control(
					$wp_customize,
					'poster_pagenavi_position',
					array(
						'label'           => esc_html__( 'Page Navi Position', 'poster' ),
						'section'         => 'poster_page_navi',
						'settings'        => 'poster_pagenavi_position',
						'priority'        => 10,
						'choices'         => array(
							'start'  => esc_html__( 'Left', 'poster' ),
							'center'  => esc_html__( 'Center', 'poster' ),
							'end' => esc_html__( 'Right', 'poster' ),
						),
					)
				)
			);		 
		 $wp_customize->add_setting( 'poster_pagenavi_current' , array(
			'default'     => '#5533ff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'poster_pagenavi_current', array(
		'description'        => __( 'Current Active Link (Pro Only)', 'poster' ),
		'section'    => 'poster_page_navi',
		'settings'   => 'poster_pagenavi_current',
		) ) ); 
		 $wp_customize->add_setting( 'poster_pagenavi_bg' , array(
			'default'     => '#ffffff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'poster_pagenavi_bg', array(
		'description'        => __( 'Pagination background (Pro Only)', 'poster' ),
		'section'    => 'poster_page_navi',
		'settings'   => 'poster_pagenavi_bg',
		) ) );
		 $wp_customize->add_setting( 'poster_pagenavia_hover' , array(
			'default'     => '#e9ecef',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'poster_pagenavia_hover', array(
		'description'        => __( 'Pagination hover background (Pro Only)', 'poster' ),
		'section'    => 'poster_page_navi',
		'settings'   => 'poster_pagenavia_hover',
		) ) );		
		$wp_customize->add_setting( 'poster_pagenavia_textcurrent' , array(
			'default'     => '#ffffff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'poster_pagenavia_textcurrent', array(
		'description'        => __( 'Text color active (Pro Only)', 'poster' ),
		'section'    => 'poster_page_navi',
		'settings'   => 'poster_pagenavia_textcurrent',
		) ) );
		$wp_customize->add_setting( 'poster_pagenavia_text' , array(
			'default'     => '#5533ff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'poster_pagenavia_text', array(
		'description'        => __( 'Text color (Pro Only)', 'poster' ),
		'section'    => 'poster_page_navi',
		'settings'   => 'poster_pagenavia_text',
		) ) );

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