<?php

$wp_customize->add_section('constructionarc_quick_info', array(
    'title' => esc_html__('Quick Information', 'construction-arc'),
	'panel' => 'constructionarc_header_settings',
	'priority' => 200
));

$wp_customize->add_setting('constructionarc_quick_nav', array(
	'transport' => 'postMessage',
	'sanitize_callback' => 'wp_kses_post',
	'priority' => -1,
));
$wp_customize->add_control(new constructionarc_Custom_Control_Tab($wp_customize, 'constructionarc_quick_nav', array(
	'type' => 'tab',
	'section' => 'constructionarc_quick_info',
	'buttons' => array(
		array(
			'name' => esc_html__('Settings', 'construction-arc'),
			'fields' => array(
				'constructionarc_quick_content',
			),
			'active' => true,
		),
		array(
			'name' => esc_html__('Style', 'construction-arc'),
			'fields' => array(
			)
		)
	)
)));

$wp_customize->add_setting('constructionarc_quick_content', array(
	'transport' => 'postMessage',
	'sanitize_callback' => 'constructionarc_themes_sanitize_repeater',
	'default' => json_encode(array(
		array(
			'icon' => 'fa-regular fa-envelope-open',
			'label' => esc_html('Quick Questions? Email Us','construction-arc'),
			'val' => 'example@example.com',
			'enable' => 'enable'
		),
		array(
			'icon' => 'fa-solid fa-headset',
			'label' => esc_html('Talk to an Expert (Aradia)','construction-arc'),
			'val' => '(555)-555-5555',
			'enable' => 'enable'
		),
		array(
			'icon' => 'fas fa-map-marker-alt',
			'label' => esc_html('Office Address','construction-arc'),
			'val' => '123 Main Street, Springfield, USA',
			'enable' => 'enable'
		)
	))
));
$wp_customize->add_control(new constructionarc_Themes_Repeater_Control($wp_customize, 'constructionarc_quick_content', array(
		'label' => esc_html__('Information', 'construction-arc'),
		'section' => 'constructionarc_quick_info',
		'box_label' => esc_html__('Information Item', 'construction-arc'),
		'add_label' => esc_html__('Add New', 'construction-arc'),
		'sortable'	=> 'enable',
		'limit' => 3,
	), 
	array(
		'icon' => array(
			'type' => 'icon',
			'label' => esc_html__('Icon', 'construction-arc'),
			'default' => ''
		),
		'label' => array(
			'type' => 'text',
			'label' => esc_html__('Label', 'construction-arc'),
			'default' => ''
		),
		'val' => array(
			'type' => 'text',
			'label' => esc_html__('Value', 'construction-arc'),
			'default' => ''
		),			
		'enable' => array(
			'type' => 'switch',
			'label' => esc_html__('Enable', 'construction-arc'),
			'switch' => array(
				'enable' => esc_html__('Yes', 'construction-arc'),
				'disable' => esc_html__('No', 'construction-arc')
			),
			'default' => 'enable'
		)
	)
));

$wp_customize->selective_refresh->add_partial( 'constructionarc_quick_content', array (
	'settings' => array( 
		'constructionarc_quick_content' 
	),
	'selector' => '.constructionarc-quick-contact',
	'container_inclusive' => true,
	'fallback_refresh' => false,
	'render_callback' => function () {
		return constructionarc_themes_quick_contact_info_header();
	}
));


$wp_customize->add_setting('constructionarc_pro_quick_info', array(
    'sanitize_callback' => 'constructionarc_sanitize_text'
));
$wp_customize->add_control(new constructionarc_Themes_Upgrade_Text($wp_customize, 'constructionarc_pro_quick_info', array(
    'section' => 'constructionarc_quick_info',
    'label' => esc_html__('For More Settings,', 'construction-arc'),
    'choices' => array(
        esc_html__('Advanced Customization ( Icon, Label/Title & Link )', 'construction-arc'),
        esc_html__('Change Title, Text & Icon Color', 'construction-arc'),
    ),
    'priority' => 250,
)));