<?php
/**
 * Site Identity Customizer Options
 *
 * @package Pawfect
 */

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

/**
 * Site Identity Customizer Options
 */
if ( ! class_exists( 'pawfect_Customize_Site_Identity_Option' ) ) :

class pawfect_Customize_Site_Identity_Option extends pawfect_Customize_Base_Option {

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

        return array(

            /**
             * Logo Size - Responsive
             */
            'pawfect_logo_size' => array(
                'setting' => array(
                    'default' => json_encode(array(
                        'desktop' => 150,
                        'tablet' => 120,
                        'mobile' => 100,
                    )),
                    'sanitize_callback' => array('Pawfect_Responsive_Range_Control', 'sanitize_responsive_range'),
                    'transport' => 'postMessage',
                ),
                'control' => array(
                    'type' => 'pawfect-responsive-range',
                    'priority' => 8,
                    'label' => esc_html__('Logo Size', 'pawfect'),
                    'description' => esc_html__('Set the logo size for different devices.', 'pawfect'),
                    'section' => 'title_tagline',
                    'media_query' => true,
                    'input_attr' => array(
                        'mobile' => array(
                            'min' => 50,
                            'max' => 300,
                            'step' => 1,
                            'default_value' => 100,
                        ),
                        'tablet' => array(
                            'min' => 50,
                            'max' => 300,
                            'step' => 1,
                            'default_value' => 120,
                        ),
                        'desktop' => array(
                            'min' => 50,
                            'max' => 300,
                            'step' => 1,
                            'default_value' => 150,
                        ),
                    ),
                    'suffix' => 'px',
                ),
            ),

            /**
             * Site Title Size - Responsive
             */
            'pawfect_site_title_size' => array(
                'setting' => array(
                    'default' => json_encode(array(
                        'desktop' => 30,
                        'tablet' => 26,
                        'mobile' => 22,
                    )),
                    'sanitize_callback' => array('Pawfect_Responsive_Range_Control', 'sanitize_responsive_range'),
                    'transport' => 'postMessage',
                ),
                'control' => array(
                    'type' => 'pawfect-responsive-range',
                    'priority' => 9,
                    'label' => esc_html__('Site Title Size', 'pawfect'),
                    'description' => esc_html__('Set the site title font size for different devices.', 'pawfect'),
                    'section' => 'title_tagline',
                    'media_query' => true,
                    'input_attr' => array(
                        'mobile' => array(
                            'min' => 12,
                            'max' => 60,
                            'step' => 1,
                            'default_value' => 22,
                        ),
                        'tablet' => array(
                            'min' => 12,
                            'max' => 60,
                            'step' => 1,
                            'default_value' => 26,
                        ),
                        'desktop' => array(
                            'min' => 12,
                            'max' => 60,
                            'step' => 1,
                            'default_value' => 30,
                        ),
                    ),
                    'suffix' => 'px',
                ),
            ),

            /**
             * Site Tagline Size - Responsive
             */
            'pawfect_site_tagline_size' => array(
                'setting' => array(
                    'default' => json_encode(array(
                        'desktop' => 16,
                        'tablet' => 14,
                        'mobile' => 12,
                    )),
                    'sanitize_callback' => array('Pawfect_Responsive_Range_Control', 'sanitize_responsive_range'),
                    'transport' => 'postMessage',
                ),
                'control' => array(
                    'type' => 'pawfect-responsive-range',
                    'priority' => 10,
                    'label' => esc_html__('Site Tagline Size', 'pawfect'),
                    'description' => esc_html__('Set the site tagline font size for different devices.', 'pawfect'),
                    'section' => 'title_tagline',
                    'media_query' => true,
                    'input_attr' => array(
                        'mobile' => array(
                            'min' => 10,
                            'max' => 30,
                            'step' => 1,
                            'default_value' => 12,
                        ),
                        'tablet' => array(
                            'min' => 10,
                            'max' => 30,
                            'step' => 1,
                            'default_value' => 14,
                        ),
                        'desktop' => array(
                            'min' => 10,
                            'max' => 30,
                            'step' => 1,
                            'default_value' => 16,
                        ),
                    ),
                    'suffix' => 'px',
                ),
            ),

            /**
             * Enable Hidden Title (h1 missing SEO issue)
             */
            'pawfect_enable_hidden_title' => array(
                'setting' => array(
                    'default' => false,
                    'sanitize_callback' => array('pawfect_Customizer_Sanitize', 'sanitize_checkbox'),
                ),
                'control' => array(
                    'type' => 'toggle',
                    'priority' => 11,
                    'label' => esc_html__('Enable Hidden Title (h1 missing SEO issue)', 'pawfect'),
                    'description' => esc_html__('Enable this to fix h1 missing SEO issues by adding a hidden title.', 'pawfect'),
                    'section' => 'title_tagline',
                ),
            ),

            /**
             * Display Site Title and Tagline
             */
            'pawfect_display_site_title_tagline' => array(
                'setting' => array(
                    'default' => true,
                    'sanitize_callback' => array('pawfect_Customizer_Sanitize', 'sanitize_checkbox'),
                ),
                'control' => array(
                    'type' => 'toggle',
                    'priority' => 12,
                    'label' => esc_html__('Display Site Title and Tagline', 'pawfect'),
                    'description' => esc_html__('Show or hide the site title and tagline in the header.', 'pawfect'),
                    'section' => 'title_tagline',
                ),
            ),

        );
    }
}

endif;
