<?php
/**
 * Defines all Theme Color settings for the Customizer.
 *
 * This class consolidates all color-related options for the menu, content,
 * sidebar, and footer into a single, organized OOP structure.
 *
 * @package Pawfect
 */

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

if ( ! class_exists( 'Pawfect_Options_Colors' ) ) :

    /**
     * The main Theme Colors options class.
     */
    class Pawfect_Options_Colors extends pawfect_Customize_Base_Option {

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

            return array(

                // =======================================================
                // == 1. MENU COLORS
                // =======================================================

                'pawfect_colors_menu_disable' => array(
                    'setting' => [ 'default' => false, 'sanitize_callback' => [ 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ] ],
                    'control' => [ 'type' => 'toggle', 'priority' => 1, 'label' => esc_html__( 'Enable Menu Colors', 'pawfect' ), 'section' => 'pawfect_primary_menu_colors' ],
                ),

                'pawfect_colors_menu_heading' => array(
                    'setting' => [],
                    'control' => [ 'type' => 'heading', 'priority' => 2, 'label' => esc_html__( 'Menu Colors', 'pawfect' ), 'section' => 'pawfect_primary_menu_colors' ],
                ),

                'pawfect_colors_menu_text' => array(
                    'setting' => [ 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 10, 'label' => esc_html__( 'Text/Link Color', 'pawfect' ), 'section' => 'pawfect_primary_menu_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_menu_disable', true ] ],
                ),

                'pawfect_colors_menu_hover' => array(
                    'setting' => [ 'default' => '#9cd0ff', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 20, 'label' => esc_html__( 'Link Hover Color', 'pawfect' ), 'section' => 'pawfect_primary_menu_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_menu_disable', true ] ],
                ),

                'pawfect_colors_menu_active' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 30, 'label' => esc_html__( 'Active Link Color', 'pawfect' ), 'section' => 'pawfect_primary_menu_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_menu_disable', true ] ],
                ),

                'pawfect_colors_submenu_heading' => array(
                    'setting' => [],
                    'control' => [ 'type' => 'heading', 'priority' => 35, 'label' => esc_html__( 'SubMenu Colors', 'pawfect' ), 'section' => 'pawfect_primary_menu_colors' ],
                ),

                'pawfect_colors_submenu_text' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 40, 'label' => esc_html__( 'Text/Link Color', 'pawfect' ), 'section' => 'pawfect_primary_menu_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_menu_disable', true ] ],
                ),

                'pawfect_colors_submenu_hover' => array(
                    'setting' => [ 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 50, 'label' => esc_html__( 'Link Hover Color', 'pawfect' ), 'section' => 'pawfect_primary_menu_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_menu_disable', true ] ],
                ),

                'pawfect_colors_submenu_bg' => array(
                    'setting' => [ 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 60, 'label' => esc_html__( 'Background Color', 'pawfect' ), 'section' => 'pawfect_primary_menu_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_menu_disable', true ] ],
                ),

                'pawfect_colors_header_bg_colour' => array(
                    'setting' => [ 'default' => '#0f0d1d', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 71, 'label' => esc_html__( 'Header Background Color', 'pawfect' ), 'section' => 'pawfect_primary_menu_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_menu_disable', true ] ],
                ),

                // =======================================================
                // == 2. CONTENT COLORS
                // =======================================================

                'pawfect_colors_content_disable' => array(
                    'setting' => [ 'default' => false, 'sanitize_callback' => [ 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ] ],
                    'control' => [ 'type' => 'toggle', 'priority' => 1, 'label' => esc_html__( 'Enable Content Colors', 'pawfect' ), 'section' => 'pawfect_content_theme_colors' ],
                ),

                'pawfect_colors_content_heading' => array(
                    'setting' => [],
                    'control' => [ 'type' => 'heading', 'priority' => 2, 'label' => esc_html__( 'Headings Colors', 'pawfect' ), 'section' => 'pawfect_content_theme_colors' ],
                ),

                'pawfect_colors_content_h1' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 10, 'label' => esc_html__( 'H1 Color', 'pawfect' ), 'section' => 'pawfect_content_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_content_disable', true ] ],
                ),

                'pawfect_colors_content_h2' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 20, 'label' => esc_html__( 'H2 Color', 'pawfect' ), 'section' => 'pawfect_content_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_content_disable', true ] ],
                ),

                'pawfect_colors_content_h3' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 30, 'label' => esc_html__( 'H3 Color', 'pawfect' ), 'section' => 'pawfect_content_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_content_disable', true ] ],
                ),

                'pawfect_colors_content_h4' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 40, 'label' => esc_html__( 'H4 Color', 'pawfect' ), 'section' => 'pawfect_content_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_content_disable', true ] ],
                ),

                'pawfect_colors_content_h5' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 50, 'label' => esc_html__( 'H5 Color', 'pawfect' ), 'section' => 'pawfect_content_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_content_disable', true ] ],
                ),

                'pawfect_colors_content_h6' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 60, 'label' => esc_html__( 'H6 Color', 'pawfect' ), 'section' => 'pawfect_content_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_content_disable', true ] ],
                ),

                'pawfect_colors_content_p_heading' => array(
                    'setting' => [],
                    'control' => [ 'type' => 'heading', 'priority' => 65, 'label' => esc_html__( 'Paragraph Colors', 'pawfect' ), 'section' => 'pawfect_content_theme_colors' ],
                ),

                'pawfect_colors_content_p' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 70, 'label' => esc_html__( 'Paragraph Color', 'pawfect' ), 'section' => 'pawfect_content_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_content_disable', true ] ],
                ),

                // =======================================================
                // == 3. SIDEBAR WIDGETS COLORS
                // =======================================================

                'pawfect_colors_sidebar_disable' => array(
                    'setting' => [ 'default' => false, 'sanitize_callback' => [ 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ] ],
                    'control' => [ 'type' => 'toggle', 'priority' => 1, 'label' => esc_html__( 'Enable Sidebar Color Settings', 'pawfect' ), 'section' => 'pawfect_sidebar_theme_colors' ],
                ),

                'pawfect_colors_sidebar_heading' => array(
                    'setting' => [],
                    'control' => [ 'type' => 'heading', 'priority' => 2, 'label' => esc_html__( 'Sidebar Widgets Colors', 'pawfect' ), 'section' => 'pawfect_sidebar_theme_colors' ],
                ),

                'pawfect_colors_sidebar_title' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 10, 'label' => esc_html__( 'Title Color', 'pawfect' ), 'section' => 'pawfect_sidebar_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_sidebar_disable', true ] ],
                ),

                'pawfect_colors_sidebar_text' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 20, 'label' => esc_html__( 'Text Color', 'pawfect' ), 'section' => 'pawfect_sidebar_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_sidebar_disable', true ] ],
                ),

                'pawfect_colors_sidebar_link' => array(
                    'setting' => [ 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 30, 'label' => esc_html__( 'Link Color', 'pawfect' ), 'section' => 'pawfect_sidebar_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_sidebar_disable', true ] ],
                ),

                'pawfect_colors_sidebar_hover' => array(
                    'setting' => [ 'default' => '#0074da', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 40, 'label' => esc_html__( 'Link Hover Color', 'pawfect' ), 'section' => 'pawfect_sidebar_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_sidebar_disable', true ] ],
                ),

                // =======================================================
                // == 4. FOOTER WIDGETS COLORS
                // =======================================================

                'pawfect_colors_footer_disable' => array(
                    'setting' => [ 'default' => false, 'sanitize_callback' => [ 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ] ],
                    'control' => [ 'type' => 'toggle', 'priority' => 1, 'label' => esc_html__( 'Enable Footer Color Settings', 'pawfect' ), 'section' => 'pawfect_footer_theme_colors' ],
                ),

                'pawfect_colors_footer_heading' => array(
                    'setting' => [],
                    'control' => [ 'type' => 'heading', 'priority' => 2, 'label' => esc_html__( 'Footer Widgets Colors', 'pawfect' ), 'section' => 'pawfect_footer_theme_colors' ],
                ),

                'pawfect_colors_footer_title' => array(
                    'setting' => [ 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 10, 'label' => esc_html__( 'Title Color', 'pawfect' ), 'section' => 'pawfect_footer_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_footer_disable', true ] ],
                ),

                'pawfect_colors_footer_text' => array(
                    'setting' => [ 'default' => '#8f8da0', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 20, 'label' => esc_html__( 'Text Color', 'pawfect' ), 'section' => 'pawfect_footer_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_footer_disable', true ] ],
                ),

                'pawfect_colors_footer_link' => array(
                    'setting' => [ 'default' => '#6a6a6a', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 30, 'label' => esc_html__( 'Link Color', 'pawfect' ), 'section' => 'pawfect_footer_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_footer_disable', true ] ],
                ),

                'pawfect_colors_footer_hover' => array(
                    'setting' => [ 'default' => '#0074da', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 40, 'label' => esc_html__( 'Link Hover Color', 'pawfect' ), 'section' => 'pawfect_footer_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_footer_disable', true ] ],
                ),

                'pawfect_colors_footer_background_color_heading' => array(
                    'setting' => [],
                    'control' => [ 'type' => 'heading', 'priority' => 50, 'label' => esc_html__( 'Footer Background Color', 'pawfect' ), 'section' => 'pawfect_footer_theme_colors' ],
                ),

                'pawfect_colors_footer_bg_color' => array(
                    'setting' => [ 'default' => '#0f0d1d', 'sanitize_callback' => 'sanitize_hex_color' ],
                    'control' => [ 'type' => 'color', 'priority' => 51, 'label' => esc_html__( 'Footer Background Color', 'pawfect' ), 'section' => 'pawfect_footer_theme_colors', 'active_callback' => [ [ $this, 'is_control_value_active' ], 'pawfect_colors_footer_disable', true ] ],
                ),

            );
        }
    }

    // Remove automatic instantiation - let main customizer class handle this
    // new Pawfect_Options_Colors();

endif;
