<?php
/**
 * @topbar settings.
 *
 * @package leatherhouse
 */

defined( 'ABSPATH' ) || exit;

if ( ! class_exists( 'leatherhouse_Customize_Topbar_Option' ) ) :

	class leatherhouse_Customize_Topbar_Option extends leatherhouse_Customize_Base_Option {

		public function elements() {

			return array(

				// Topbar Heading.
				'leatherhouse_topbar_heading'         => array(
					'setting' => array(),
					'control' => array(
						'type'     => 'parent_heading',
						'priority' => 1,
						'label'    => esc_html__( 'Enable/Disable Top Bar', 'leather-house' ),
						'section'  => 'leatherhouse_topbar_settings',
					),
				),

				'leatherhouse_topbar_enabled'         => array(
					'setting' => array(
						'default'           => false,
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_checkbox' ),
					),
					'control' => array(
						'type'     => 'toggle',
						'priority' => 1,
						'label'    => esc_html__( 'Top Bar Enable/Disable', 'leather-house' ),
						'section'  => 'leatherhouse_topbar_settings',
					),
				),

				// Topbar Icon Heading.
				'leatherhouse_topbar_icon_heading'    => array(
					'setting' => array(),
					'control' => array(
						'type'            => 'heading',
						'priority'        => 10,
						'label'           => esc_html__( 'Top Bar Icon Settings', 'leather-house' ),
						'section'         => 'leatherhouse_topbar_settings',
						'active_callback' => 'leatherhouse_topbar_icon_heading',
					),
				),

				// Topbar Icon.
				'leatherhouse_topbar_icon_disable'    => array(
					'setting' => array(
						'default'           => true,
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_checkbox' ),
					),
					'control' => array(
						'type'            => 'toggle',
						'priority'        => 15,
						'label'           => esc_html__( 'Enable Social Icons', 'leather-house' ),
						'section'         => 'leatherhouse_topbar_settings',
						'active_callback' => 'leatherhouse_topbar_icon_disable',
					),
				),

				// Topbar Contact Details Heading.
				'leatherhouse_contact_details_heading' => array(
					'setting' => array(),
					'control' => array(
						'type'            => 'heading',
						'priority'        => 20,
						'label'           => esc_html__( 'Top Bar Contact Details', 'leather-house' ),
						'section'         => 'leatherhouse_topbar_settings',
						'active_callback' => 'leatherhouse_contact_details_heading',
					),
				),
				// Contact Details.
				'leatherhouse_contact_detail_disable' => array(
					'setting' => array(
						'default'           => true,
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_checkbox' ),
					),
					'control' => array(
						'type'            => 'toggle',
						'priority'        => 30,
						'label'           => esc_html__( 'Enable Contact Details', 'leather-house' ),
						'section'         => 'leatherhouse_topbar_settings',
						'active_callback' => 'leatherhouse_contact_detail_disable',
					),
				),

				// Topbar Email Details Heading.
				'leatherhouse_email_details_heading' => array(
					'setting' => array(),
					'control' => array(
						'type'            => 'heading',
						'priority'        => 39,
						'label'           => esc_html__( 'Top Bar Email Details', 'leather-house' ),
						'section'         => 'leatherhouse_topbar_settings',
						'active_callback' => 'leatherhouse_email_details_heading',
					),
				),
				// Email Details.
				'leatherhouse_email_detail_disable'   => array(
					'setting' => array(
						'default'           => true,
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_checkbox' ),
					),
					'control' => array(
						'type'            => 'toggle',
						'priority'        => 40,
						'label'           => esc_html__( 'Enable Email Details', 'leather-house' ),
						'section'         => 'leatherhouse_topbar_settings',
						'active_callback' => 'leatherhouse_email_detail_disable',
					),
				),

				// Topbar Mobile Details Heading.
				'leatherhouse_mobile_details_heading' => array(
					'setting' => array(),
					'control' => array(
						'type'            => 'heading',
						'priority'        => 49,
						'label'           => esc_html__( 'Top Bar Mobile Details', 'leather-house' ),
						'section'         => 'leatherhouse_topbar_settings',
						'active_callback' => 'leatherhouse_mobile_details_heading',
					),
				),
				// Mobile Details.
				'leatherhouse_mobile_detail_disable'  => array(
					'setting' => array(
						'default'           => true,
						'sanitize_callback' => array( 'leatherhouse_Customizer_Sanitize', 'sanitize_checkbox' ),
					),
					'control' => array(
						'type'            => 'toggle',
						'priority'        => 50,
						'label'           => esc_html__( 'Enable Mobile Details', 'leather-house' ),
						'section'         => 'leatherhouse_topbar_settings',
						'active_callback' => 'leatherhouse_mobile_detail_disable',
					),
				),
			);

		}

	}

	new leatherhouse_Customize_Topbar_Option();

endif;
