<?php
/**
 * Pagination
 *
 * @package News Revolution
 */

$wp_customize->add_section(
	'news_revolution_pagination',
	array(
		'panel' => 'news_revolution_theme_options',
		'title' => esc_html__( 'Pagination', 'news-revolution' ),
	)
);

// Pagination - Enable Pagination.
$wp_customize->add_setting(
	'news_revolution_enable_pagination',
	array(
		'default'           => true,
		'sanitize_callback' => 'news_revolution_sanitize_switch',
	)
);

$wp_customize->add_control(
	new News_Revolution_Toggle_Switch_Custom_Control(
		$wp_customize,
		'news_revolution_enable_pagination',
		array(
			'label'    => esc_html__( 'Enable Pagination', 'news-revolution' ),
			'section'  => 'news_revolution_pagination',
			'settings' => 'news_revolution_enable_pagination',
			'type'     => 'checkbox',
		)
	)
);

// Pagination - Pagination Type.
$wp_customize->add_setting(
	'news_revolution_pagination_type',
	array(
		'default'           => 'default',
		'sanitize_callback' => 'news_revolution_sanitize_select',
	)
);

$wp_customize->add_control(
	'news_revolution_pagination_type',
	array(
		'label'           => esc_html__( 'Pagination Type', 'news-revolution' ),
		'section'         => 'news_revolution_pagination',
		'settings'        => 'news_revolution_pagination_type',
		'active_callback' => 'news_revolution_is_pagination_enabled',
		'type'            => 'select',
		'choices'         => array(
			'default' => __( 'Default (Older/Newer)', 'news-revolution' ),
			'numeric' => __( 'Numeric', 'news-revolution' ),
		),
	)
);
