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

namespace Kadence;

use Kadence\Theme_Customizer;
use function Kadence\kadence;

Theme_Customizer::add_settings(
	array(
		'scroll_up_tabs' => array(
			'control_type' =&gt; 'kadence_tab_control',
			'section'      =&gt; 'scroll_up',
			'settings'     =&gt; false,
			'priority'     =&gt; 1,
			'input_attrs'  =&gt; array(
				'general' =&gt; array(
					'label'  =&gt; __( 'General', 'kadence' ),
					'target' =&gt; 'scroll_up',
				),
				'design' =&gt; array(
					'label'  =&gt; __( 'Design', 'kadence' ),
					'target' =&gt; 'scroll_up_design',
				),
				'active' =&gt; 'general',
			),
		),
		'scroll_up_tabs_design' =&gt; array(
			'control_type' =&gt; 'kadence_tab_control',
			'section'      =&gt; 'scroll_up_design',
			'settings'     =&gt; false,
			'priority'     =&gt; 1,
			'input_attrs'  =&gt; array(
				'general' =&gt; array(
					'label'  =&gt; __( 'General', 'kadence' ),
					'target' =&gt; 'scroll_up',
				),
				'design' =&gt; array(
					'label'  =&gt; __( 'Design', 'kadence' ),
					'target' =&gt; 'scroll_up_design',
				),
				'active' =&gt; 'design',
			),
		),
		'scroll_up' =&gt; array(
			'control_type' =&gt; 'kadence_switch_control',
			'sanitize'     =&gt; 'kadence_sanitize_toggle',
			'section'      =&gt; 'scroll_up',
			'default'      =&gt; kadence()-&gt;default( 'scroll_up' ),
			'label'        =&gt; esc_html__( 'Enable Scroll To Top', 'kadence' ),
			'transport'    =&gt; 'refresh',
		),
		'scroll_up_icon' =&gt; array(
			'control_type' =&gt; 'kadence_radio_icon_control',
			'section'      =&gt; 'scroll_up',
			'priority'     =&gt; 10,
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_icon' ),
			'label'        =&gt; esc_html__( 'Scroll Up Icon', 'kadence' ),
			'partial'      =&gt; array(
				'selector'            =&gt; '.scroll-up-wrap',
				'container_inclusive' =&gt; true,
				'render_callback'     =&gt; 'Kadence\scroll_up',
			),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
			),
			'input_attrs'  =&gt; array(
				'layout' =&gt; array(
					'arrow-up' =&gt; array(
						'icon' =&gt; 'arrowUp',
					),
					'arrow-up2' =&gt; array(
						'icon' =&gt; 'arrowUp2',
					),
					'chevron-up' =&gt; array(
						'icon' =&gt; 'chevronUp',
					),
					'chevron-up2' =&gt; array(
						'icon' =&gt; 'chevronUp2',
					),
				),
				'responsive' =&gt; false,
			),
		),
		'scroll_up_icon_size' =&gt; array(
			'control_type' =&gt; 'kadence_range_control',
			'section'      =&gt; 'scroll_up',
			'label'        =&gt; esc_html__( 'Icon Size', 'kadence' ),
			'live_method'     =&gt; array(
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader, #kt-scroll-up',
					'property' =&gt; 'font-size',
					'pattern'  =&gt; '$',
					'key'      =&gt; 'size',
				),
			),
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_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; true,
			),
		),
		'scroll_up_side' =&gt; array(
			'control_type' =&gt; 'kadence_radio_icon_control',
			'section'      =&gt; 'scroll_up',
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_side' ),
			'label'        =&gt; esc_html__( 'Align', 'kadence' ),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
			),
			'live_method'     =&gt; array(
				array(
					'type'     =&gt; 'class',
					'selector' =&gt; '.scroll-up-wrap',
					'pattern'  =&gt; 'scroll-up-side-$',
					'key'      =&gt; '',
				),
			),
			'input_attrs'  =&gt; array(
				'layout' =&gt; array(
					'left' =&gt; array(
						'name'    =&gt; __( 'Left', 'kadence' ),
						'icon'    =&gt; '',
					),
					'right' =&gt; array(
						'name'    =&gt; __( 'Right', 'kadence' ),
						'icon'    =&gt; '',
					),
				),
				'responsive' =&gt; false,
			),
		),
		'scroll_up_side_offset' =&gt; array(
			'control_type' =&gt; 'kadence_range_control',
			'section'      =&gt; 'scroll_up',
			'label'        =&gt; esc_html__( 'Side Offset', 'kadence' ),
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_side_offset' ),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
			),
			'live_method'     =&gt; array(
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader.scroll-up-side-right, #kt-scroll-up.scroll-up-side-right',
					'pattern'  =&gt; '$',
					'property' =&gt; 'right',
					'key'      =&gt; 'size',
				),
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader.scroll-up-side-left, #kt-scroll-up.scroll-up-side-left',
					'pattern'  =&gt; '$',
					'property' =&gt; 'left',
					'key'      =&gt; 'size',
				),
			),
			'input_attrs'  =&gt; array(
				'min'        =&gt; array(
					'px'  =&gt; 0,
					'em'  =&gt; 0,
					'rem' =&gt; 0,
					'vw'  =&gt; 0,
				),
				'max'        =&gt; array(
					'px'  =&gt; 600,
					'em'  =&gt; 20,
					'rem' =&gt; 20,
					'vw'  =&gt; 100,
				),
				'step'       =&gt; array(
					'px'  =&gt; 1,
					'em'  =&gt; 0.01,
					'rem' =&gt; 0.01,
					'vw' =&gt; 1,
				),
				'units'      =&gt; array( 'px', 'em', 'rem', 'vw' ),
				'responsive' =&gt; true,
			),
		),
		'scroll_up_bottom_offset' =&gt; array(
			'control_type' =&gt; 'kadence_range_control',
			'section'      =&gt; 'scroll_up',
			'label'        =&gt; esc_html__( 'Bottom Offset', 'kadence' ),
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_bottom_offset' ),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
			),
			'live_method'     =&gt; array(
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader, #kt-scroll-up',
					'pattern'  =&gt; '$',
					'property' =&gt; 'bottom',
					'key'      =&gt; 'size',
				),
			),
			'input_attrs'  =&gt; array(
				'min'        =&gt; array(
					'px'  =&gt; 0,
					'em'  =&gt; 0,
					'rem' =&gt; 0,
					'vh'  =&gt; 0,
				),
				'max'        =&gt; array(
					'px'  =&gt; 600,
					'em'  =&gt; 20,
					'rem' =&gt; 20,
					'vh'  =&gt; 100,
				),
				'step'       =&gt; array(
					'px'  =&gt; 1,
					'em'  =&gt; 0.01,
					'rem' =&gt; 0.01,
					'vh' =&gt; 1,
				),
				'units'      =&gt; array( 'px', 'em', 'rem', 'vh' ),
				'responsive' =&gt; true,
			),
		),
		'scroll_up_visiblity' =&gt; array(
			'control_type' =&gt; 'kadence_check_icon_control',
			'section'      =&gt; 'scroll_up',
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_visiblity' ),
			'label'        =&gt; esc_html__( 'Visibility', 'kadence' ),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
			),
			'partial'      =&gt; array(
				'selector'            =&gt; '.scroll-up-wrap',
				'container_inclusive' =&gt; true,
				'render_callback'     =&gt; 'Kadence\scroll_up',
			),
			'input_attrs'  =&gt; array(
				'options' =&gt; array(
					'desktop' =&gt; array(
						'name' =&gt; __( 'Desktop', 'kadence' ),
						'icon' =&gt; 'desktop',
					),
					'tablet' =&gt; array(
						'name' =&gt; __( 'Tablet', 'kadence' ),
						'icon' =&gt; 'tablet',
					),
					'mobile' =&gt; array(
						'name' =&gt; __( 'Mobile', 'kadence' ),
						'icon' =&gt; 'smartphone',
					),
				),
			),
		),
		'scroll_up_style' =&gt; array(
			'control_type' =&gt; 'kadence_radio_icon_control',
			'section'      =&gt; 'scroll_up_design',
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_style' ),
			'label'        =&gt; esc_html__( 'Scroll Button Style', 'kadence' ),
			'live_method'     =&gt; array(
				array(
					'type'     =&gt; 'class',
					'selector' =&gt; '#kt-scroll-up-reader, #kt-scroll-up',
					'pattern'  =&gt; 'scroll-up-style-$',
					'key'      =&gt; '',
				),
			),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
			),
			'input_attrs'  =&gt; array(
				'layout' =&gt; array(
					'filled' =&gt; array(
						'name'    =&gt; __( 'Filled', 'kadence' ),
					),
					'outline' =&gt; array(
						'name'    =&gt; __( 'Outline', 'kadence' ),
						'icon'    =&gt; '',
					),
				),
				'responsive' =&gt; false,
			),
		),
		'scroll_up_color' =&gt; array(
			'control_type' =&gt; 'kadence_color_control',
			'section'      =&gt; 'scroll_up_design',
			'label'        =&gt; esc_html__( 'Colors', 'kadence' ),
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_color' ),
			'live_method'     =&gt; array(
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader, #kt-scroll-up',
					'property' =&gt; 'color',
					'pattern'  =&gt; '$',
					'key'      =&gt; 'color',
				),
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader:hover, #kt-scroll-up:hover',
					'property' =&gt; 'color',
					'pattern'  =&gt; '$',
					'key'      =&gt; 'hover',
				),
			),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
			),
			'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,
					),
				),
			),
		),
		'scroll_up_background' =&gt; array(
			'control_type' =&gt; 'kadence_color_control',
			'section'      =&gt; 'scroll_up_design',
			'label'        =&gt; esc_html__( 'Background Colors', 'kadence' ),
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_background' ),
			'live_method'     =&gt; array(
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader, #kt-scroll-up',
					'property' =&gt; 'background',
					'pattern'  =&gt; '$',
					'key'      =&gt; 'color',
				),
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader:hover, #kt-scroll-up:hover',
					'property' =&gt; 'background',
					'pattern'  =&gt; '$',
					'key'      =&gt; 'hover',
				),
			),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
				array(
					'setting'    =&gt; 'scroll_up_style',
					'operator'   =&gt; '=',
					'value'      =&gt; 'filled',
				),
			),
			'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,
					),
				),
			),
		),
		'scroll_up_border_colors' =&gt; array(
			'control_type' =&gt; 'kadence_color_control',
			'section'      =&gt; 'scroll_up_design',
			'label'        =&gt; esc_html__( 'Border Colors', 'kadence' ),
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_border' ),
			'live_method'     =&gt; array(
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader, #kt-scroll-up',
					'property' =&gt; 'border-color',
					'pattern'  =&gt; '$',
					'key'      =&gt; 'color',
				),
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader:hover, #kt-scroll-up:hover',
					'property' =&gt; 'border-color',
					'pattern'  =&gt; '$',
					'key'      =&gt; 'hover',
				),
			),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
			),
			'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,
					),
				),
			),
		),
		'scroll_up_border' =&gt; array(
			'control_type' =&gt; 'kadence_border_control',
			'section'      =&gt; 'scroll_up_design',
			'label'        =&gt; esc_html__( 'Border', 'kadence' ),
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_border' ),
			'live_method'     =&gt; array(
				array(
					'type'     =&gt; 'css_border',
					'selector' =&gt; '#kt-scroll-up-reader, #kt-scroll-up',
					'property' =&gt; 'border',
					'pattern'  =&gt; '$',
					'key'      =&gt; 'border',
				),
			),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
			),
			'input_attrs'  =&gt; array(
				'responsive' =&gt; false,
				'color'      =&gt; false,
			),
		),
		'scroll_up_radius' =&gt; array(
			'control_type' =&gt; 'kadence_measure_control',
			'section'      =&gt; 'scroll_up_design',
			'priority'     =&gt; 10,
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_radius' ),
			'label'        =&gt; esc_html__( 'Border Radius', 'kadence' ),
			'live_method'     =&gt; array(
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader, #kt-scroll-up',
					'property' =&gt; 'border-radius',
					'pattern'  =&gt; '$',
					'key'      =&gt; 'measure',
				),
			),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
			),
			'input_attrs'  =&gt; array(
				'responsive' =&gt; false,
			),
		),
		'scroll_up_padding' =&gt; array(
			'control_type' =&gt; 'kadence_measure_control',
			'section'      =&gt; 'scroll_up_design',
			'priority'     =&gt; 10,
			'default'      =&gt; kadence()-&gt;default( 'scroll_up_padding' ),
			'label'        =&gt; esc_html__( 'Scroll Button Padding', 'kadence' ),
			'live_method'     =&gt; array(
				array(
					'type'     =&gt; 'css',
					'selector' =&gt; '#kt-scroll-up-reader, #kt-scroll-up',
					'property' =&gt; 'padding',
					'pattern'  =&gt; '$',
					'key'      =&gt; 'measure',
				),
			),
			'context'      =&gt; array(
				array(
					'setting'  =&gt; 'scroll_up',
					'operator' =&gt; '==',
					'value'    =&gt; true,
				),
			),
			'input_attrs'  =&gt; array(
				'responsive' =&gt; true,
			),
		),
	)
);
