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

namespace Kadence;

use Kadence\Theme_Customizer;
use function Kadence\kadence;

$settings = array(
	'header_mobile_cart_tabs' => array(
		'control_type' =&gt; 'kadence_tab_control',
		'section'      =&gt; 'mobile_cart',
		'settings'     =&gt; false,
		'priority'     =&gt; 1,
		'input_attrs'  =&gt; array(
			'general' =&gt; array(
				'label'  =&gt; __( 'General', 'kadence' ),
				'target' =&gt; 'mobile_cart',
			),
			'design' =&gt; array(
				'label'  =&gt; __( 'Design', 'kadence' ),
				'target' =&gt; 'mobile_cart_design',
			),
			'active' =&gt; 'general',
		),
	),
	'header_mobile_cart_tabs_design' =&gt; array(
		'control_type' =&gt; 'kadence_tab_control',
		'section'      =&gt; 'mobile_cart_design',
		'settings'     =&gt; false,
		'priority'     =&gt; 1,
		'input_attrs'  =&gt; array(
			'general' =&gt; array(
				'label'  =&gt; __( 'General', 'kadence' ),
				'target' =&gt; 'mobile_cart',
			),
			'design' =&gt; array(
				'label'  =&gt; __( 'Design', 'kadence' ),
				'target' =&gt; 'mobile_cart_design',
			),
			'active' =&gt; 'design',
		),
	),
	'header_mobile_cart_label' =&gt; array(
		'control_type' =&gt; 'kadence_text_control',
		'section'      =&gt; 'mobile_cart',
		'sanitize'     =&gt; 'sanitize_text_field',
		'priority'     =&gt; 6,
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_label' ),
		'label'        =&gt; esc_html__( 'Cart Label', 'kadence' ),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'html',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-label',
				'pattern'  =&gt; '$',
				'key'      =&gt; '',
			),
		),
	),
	'header_mobile_cart_icon' =&gt; array(
		'control_type' =&gt; 'kadence_radio_icon_control',
		'section'      =&gt; 'mobile_cart',
		'priority'     =&gt; 10,
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_icon' ),
		'label'        =&gt; esc_html__( 'Cart Icon', 'kadence' ),
		'partial'      =&gt; array(
			'selector'            =&gt; '.header-mobile-cart-wrap',
			'container_inclusive' =&gt; true,
			'render_callback'     =&gt; 'Kadence\mobile_cart',
		),
		'input_attrs'  =&gt; array(
			'layout' =&gt; array(
				'shopping-bag' =&gt; array(
					'icon' =&gt; 'shoppingBag',
				),
				'shopping-cart' =&gt; array(
					'icon' =&gt; 'shoppingCart',
				),
			),
			'responsive' =&gt; false,
		),
	),
	'header_mobile_cart_style' =&gt; array(
		'control_type' =&gt; 'kadence_radio_icon_control',
		'section'      =&gt; 'mobile_cart',
		'priority'     =&gt; 10,
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_style' ),
		'label'        =&gt; esc_html__( 'Cart Click Action', 'kadence' ),
		'transport'    =&gt; 'refresh',
		'input_attrs'  =&gt; array(
			'layout' =&gt; array(
				'link' =&gt; array(
					'name' =&gt; __( 'Link', 'kadence' ),
				),
				'slide' =&gt; array(
					'name' =&gt; __( 'Popout Cart', 'kadence' ),
				),
			),
			'responsive' =&gt; false,
		),
	),
	'header_mobile_cart_show_total' =&gt; array(
		'control_type' =&gt; 'kadence_switch_control',
		'sanitize'     =&gt; 'kadence_sanitize_toggle',
		'section'      =&gt; 'mobile_cart',
		'priority'     =&gt; 6,
		'partial'      =&gt; array(
			'selector'            =&gt; '.header-mobile-cart-wrap',
			'container_inclusive' =&gt; true,
			'render_callback'     =&gt; 'Kadence\mobile_cart',
		),
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_show_total' ),
		'label'        =&gt; esc_html__( 'Show Item Total Indicator', 'kadence' ),
	),
	'header_mobile_cart_icon_size' =&gt; array(
		'control_type' =&gt; 'kadence_range_control',
		'section'      =&gt; 'mobile_cart_design',
		'label'        =&gt; esc_html__( 'Icon Size', 'kadence' ),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-button .kadence-svg-iconset',
				'property' =&gt; 'font-size',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'size',
			),
		),
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_icon_size' ),
		'input_attrs'  =&gt; array(
			'min'        =&gt; array(
				'px'  =&gt; 0,
				'em'  =&gt; 0,
				'rem' =&gt; 0,
			),
			'max'        =&gt; array(
				'px'  =&gt; 100,
				'em'  =&gt; 12,
				'rem' =&gt; 12,
			),
			'step'       =&gt; array(
				'px'  =&gt; 1,
				'em'  =&gt; 0.01,
				'rem' =&gt; 0.01,
			),
			'units'      =&gt; array( 'px', 'em', 'rem' ),
			'responsive' =&gt; false,
		),
	),
	'header_mobile_cart_color' =&gt; array(
		'control_type' =&gt; 'kadence_color_control',
		'section'      =&gt; 'mobile_cart_design',
		'label'        =&gt; esc_html__( 'Cart Colors', 'kadence' ),
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_color' ),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-inner-wrap .header-cart-button',
				'property' =&gt; 'color',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'color',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-inner-wrap .header-cart-button:hover',
				'property' =&gt; 'color',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'hover',
			),
		),
		'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,
				),
			),
		),
	),
	'header_mobile_cart_background' =&gt; array(
		'control_type' =&gt; 'kadence_color_control',
		'section'      =&gt; 'mobile_cart_design',
		'label'        =&gt; esc_html__( 'Cart Background', 'kadence' ),
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_background' ),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-inner-wrap .header-cart-button',
				'property' =&gt; 'background',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'color',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-inner-wrap .header-cart-button:hover',
				'property' =&gt; 'background',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'hover',
			),
		),
		'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,
				),
			),
		),
	),
	'header_mobile_cart_total_color' =&gt; array(
		'control_type' =&gt; 'kadence_color_control',
		'section'      =&gt; 'mobile_cart_design',
		'label'        =&gt; esc_html__( 'Cart Total Colors', 'kadence' ),
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_total_color' ),
		'context'      =&gt; array(
			array(
				'setting'  =&gt; 'header_mobile_cart_show_total',
				'operator' =&gt; '=',
				'value'    =&gt; true,
			),
		),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-button .header-cart-total',
				'property' =&gt; 'color',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'color',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-button:hover .header-cart-total',
				'property' =&gt; 'color',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'hover',
			),
		),
		'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,
				),
			),
		),
	),
	'header_mobile_cart_total_background' =&gt; array(
		'control_type' =&gt; 'kadence_color_control',
		'section'      =&gt; 'mobile_cart_design',
		'label'        =&gt; esc_html__( 'Cart Total Background', 'kadence' ),
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_total_background' ),
		'context'      =&gt; array(
			array(
				'setting'  =&gt; 'header_mobile_cart_show_total',
				'operator' =&gt; '=',
				'value'    =&gt; true,
			),
		),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-button .header-cart-total',
				'property' =&gt; 'background',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'color',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-button:hover .header-cart-total',
				'property' =&gt; 'background',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'hover',
			),
		),
		'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,
				),
			),
		),
	),
	'header_mobile_cart_typography' =&gt; array(
		'control_type' =&gt; 'kadence_typography_control',
		'section'      =&gt; 'mobile_cart_design',
		'label'        =&gt; esc_html__( 'Cart Label Font', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting'  =&gt; 'header_mobile_cart_label',
				'operator' =&gt; '!empty',
				'value'    =&gt; '',
			),
		),
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_typography' ),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css_typography',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-button .header-cart-label',
				'pattern'  =&gt; array(
					'desktop' =&gt; '$',
					'tablet'  =&gt; '$',
					'mobile'  =&gt; '$',
				),
				'property' =&gt; 'font',
				'key'      =&gt; 'typography',
			),
		),
		'input_attrs'  =&gt; array(
			'id'      =&gt; 'header_mobile_cart_typography',
			'options' =&gt; 'no-color',
		),
	),
	'header_mobile_cart_padding' =&gt; array(
		'control_type' =&gt; 'kadence_measure_control',
		'section'      =&gt; 'mobile_cart_design',
		'priority'     =&gt; 10,
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_padding' ),
		'label'        =&gt; esc_html__( 'Cart Padding', 'kadence' ),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.header-mobile-cart-wrap .header-cart-inner-wrap .header-cart-button',
				'property' =&gt; 'padding',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'measure',
			),
		),
		'input_attrs'  =&gt; array(
			'responsive' =&gt; false,
		),
	),
	'header_mobile_cart_popup_side' =&gt; array(
		'control_type' =&gt; 'kadence_radio_icon_control',
		'section'      =&gt; 'mobile_cart',
		'priority'     =&gt; 20,
		'default'      =&gt; kadence()-&gt;default( 'header_mobile_cart_popup_side' ),
		'label'        =&gt; esc_html__( 'Slide-Out Side', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting'    =&gt; 'header_mobile_cart_style',
				'operator'   =&gt; '=',
				'value'      =&gt; 'slide',
			),
		),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'class',
				'selector' =&gt; '#cart-drawer',
				'pattern'  =&gt; 'popup-mobile-drawer-side-$',
				'key'      =&gt; '',
			),
		),
		'input_attrs'  =&gt; array(
			'layout' =&gt; array(
				'left' =&gt; array(
					'tooltip' =&gt; __( 'Reveal from Left', 'kadence' ),
					'name'    =&gt; __( 'Left', 'kadence' ),
					'icon'    =&gt; '',
				),
				'right' =&gt; array(
					'tooltip' =&gt; __( 'Reveal from Right', 'kadence' ),
					'name'    =&gt; __( 'Right', 'kadence' ),
					'icon'    =&gt; '',
				),
			),
			'responsive' =&gt; false,
		),
	),
);

Theme_Customizer::add_settings( $settings );

