<?php
/**
 * Post Navigation Section Settings
 * Clean settings with modern style options
 *
 * @package Blog_Over
 */

// ---------------------------------------------
// Section: Post Navigation
// ---------------------------------------------
Kirki::add_section('blog_over_postnav_section', array(
    'title' => esc_html__('Post Navigation', 'blog-over'),
    'panel' => 'Blog_Over_panel',
    'priority' => 55,
));

// Navigation Style
Kirki::add_field('Blog_Over_config', array(
    'type' => 'select',
    'settings' => 'blog_over_postnav_style',
    'label' => esc_html__('Navigation Style', 'blog-over'),
    'section' => 'blog_over_postnav_section',
    'default' => 'cards',
    'priority' => 10,
    'choices' => blog_over_get_postnav_style_choices(),
    'sanitize_callback' => 'blog_over_sanitize_select',
    'partial_refresh' => array(
        'blog_over_postnav_style_refresh' => array(
            'selector' => '.blog-over-post-navigation',
            'container_inclusive' => true,
            'render_callback' => '__return_false',
        ),
    ),
));

// Show Thumbnails
Kirki::add_field('Blog_Over_config', array(
    'type' => 'toggle',
    'settings' => 'blog_over_postnav_thumb',
    'label' => esc_html__('Show Thumbnails', 'blog-over'),
    'description' => esc_html__('Hidden in Simple Links style', 'blog-over'),
    'section' => 'blog_over_postnav_section',
    'default' => true,
    'priority' => 20,
));

// Show Post Titles
Kirki::add_field('Blog_Over_config', array(
    'type' => 'toggle',
    'settings' => 'blog_over_postnav_title',
    'label' => esc_html__('Show Post Titles', 'blog-over'),
    'section' => 'blog_over_postnav_section',
    'default' => true,
    'priority' => 30,
));

// Previous Text
Kirki::add_field('Blog_Over_config', array(
    'type' => 'text',
    'settings' => 'blog_over_postnav_prev_text',
    'label' => esc_html__('Previous Label', 'blog-over'),
    'section' => 'blog_over_postnav_section',
    'default' => esc_html__('Previous', 'blog-over'),
    'priority' => 35,
));

// Next Text
Kirki::add_field('Blog_Over_config', array(
    'type' => 'text',
    'settings' => 'blog_over_postnav_next_text',
    'label' => esc_html__('Next Label', 'blog-over'),
    'section' => 'blog_over_postnav_section',
    'default' => esc_html__('Next', 'blog-over'),
    'priority' => 36,
));

// Same Category Only
Kirki::add_field('Blog_Over_config', array(
    'type' => 'toggle',
    'settings' => 'blog_over_postnav_same_cat',
    'label' => esc_html__('Same Category Only', 'blog-over'),
    'description' => esc_html__('Only show prev/next posts from the same category', 'blog-over'),
    'section' => 'blog_over_postnav_section',
    'default' => false,
    'priority' => 40,
));


