<?php

/**
 * Pagination
 *
 * @package dark_fitness
 */

$wp_customize->add_section(
	'dark_fitness_pagination',
	array(
		'panel' => 'dark_fitness_theme_options',
		'title' => esc_html__( 'Pagination', 'dark-fitness' ),
	)
);

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

$wp_customize->add_control(
	new Dark_Fitness_Toggle_Switch_Custom_Control(
		$wp_customize,
		'dark_fitness_enable_pagination',
		array(
			'label'    => esc_html__( 'Enable Pagination', 'dark-fitness' ),
			'section'  => 'dark_fitness_pagination',
			'settings' => 'dark_fitness_enable_pagination',
			'type'     => 'checkbox',
		)
	)
);

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

$wp_customize->add_control(
	'dark_fitness_pagination_type',
	array(
		'label'           => esc_html__( 'Pagination Type', 'dark-fitness' ),
		'section'         => 'dark_fitness_pagination',
		'settings'        => 'dark_fitness_pagination_type',
		'active_callback' => 'dark_fitness_is_pagination_enabled',
		'type'            => 'select',
		'choices'         => array(
			'default' => __( 'Default (Older/Newer)', 'dark-fitness' ),
			'numeric' => __( 'Numeric', 'dark-fitness' ),
		),
	)
);
