<?php
/**
 * Blog Settings Options
 *
 * @package Pawfect
 */

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}

if (!class_exists('Pawfect_Options_Blog_Settings')):

    class Pawfect_Options_Blog_Settings extends pawfect_Customize_Base_Option
    {

        public function elements()
        {

            return array(

                // Blog/Archive Page Settings Heading
                'pawfect_general_archive_single_blog_heading' => array(
                    'setting' => array(),
                    'control' => array(
                        'type'     => 'heading',
                        'priority' => 1,
                        'label'    => esc_html__('Blog/Archive Page Settings', 'pawfect'),
                        'section'  => 'pawfect_blog_section',
                    ),
                ),

                // Card Style Selection
                'pawfect_blog_card_style' => array(
                    'setting' => array(
                        'default' => 'modern',
                        'sanitize_callback' => array('pawfect_Customizer_Sanitize', 'sanitize_radio'),
                    ),
                    'control' => array(
                        'type'        => 'radio',
                        'priority'    => 3,
                        'label'       => esc_html__('Card Style', 'pawfect'),
                        'description' => esc_html__('Choose the card style for blog posts.', 'pawfect'),
                        'section'     => 'pawfect_blog_section',
                        'choices'     => array(
                            'modern'  => esc_html__('Modern (Rounded with glow effects)', 'pawfect'),
                            'classic' => esc_html__('Classic (Traditional style)', 'pawfect'),
                        ),
                    ),
                ),

                // Layout Style Selection
                'pawfect_blog_layout_style' => array(
                    'setting' => array(
                        'default' => 'grid',
                        'sanitize_callback' => array('pawfect_Customizer_Sanitize', 'sanitize_radio'),
                    ),
                    'control' => array(
                        'type'        => 'simple-radio-image',
                        'priority'    => 4,
                        'label'       => esc_html__('Layout Style', 'pawfect'),
                        'description' => esc_html__('Choose the layout style for blog posts.', 'pawfect'),
                        'section'     => 'pawfect_blog_section',
                        'choices'  => array(
                            'grid'    => PAWFECT_THEME_URL . '/assets/images/icons/column-3.png',
                            'list'  => PAWFECT_THEME_URL . '/assets/images/icons/list.png',
                        ),
                        'input_attrs' => array(
                            'choice_labels' => array(
                                'grid' => esc_html__('Grid Layout', 'pawfect'),
                                'list' => esc_html__('List Layout', 'pawfect'),
                            ),
                        ),
                    ),
                ),







                // Post Content Ordering
                'pawfect_blog_content_ordering' => array(
                    'setting' => array(
                        'default' => array(
                            'meta-one' => array('order' => 0, 'visible' => true),
                            'title'    => array('order' => 1, 'visible' => true),
                            'meta-two' => array('order' => 2, 'visible' => true),
                            'image' => array('order' => 3, 'visible' => true),
                            'content'  => array('order' => 4, 'visible' => true),
                        ),

                        'sanitize_callback' => array('pawfect_Customizer_Sanitize', 'sanitize_blog_sortable'),
                    ),
                    'control' => array(
                        'type'        => 'pawfect-blog-sortable',
                        'priority'    => 15,
                        'label'       => esc_html__('Post Elements', 'pawfect'),
                        'description' => esc_html__('Drag & Drop to reorder or hide/show post elements.', 'pawfect'),
                        'section'     => 'pawfect_blog_section',
                    ),
                ),

                // Archive Blog Pages Heading
                'pawfect_archive_blog_heading' => array(
                    'setting' => array(),
                    'control' => array(
                        'type'     => 'heading',
                        'priority' => 15,
                        'label'    => esc_html__('Archive Blog Pages', 'pawfect'),
                        'section'  => 'pawfect_blog_section',
                    ),
                ),

                // Archive Blog Layout
                'pawfect_archive_blog_pages_layout' => array(
                    'setting' => array(
                        'default'           => 'pawfect_right_sidebar',
                        'sanitize_callback' => array('pawfect_Customizer_Sanitize', 'sanitize_radio'),
                    ),
                    'control' => array(
                        'type'     => 'radio_image',
                        'priority' => 20,
                        'label'    => esc_html__('Layout', 'pawfect'),
                        'section'  => 'pawfect_blog_section',
                        'choices'  => array(
                            'pawfect_no_sidebar'    => PAWFECT_THEME_URL . '/assets/images/icons/fullwidth.png',
                            'pawfect_left_sidebar'  => PAWFECT_THEME_URL . '/assets/images/icons/left-sidebar.png',
                            'pawfect_right_sidebar' => PAWFECT_THEME_URL . '/assets/images/icons/right-sidebar.png',
                        ),
                    ),
                ),

                // Single Blog Pages Heading
                'pawfect_single_blog_heading' => array(
                    'setting' => array(),
                    'control' => array(
                        'type'     => 'heading',
                        'priority' => 30,
                        'label'    => esc_html__('Single Blog Pages', 'pawfect'),
                        'section'  => 'pawfect_blog_section',
                    ),
                ),

                // Single Blog Layout
                'pawfect_single_blog_pages_layout' => array(
                    'setting' => array(
                        'default'           => 'pawfect_right_sidebar',
                        'sanitize_callback' => array('pawfect_Customizer_Sanitize', 'sanitize_radio'),
                    ),
                    'control' => array(
                        'type'     => 'radio_image',
                        'priority' => 35,
                        'label'    => esc_html__('Layout', 'pawfect'),
                        'section'  => 'pawfect_blog_section',
                        'choices'  => array(
                            'pawfect_no_sidebar'    => PAWFECT_THEME_URL . '/assets/images/icons/fullwidth.png',
                            'pawfect_left_sidebar'  => PAWFECT_THEME_URL . '/assets/images/icons/left-sidebar.png',
                            'pawfect_right_sidebar' => PAWFECT_THEME_URL . '/assets/images/icons/right-sidebar.png',
                        ),
                    ),
                ),

            );
        }
    }

    new Pawfect_Options_Blog_Settings();

endif;



