<?php
/**
 * Contact Section
 *
 * @package appointment_management
 */

$wp_customize->add_section(
	'appointment_management_contact_section',
	array(
		'panel'    => 'appointment_management_front_page_options',
		'title'    => esc_html__( 'Contact Section', 'appointment-management' ),
		'priority' => 10,
	)
);

// Contact Section - Phone Text.
$wp_customize->add_setting(
	'appointment_management_phone_text',
	array(
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'appointment_management_phone_text',
	array(
		'label'           => esc_html__( 'Phone Text', 'appointment-management' ),
		'section'         => 'appointment_management_contact_section',
		'settings'        => 'appointment_management_phone_text',
		'type'            => 'text',
	)
);

// Contact Section - Phone Number.
$wp_customize->add_setting(
	'appointment_management_phone_number',
	array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'appointment_management_phone_number',
	array(
		'label'           => esc_html__( 'Phone Number', 'appointment-management' ),
		'section'         => 'appointment_management_contact_section',
		'settings'        => 'appointment_management_phone_number',
		'type'            => 'text',
	)
);

// Contact Section - Email Text.
$wp_customize->add_setting(
	'appointment_management_email_text',
	array(
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'appointment_management_email_text',
	array(
		'label'           => esc_html__( 'Email Text', 'appointment-management' ),
		'section'         => 'appointment_management_contact_section',
		'settings'        => 'appointment_management_email_text',
		'type'            => 'text',
	)
);

// Contact Section - Email ID.
$wp_customize->add_setting(
	'appointment_management_email_address',
	array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'appointment_management_email_address',
	array(
		'label'           => esc_html__( 'Email ID', 'appointment-management' ),
		'section'         => 'appointment_management_contact_section',
		'settings'        => 'appointment_management_email_address',
		'type'            => 'text',
	)
);

// Contact Section - Timing Text.
$wp_customize->add_setting(
	'appointment_management_timing_text',
	array(
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'appointment_management_timing_text',
	array(
		'label'           => esc_html__( 'Opening Timing Text', 'appointment-management' ),
		'section'         => 'appointment_management_contact_section',
		'settings'        => 'appointment_management_timing_text',
		'type'            => 'text',
	)
);

// Contact Section - Opening Timing.
$wp_customize->add_setting(
	'appointment_management_opening_timing',
	array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'appointment_management_opening_timing',
	array(
		'label'           => esc_html__( 'Opening Timing', 'appointment-management' ),
		'section'         => 'appointment_management_contact_section',
		'type'            => 'text',
	)
);

$wp_customize->add_setting( 
	'appointment_management_contact_settings_upgraded_features',
	array(
		'sanitize_callback' => 'sanitize_text_field'
	)
);

$wp_customize->add_control(
	'appointment_management_contact_settings_upgraded_features', 
	array(
		'type'=> 'hidden',
		'description' => "
			<div class='customizer-upgraded-features'>
				<i class='fas fa-info-circle'></i>
				<span class='pro-text'>
					Unlock Premium <strong>Features</strong> ?<br>
					<a target='_blank' href='". esc_url(APPOINTMENT_MANAGEMENT_PREMIUM_PAGE) ." '>Upgrade Pro</a>
				</div>
			</div>
		",
		'section' => 'appointment_management_contact_section'
	)
);