<?php
/**
 * Author Box Section Settings
 * Clean settings without redundant toggles
 *
 * @package Blog_Over
 */

// ---------------------------------------------
// Section: Author Box
// ---------------------------------------------
Kirki::add_section('blog_over_author_section', array(
    'title' => esc_html__('Author Box', 'blog-over'),
    'panel' => 'Blog_Over_panel',
    'priority' => 50,
));

// Author Box Style
Kirki::add_field('Blog_Over_config', array(
    'type' => 'select',
    'settings' => 'blog_over_author_box_style',
    'label' => esc_html__('Author Box Style', 'blog-over'),
    'section' => 'blog_over_author_section',
    'default' => 'modern',
    'priority' => 10,
    'choices' => blog_over_get_author_box_style_choices(),
    'sanitize_callback' => 'blog_over_sanitize_select',
    'partial_refresh' => array(
        'blog_over_author_box_style_refresh' => array(
            'selector' => '.blog-over-author-box',
            'container_inclusive' => true,
            'render_callback' => '__return_false',
        ),
    ),
));

// Avatar Size
Kirki::add_field('Blog_Over_config', array(
    'type' => 'slider',
    'settings' => 'blog_over_author_avatar_size',
    'label' => esc_html__('Avatar Size (px)', 'blog-over'),
    'section' => 'blog_over_author_section',
    'default' => 100,
    'priority' => 20,
    'choices' => array(
        'min' => 60,
        'max' => 150,
        'step' => 10,
    ),
));

// Show Author Bio
Kirki::add_field('Blog_Over_config', array(
    'type' => 'toggle',
    'settings' => 'blog_over_author_show_bio',
    'label' => esc_html__('Show Author Bio', 'blog-over'),
    'section' => 'blog_over_author_section',
    'default' => true,
    'priority' => 30,
));

// Show Post Count
Kirki::add_field('Blog_Over_config', array(
    'type' => 'toggle',
    'settings' => 'blog_over_author_show_posts_count',
    'label' => esc_html__('Show Posts Count', 'blog-over'),
    'section' => 'blog_over_author_section',
    'default' => true,
    'priority' => 40,
));

// Show View All Posts Link
Kirki::add_field('Blog_Over_config', array(
    'type' => 'toggle',
    'settings' => 'blog_over_author_show_view_all',
    'label' => esc_html__('Show "View All Posts" Button', 'blog-over'),
    'section' => 'blog_over_author_section',
    'default' => true,
    'priority' => 50,
));
