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

/**
 * Frontpage info.
 *
 * @package pawfect
 */

defined( 'ABSPATH' ) || exit;

if ( ! class_exists( 'pawfect_Customize_Homepage_Info_Option' ) ) :

	class pawfect_Customize_Homepage_Info_Option extends pawfect_Customize_Base_Option {

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

			return array(

				'pawfect_top_info_heading'     => array(
					'setting' => array(),
					'control' => array(
						'type'    => 'heading',
						'priority'        => 1,
						'label'   => esc_html__( 'Top Info Options', 'pawfect' ),
						'section' => 'pawfect_theme_top_info',
					),
				),
					
				// Info Top Enable
				'pawfect_top_info_disabled'            => array(
					'setting' => array(
						'default'           => true,
						'sanitize_callback' => array( 'pawfect_Customizer_Sanitize', 'sanitize_checkbox' ),
					),
					'control' => array(
						'type'     => 'toggle',
						'priority' => 3,
						'label'    => esc_html__( 'Top Info Enable/Disable', 'pawfect' ),
						'section'  => 'pawfect_theme_top_info',
					),
				),
				
				// container
				'pawfect_top_info_container_size'     => array(
					'setting' => array(
						'default'			=> 'container',
						'sanitize_callback'	=> array( 'pawfect_Customizer_Sanitize', 'sanitize_radio' ),
					),
					'control' => array(
						'type'				=> 'radio',
						'priority'			=> 25,
						'is_default_type'	=> true,
						'label'				=> esc_html__( 'Info Width', 'pawfect' ),
						'section'			=> 'pawfect_theme_top_info',
						'choices'			=> array(
							'container'		=> esc_html__( 'Container', 'pawfect' ),
							'container-full'=> esc_html__( 'Container Full', 'pawfect' ),
						),
						'active_callback' => [
                            [ $this, 'is_control_value_active' ],
                            'pawfect_top_info_disabled',
                            true
                        ],
					),
				),
				// column layout
				'pawfect_top_info_column_layout'	=> array(
					'setting'	=> array(
						'default'           => 'col-md-4',
						'sanitize_callback' => array( 'pawfect_Customizer_Sanitize', 'sanitize_radio' ),
					),
					'control'	=> array(
						'type'		=> 'radio_image',
						'priority'	=> 30,
						'label'		=> esc_html__( 'Column Layout', 'pawfect' ),
						'section'	=> 'pawfect_theme_top_info',
						'choices'	=> array(
							'col-md-6'	=> PAWFECT_THEME_URL . '/assets/images/icons/column-2.png',
							'col-md-4'	=> PAWFECT_THEME_URL . '/assets/images/icons/column-3.png',
							'col-md-3'	=> PAWFECT_THEME_URL . '/assets/images/icons/column-4.png',
						),
						'active_callback' => [
                            [ $this, 'is_control_value_active' ],
                            'pawfect_top_info_disabled',
                            true
                        ],
					),
					
				),
			);
		}
	}

	//new pawfect_Customize_Homepage_Info_Option();

endif;


