<?php
/**
 * Defines Menu settings for the Customizer.
 *
 * @package Pawfect
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

if ( ! class_exists( 'Pawfect_Options_Menu' ) ) :

    /**
     * The Menu options class.
     */
    class Pawfect_Options_Menu extends pawfect_Customize_Base_Option {

        /**
         * Get all the settings and controls.
         *
         * @return array
         */
        public function elements() {

            return array(

                /**
                 * Sticky Bar Logo
                 * This logo appears only when the sticky menu style is selected.
                 */
                'pawfect_sticky_bar_logo' => array(
                    'setting' => array(
                        'sanitize_callback' => 'esc_url_raw',
                    ),
                    'control' => array(
                        'type'        => 'image',
                        'priority'    => 15,
                        'section'     => 'pawfect_theme_menu_bar', // Assumes this section exists
                        'label'       => esc_html__( 'Set Sticky Menu Logo', 'pawfect' ),
                        'description' => esc_html__( 'You can Upload the Standard size of logo (220x40px)', 'pawfect' ),
                        'active_callback' => [
                            [ $this, 'is_control_value_active' ],
                            'pawfect_menu_style', // The setting to check
                            'sticky'              // The value we expect
                        ],
                    ),
                ),

            );
        }
    }

    // Instantiate the class so its settings get registered.
    // Remove automatic instantiation - let main customizer class handle this
    // new Pawfect_Options_Menu();

endif;
