<?php
if (!defined('ABSPATH')) exit; // Exit if accessed directly

/**
 * Global Badge Options
 *
 * @package pawfect
 */

if (!class_exists('Pawfect_Options_Global_Badges')):

    class Pawfect_Options_Global_Badges extends pawfect_Customize_Base_Option {

        /**
         * Arguments for options.
         *
         * @return array
         */
        public function elements() {

            return array(

                'pawfect_global_badge_heading' => array(
                    'setting' => array(),
                    'control' => array(
                        'type' => 'heading',
                        'priority' => 1,
                        'label' => esc_html__('Global Badge Settings', 'pawfect'),
                        'section' => 'pawfect_global_badges_section',
                    ),
                ),

                'pawfect_badge_style' => array(
                    'setting' => array(
                        'default' => 'rounded-full',
                        'sanitize_callback' => array('pawfect_Customizer_Sanitize', 'sanitize_radio'),
                    ),
                    'control' => array(
                        'type' => 'radio',
                        'priority' => 2,
                        'label' => esc_html__('Badge Style', 'pawfect'),
                        'section' => 'pawfect_global_badges_section',
                        'choices' => array(
                            'rounded-full' => esc_html__('Rounded (Pills)', 'pawfect'),
                            'rounded' => esc_html__('Slightly Rounded', 'pawfect'),
                            'square' => esc_html__('Square', 'pawfect'),
                        ),
                    ),
                ),

                'pawfect_badge_size' => array(
                    'setting' => array(
                        'default' => 'normal',
                        'sanitize_callback' => array('pawfect_Customizer_Sanitize', 'sanitize_radio'),
                    ),
                    'control' => array(
                        'type' => 'radio',
                        'priority' => 3,
                        'label' => esc_html__('Badge Size', 'pawfect'),
                        'section' => 'pawfect_global_badges_section',
                        'choices' => array(
                            'small' => esc_html__('Small', 'pawfect'),
                            'normal' => esc_html__('Normal', 'pawfect'),
                            'large' => esc_html__('Large', 'pawfect'),
                        ),
                    ),
                ),

                'pawfect_sale_badge_color' => array(
                    'setting' => array(
                        'default' => '#ef4444',
                        'sanitize_callback' => 'sanitize_hex_color',
                    ),
                    'control' => array(
                        'type' => 'color',
                        'priority' => 4,
                        'label' => esc_html__('Sale Badge Color', 'pawfect'),
                        'section' => 'pawfect_global_badges_section',
                    ),
                ),

                'pawfect_category_badge_color' => array(
                    'setting' => array(
                        'default' => '#F4A259',
                        'sanitize_callback' => 'sanitize_hex_color',
                    ),
                    'control' => array(
                        'type' => 'color',
                        'priority' => 5,
                        'label' => esc_html__('Category Badge Color', 'pawfect'),
                        'section' => 'pawfect_global_badges_section',
                    ),
                ),

                'pawfect_badge_text_transform' => array(
                    'setting' => array(
                        'default' => 'uppercase',
                        'sanitize_callback' => array('pawfect_Customizer_Sanitize', 'sanitize_radio'),
                    ),
                    'control' => array(
                        'type' => 'radio',
                        'priority' => 6,
                        'label' => esc_html__('Badge Text Style', 'pawfect'),
                        'section' => 'pawfect_global_badges_section',
                        'choices' => array(
                            'uppercase' => esc_html__('UPPERCASE', 'pawfect'),
                            'capitalize' => esc_html__('Capitalize', 'pawfect'),
                            'none' => esc_html__('Normal', 'pawfect'),
                        ),
                    ),
                ),

            );
        }
    }

    new Pawfect_Options_Global_Badges();

endif;
