<?php
/**
 * General Settings.
 *
 * @package pawfect
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

/**
* General Settings.
*/

if ( ! class_exists( 'pawfect_Customize_General_Option' ) ) :

	class pawfect_Customize_General_Option extends pawfect_Customize_Base_Option {
		
		public function elements() {

			return array(
			
			
			    'pawfect_general_heading'     => array(
					'setting' => array(),
					'control' => array(
						'type'    => 'heading',
				   		'priority'        => 1,
						'label'   => esc_html__( 'General Settings', 'pawfect' ),
						'section' => 'pawfect_theme_general',
					),
				),

					//Animation
					'pawfect_animation_disabled'            => array(
						'setting' => array(
							'default'           => true,
							'sanitize_callback' => array( 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ),
						),
						'control' => array(
							'type'     => 'toggle',
							'priority' => 2,
							'label'    => esc_html__( 'Site Animation Enable/Disable', 'pawfect' ),
							'section'  => 'pawfect_theme_general',
						),
					),

					//Smooth Scroll
					'pawfect_smooth_scroll_enabled'            => array(
						'setting' => array(
							'default'           => true,
							'sanitize_callback' => array( 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ),
						),
						'control' => array(
							'type'     => 'toggle',
							'priority' => 3,
							'label'    => esc_html__( 'Smooth Scroll Enable/Disable', 'pawfect' ),
							'section'  => 'pawfect_theme_general',
						),
					),

					// Site Preloader Enable/Disable
					'pawfect_site_preloader' => array(
						'setting' => array(
							'default' => true,
							'sanitize_callback' => array( 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ),
						),
						'control' => array(
							'type' => 'toggle',
							'priority' => 4,
							'label' => esc_html__('Enable Site Preloader', 'pawfect'),
							'description' => esc_html__('Show a loading animation while the page loads.', 'pawfect'),
							'section' => 'pawfect_theme_general',
						),
					),

					// Preloader Style Selection
					'pawfect_preloader_style' => array(
						'setting' => array(
							'default' => 'spinner',
							'sanitize_callback' => array( 'pawfect_Customizer_Sanitize', 'sanitize_radio' ),
						),
						'control' => array(
							'type' => 'simple-radio-image',
							'priority' => 5,
							'label' => esc_html__('Preloader Style', 'pawfect'),
							'description' => esc_html__('Choose the preloader animation style.', 'pawfect'),
							'section' => 'pawfect_theme_general',
							'choices' => array(
								'spinner' => get_template_directory_uri() . '/inc/customizer/assets/images/preloader-spinner.svg',
								'paw_steps' => get_template_directory_uri() . '/inc/customizer/assets/images/preloader-paw-steps.svg',
							),
							'active_callback' => 'pawfect_is_preloader_enabled',
						),
					),

					//Site Preloader
					'pawfect_preloader_enabled'            => array(
						'setting' => array(
							'default'           => true,
							'sanitize_callback' => array( 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ),
						),
						'control' => array(
							'type'     => 'toggle',
							'priority' => 4,
							'label'    => esc_html__( 'Site Preloader Enable/Disable', 'pawfect' ),
							'section'  => 'pawfect_theme_general',
						),
					),
					
					// Loading Icon
					'pawfect_loading_icon_disabled'			=> array(
						'setting' => array(
							'default'           => true,
							'sanitize_callback' => array( 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ),
						),
						'control' => array(
							'type'     => 'toggle',
							'priority' => 5,
							'label'    => esc_html__( 'Loading Icon Enable/Disable', 'pawfect' ),
							'section'  => 'pawfect_theme_general',
						),
					),
					
					// Search Icon
					'pawfect_search_icon_enabled'			=> array(
						'setting' => array(
							'default'           => true,
							'sanitize_callback' => array( 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ),
						),
						'control' => array(
							'type'     => 'toggle',
							'priority' => 15,
							'label'    => esc_html__( 'Search Icon Enable/Disable', 'pawfect' ),
							'section'  => 'pawfect_theme_menu_bar',
						),
					),

					// Go To Top Icon
					'pawfect_goto_top_icon_enabled'			=> array(
						'setting' => array(
							'default'           => true,
							'sanitize_callback' => array( 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ),
						),
						'control' => array(
							'type'     => 'toggle',
							'priority' => 20,
							'label'    => esc_html__( 'Go To Top Icon Enable/Disable', 'pawfect' ),
							'section'  => 'pawfect_footer_copyright',
						),
					),
					
					// WOO Cart Icon
					'pawfect_cart_icon_enabled'                  => array(
						'setting' => array(
							'default'           => true,
							'sanitize_callback' => array( 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ),
						),
						'control' => array(
							'type'     => 'toggle',
							'priority' => 30,
							'label'    => esc_html__( 'WOO Cart Icon Enable/Disable', 'pawfect' ),
							'description'    => esc_html__( 'Required: Activate Woocommerce Plugin', 'pawfect' ),
							'section'  => 'pawfect_theme_menu_bar',
						),
					),
			
			);

		}

	}

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

endif;
