<?php /**
 * Header Builder Options
 *
 * @package Kadence
 */

namespace Kadence;

use Kadence\Theme_Customizer;
use function Kadence\kadence;

ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
	<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
		<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
	</a>
	<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
		<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
	</a>
</div>
<?php $compontent_tabs = ob_get_clean();
$settings = array(
	'mobile_navigation_tabs' => array(
		'control_type' =&gt; 'kadence_blank_control',
		'section'      =&gt; 'mobile_navigation',
		'settings'     =&gt; false,
		'priority'     =&gt; 1,
		'description'  =&gt; $compontent_tabs,
	),
	'mobile_navigation_link' =&gt; array(
		'control_type' =&gt; 'kadence_focus_button_control',
		'section'      =&gt; 'mobile_navigation',
		'settings'     =&gt; false,
		'priority'     =&gt; 5,
		'label'        =&gt; esc_html__( 'Select Menu', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'general',
			),
		),
		'input_attrs'  =&gt; array(
			'section' =&gt; 'menu_locations',
		),
	),
	'mobile_navigation_color' =&gt; array(
		'control_type' =&gt; 'kadence_color_control',
		'section'      =&gt; 'mobile_navigation',
		'label'        =&gt; esc_html__( 'Colors', 'kadence' ),
		'default'      =&gt; kadence()-&gt;default( 'mobile_navigation_color' ),
		'live_method'  =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.mobile-navigation ul li:not(.menu-item-has-children) &gt; a, .mobile-navigation ul li.menu-item-has-children &gt; .drawer-nav-drop-wrap',
				'property' =&gt; 'color',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'color',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.mobile-navigation ul li:not(.menu-item-has-children) &gt; a:hover, .mobile-navigation ul li.menu-item-has-children &gt; .drawer-nav-drop-wrap:hover',
				'property' =&gt; 'color',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'hover',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.mobile-navigation ul li.current-menu-item:not(.menu-item-has-children) &gt; a, .mobile-navigation ul li.current-menu-item.menu-item-has-children &gt; .drawer-nav-drop-wrap',
				'property' =&gt; 'color',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'active',
			),
		),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'design',
			),
		),
		'input_attrs'  =&gt; array(
			'colors' =&gt; array(
				'color' =&gt; array(
					'tooltip' =&gt; __( 'Initial Color', 'kadence' ),
					'palette' =&gt; true,
				),
				'hover' =&gt; array(
					'tooltip' =&gt; __( 'Hover Color', 'kadence' ),
					'palette' =&gt; true,
				),
				'active' =&gt; array(
					'tooltip' =&gt; __( 'Active Color', 'kadence' ),
					'palette' =&gt; true,
				),
			),
		),
	),
	'mobile_navigation_background' =&gt; array(
		'control_type' =&gt; 'kadence_color_control',
		'section'      =&gt; 'mobile_navigation',
		'priority'     =&gt; 20,
		'label'        =&gt; esc_html__( 'Background', 'kadence' ),
		'default'      =&gt; kadence()-&gt;default( 'mobile_navigation_background' ),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.mobile-navigation ul li:not(.menu-item-has-children) &gt; a, .mobile-navigation ul li.menu-item-has-children &gt; .drawer-nav-drop-wrap',
				'property' =&gt; 'background',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'color',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.mobile-navigation ul li:not(.menu-item-has-children) &gt; a:hover, .mobile-navigation ul li.menu-item-has-children &gt; .drawer-nav-drop-wrap:hover',
				'property' =&gt; 'background',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'hover',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.mobile-navigation ul li.current-menu-item:not(.menu-item-has-children) &gt; a, .mobile-navigation ul li.current-menu-item.menu-item-has-children &gt; .drawer-nav-drop-wrap',
				'property' =&gt; 'background',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'active',
			),
		),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'design',
			),
		),
		'input_attrs'  =&gt; array(
			'colors' =&gt; array(
				'color' =&gt; array(
					'tooltip' =&gt; __( 'Initial Background', 'kadence' ),
					'palette' =&gt; true,
				),
				'hover' =&gt; array(
					'tooltip' =&gt; __( 'Hover Background', 'kadence' ),
					'palette' =&gt; true,
				),
				'active' =&gt; array(
					'tooltip' =&gt; __( 'Active Background', 'kadence' ),
					'palette' =&gt; true,
				),
			),
		),
	),
	'mobile_navigation_divider' =&gt; array(
		'control_type' =&gt; 'kadence_border_control',
		'section'      =&gt; 'mobile_navigation',
		'priority'     =&gt; 20,
		'label'        =&gt; esc_html__( 'Item Divider', 'kadence' ),
		'default'      =&gt; kadence()-&gt;default( 'mobile_navigation_divider' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'design',
			),
		),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css_border',
				'selector' =&gt; '.mobile-navigation ul li.menu-item-has-children .drawer-nav-drop-wrap, .mobile-navigation ul li:not(.menu-item-has-children) a ',
				'pattern'  =&gt; '$',
				'property' =&gt; 'border-bottom',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'border',
			),
			array(
				'type'     =&gt; 'css_border',
				'selector' =&gt; '.mobile-navigation ul li.menu-item-has-children .drawer-nav-drop-wrap button',
				'pattern'  =&gt; '$',
				'property' =&gt; 'border-left',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'border',
			),
		),
		'input_attrs'  =&gt; array(
			'responsive' =&gt; false,
		),
	),
	'mobile_navigation_typography' =&gt; array(
		'control_type' =&gt; 'kadence_typography_control',
		'section'      =&gt; 'mobile_navigation',
		'priority'     =&gt; 20,
		'label'        =&gt; esc_html__( 'Font', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'design',
			),
		),
		'default'      =&gt; kadence()-&gt;default( 'mobile_navigation_typography' ),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css_typography',
				'selector' =&gt; '.mobile-navigation ul li',
				'pattern'  =&gt; array(
					'desktop' =&gt; '$',
					'tablet'  =&gt; '$',
					'mobile'  =&gt; '$',
				),
				'property' =&gt; 'font',
				'key'      =&gt; 'typography',
			),
		),
		'input_attrs'  =&gt; array(
			'id'      =&gt; 'mobile_navigation_typography',
			'options' =&gt; 'no-color',
		),
	),
	'mobile_navigation_vertical_spacing' =&gt; array(
		'control_type' =&gt; 'kadence_range_control',
		'section'      =&gt; 'mobile_navigation',
		'priority'     =&gt; 20,
		'label'        =&gt; esc_html__( 'Items Vertical Spacing', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'general',
			),
		),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.mobile-navigation ul li a',
				'property' =&gt; 'padding-top',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'size',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.mobile-navigation ul li a',
				'property' =&gt; 'padding-bottom',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'size',
			),
		),
		'default'      =&gt; kadence()-&gt;default( 'mobile_navigation_vertical_spacing' ),
		'input_attrs'  =&gt; array(
			'min'        =&gt; array(
				'px'  =&gt; 0,
				'em'  =&gt; 0,
				'rem' =&gt; 0,
				'vh'  =&gt; 0,
			),
			'max'        =&gt; array(
				'px'  =&gt; 100,
				'em'  =&gt; 12,
				'rem' =&gt; 12,
				'vh'  =&gt; 12,
			),
			'step'       =&gt; array(
				'px'  =&gt; 1,
				'em'  =&gt; 0.01,
				'rem' =&gt; 0.01,
				'vh'  =&gt; 0.01,
			),
			'units'      =&gt; array( 'px', 'em', 'rem', 'vh' ),
			'responsive' =&gt; false,
		),
	),
	'mobile_navigation_collapse' =&gt; array(
		'control_type' =&gt; 'kadence_switch_control',
		'sanitize'     =&gt; 'kadence_sanitize_toggle',
		'section'      =&gt; 'mobile_navigation',
		'priority'     =&gt; 20,
		'default'      =&gt; kadence()-&gt;default( 'mobile_navigation_collapse' ),
		'label'        =&gt; esc_html__( 'Collapse sub menu items?', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'general',
			),
		),
		'partial'      =&gt; array(
			'selector'            =&gt; '#mobile-site-navigation',
			'container_inclusive' =&gt; true,
			'render_callback'     =&gt; 'Kadence\mobile_navigation',
		),
	),
	'mobile_navigation_parent_toggle' =&gt; array(
		'control_type' =&gt; 'kadence_switch_control',
		'sanitize'     =&gt; 'kadence_sanitize_toggle',
		'section'      =&gt; 'mobile_navigation',
		'priority'     =&gt; 20,
		'default'      =&gt; kadence()-&gt;default( 'mobile_navigation_parent_toggle' ),
		'label'        =&gt; esc_html__( 'Entire parent menu item expands sub menu', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'general',
			),
			array(
				'setting' =&gt; 'mobile_navigation_collapse',
				'value'   =&gt; true,
			),
		),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'class',
				'selector' =&gt; '.mobile-navigation',
				'pattern'  =&gt; 'drawer-navigation-parent-toggle-$',
				'key'      =&gt; '',
			),
		),
	),
);

Theme_Customizer::add_settings( $settings );

