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

/**
 * Frontpage Main Slider.
 *
 * @package leatherhouse
 */

defined( 'ABSPATH' ) || exit;

if ( ! class_exists( 'leatherhouse_Customize_Homepage_Slider_Option' ) ) :

	class leatherhouse_Customize_Homepage_Slider_Option extends leatherhouse_Customize_Base_Option {

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

			return array(

				'leatherhouse_hero_main_heading'             => array(
					'setting' => array(),
					'control' => array(
						'type'     => 'parent_heading',
						'priority' => 1,
						'label'    => esc_html__( 'Hero Section Options', 'leather-house' ),
						'section'  => 'leatherhouse_hero_section',
					),
				),

				// Slider Enable.
				'leatherhouse_hero_disabled'            => array(
					'setting' => array(
						'default'           => true,
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_checkbox' ),
					),
					'control' => array(
						'type'     => 'toggle',
						'priority' => 2,
						'label'    => esc_html__( 'Hero Section Enable/Disable', 'leather-house' ),
						'section'  => 'leatherhouse_hero_section',
					),
				),


				// Hero Section Overlay.
				'leatherhouse_hero_overlay_disable'     => array(
					'setting' => array(
						'default'           => true,
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_checkbox' ),
					),
					'control' => array(
						'type'            => 'toggle',
						'priority'        => 40,
						'label'           => esc_html__( 'Overlay Enable/Disable', 'leather-house' ),
						'section'         => 'leatherhouse_hero_section',
						'active_callback'  => 'leatherhouse_hero_overlay_disable',
					),
				),

				// Hero Section Overlay color.
				'leatherhouse_hero_overlay_color'       => array(
					'setting' => array(
						'default'           => 'rgba(0,0,0,0.2)',
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_alpha_color' ),
					),
					'control' => array(
						'type'            => 'color',
						'priority'        => 50,
						'label'           => esc_html__( 'Hero Section Overlay Color', 'leather-house' ),
						'section'         => 'leatherhouse_hero_section',
						'choices'         => array(
							'alpha' => true,
						),
						'active_callback'  => 'leatherhouse_hero_overlay_color',
					),
				),

				// container.
				'leatherhouse_slider_container_size'            => array(
					'setting' => array(
						'default'           => 'container-full',
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_radio' ),
					),
					'control' => array(
						'type'            => 'radio',
						'priority'        => 50,
						'is_default_type' => true,
						'label'           => esc_html__( 'Section Width', 'leather-house' ),
						'section'         => 'leatherhouse_hero_section',
						'choices'         => array(
							'av-container'   => esc_html__( 'Container', 'leather-house' ),
							'container-full' => esc_html__( 'Container Full', 'leather-house' ),
						),
						'active_callback' => 'leatherhouse_slider_container_size',
					),
				),

				// Hero Section Color Settings Heading.
				'leatherhouse_hero_color_heading'            => array(
					'setting' => array(),
					'control' => array(
						'type'            => 'heading',
						'priority'        => 60,
						'label'           => esc_html__( 'Hero Section Text Color Settings', 'leather-house' ),
						'section'         => 'leatherhouse_hero_section',
						'active_callback'  => 'leatherhouse_hero_color_heading',
					),
				),

				// Slide Color Settings Enable Disable.
				'leatherhouse_hero_text_color_disable'     => array(
					'setting' => array(
						'default'           => false,
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_checkbox' ),
					),
					'control' => array(
						'type'            => 'toggle',
						'priority'        => 65,
						'label'           => esc_html__( 'Slide Text Color Enable/Disable', 'leather-house' ),
						'section'         => 'leatherhouse_hero_section',
						'active_callback'  => 'leatherhouse_hero_text_color_disable',
					),
				),

				// Slide SubTitle Color.
				'leatherhouse_hero_caption_subtitle_title_color' => array(
					'setting' => array(
						'default'           => '#fff',
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_alpha_color' ),
					),
					'control' => array(
						'type'            => 'color',
						'priority'        => 95,
						'label'           => esc_html__( 'Slide Title Color', 'leather-house' ),
						'description'     => esc_html__( 'Set the color for slide subtitle.', 'leather-house' ),
						'section'         => 'leatherhouse_hero_section',
						'choices'         => array(
							'alpha' => true,
						),
						'active_callback'  => 'leatherhouse_hero_caption_subtitle_title_color',
					),
				),
				// Slide Description Color.
				'leatherhouse_hero_caption_descrption_title_color' => array(
					'setting' => array(
						'default'           => '#fff',
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_alpha_color' ),
					),
					'control' => array(
						'type'            => 'color',
						'priority'        => 110,
						'label'           => esc_html__( 'Slide Description Color', 'leather-house' ),
						'description'     => esc_html__( 'Set the color for slide description.', 'leather-house' ),
						'section'         => 'leatherhouse_hero_section',
						'choices'         => array(
							'alpha' => true,
						),
						'active_callback'  => 'leatherhouse_hero_caption_descrption_title_color',
					),
				),

				// Slide Text Background Overlay.
				'leatherhouse_hero_text_overlay_disable'     => array(
					'setting' => array(
						'default'           => false,
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_checkbox' ),
					),
					'control' => array(
						'type'            => 'toggle',
						'priority'        => 150,
						'label'           => esc_html__( 'Text Overlay Enable/Disable', 'leather-house' ),
						'section'         => 'leatherhouse_hero_section',
						'active_callback'  => 'leatherhouse_hero_text_overlay_disable',
					),
				),

				// Slide Text Background Overlay color.
				'leatherhouse_hero_text_overlay_color'       => array(
					'setting' => array(
						'default'           => 'rgba(0,0,0,0.6)',
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_alpha_color' ),
					),
					'control' => array(
						'type'            => 'color',
						'priority'        => 151,
						'label'           => esc_html__( 'Hero Section Text Overlay Color', 'leather-house' ),
						'section'         => 'leatherhouse_hero_section',
						'choices'         => array(
							'alpha' => true,
						),
						'active_callback'  => 'leatherhouse_hero_text_overlay_color',
					),
				),
			);
		}
	}

	new leatherhouse_Customize_Homepage_Slider_Option();

endif;
