<?php

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

			
			//back to top
		$wp_customize->add_setting('digital_pagenavi_on',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'digital_customize_sanitize_select'
			));
		$wp_customize->add_control('digital_pagenavi_on',
			 array (                             
				'type' => 'radio',
				'label' => __('Page Navigation Enable or Disable','digital'),
				'settings'   => 'digital_pagenavi_on',
				'section' => 'digital_page_navi',
				'choices' => array(
					'enable' => __('Enable','digital'),
					'disable' => __('Disable','digital'),
				 ),
			 ));

			 $wp_customize->add_setting(
				'digital_pagenavi_position',
				array(
					'transport'         => 'refresh',
					'default'           => 'center',
					'sanitize_callback' => 'digital_customize_sanitize_select',
				)
			);

			$wp_customize->add_control(
				new digital_Customizer_Buttonset_Control(
					$wp_customize,
					'digital_pagenavi_position',
					array(
						'label'           => esc_html__( 'Page Navi Position', 'digital' ),
						'section'         => 'digital_page_navi',
						'settings'        => 'digital_pagenavi_position',
						'priority'        => 10,
						'choices'         => array(
							'start'  => esc_html__( 'Left', 'digital' ),
							'center'  => esc_html__( 'Center', 'digital' ),
							'end' => esc_html__( 'Right', 'digital' ),
						),
					)
				)
			);
			
			$wp_customize->add_setting(
				'digital_scrollcolor_heading',
				array(
					'sanitize_callback' => 'wp_kses',
				));
		
				$wp_customize->add_control(
				new digital_Customizer_Heading_Control(
					$wp_customize,
					'digital_scrollcolor_heading',
					array(
						'label'    => esc_html__( 'Style Customize (Pro Only)', 'digital' ),
						'section'  => 'digital_page_navi',
						
					)));		
		 $wp_customize->add_setting( 'digital_pagenavi_current' , array(
			'default'     => '#5533ff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'digital_pagenavi_current', array(
		'description'        => __( 'Current Active Link', 'digital' ),
		'section'    => 'digital_page_navi',
		'settings'   => 'digital_pagenavi_current',
		) ) ); 
		 $wp_customize->add_setting( 'digital_pagenavi_bg' , array(
			'default'     => '#ffffff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'digital_pagenavi_bg', array(
		'description'        => __( 'Pagination background', 'digital' ),
		'section'    => 'digital_page_navi',
		'settings'   => 'digital_pagenavi_bg',
		) ) );
		 $wp_customize->add_setting( 'digital_pagenavia_hover' , array(
			'default'     => '#e9ecef',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'digital_pagenavia_hover', array(
		'description'        => __( 'Pagination hover background', 'digital' ),
		'section'    => 'digital_page_navi',
		'settings'   => 'digital_pagenavia_hover',
		) ) );		
		$wp_customize->add_setting( 'digital_pagenavia_textcurrent' , array(
			'default'     => '#ffffff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'digital_pagenavia_textcurrent', array(
		'description'        => __( 'Text color active', 'digital' ),
		'section'    => 'digital_page_navi',
		'settings'   => 'digital_pagenavia_textcurrent',
		) ) );
		$wp_customize->add_setting( 'digital_pagenavia_text' , array(
			'default'     => '#5533ff',
			'transport'   => 'postMessage',
			'sanitize_callback'	=> 'sanitize_hex_color',
		) );
		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'digital_pagenavia_text', array(
		'description'        => __( 'Text color', 'digital' ),
		'section'    => 'digital_page_navi',
		'settings'   => 'digital_pagenavia_text',
		) ) );

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