<?php
/**
 * Topbar Options
 *
 * @package Corporaze
 */

$wp_customize->add_section(
	'corporaze_topbar_options',
	array(
		'panel' => 'corporaze_theme_options',
		'title' => esc_html__( 'Topbar Options', 'corporaze' ),
	)
);

// Topbar Section - Enable Section.
$wp_customize->add_setting(
	'corporaze_enable_topbar_section',
	array(
		'default'           => false,
		'sanitize_callback' => 'corporaze_sanitize_switch',
	)
);

$wp_customize->add_control(
	new Corporaze_Toggle_Switch_Custom_Control(
		$wp_customize,
		'corporaze_enable_topbar_section',
		array(
			'label'    => esc_html__( 'Enable Topbar', 'corporaze' ),
			'section'  => 'corporaze_topbar_options',
			'settings' => 'corporaze_enable_topbar_section',
		)
	)
);

// Topbar Options - Contact Number.
$wp_customize->add_setting(
	'corporaze_contact_number',
	array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'corporaze_contact_number',
	array(
		'label'           => esc_html__( 'Contact Number', 'corporaze' ),
		'section'         => 'corporaze_topbar_options',
		'settings'        => 'corporaze_contact_number',
		'type'            => 'text',
		'active_callback' => 'corporaze_is_topbar_enabled',
	)
);

// Topbar Options - Email Address.
$wp_customize->add_setting(
	'corporaze_email_address',
	array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'corporaze_email_address',
	array(
		'label'           => esc_html__( 'Email Address', 'corporaze' ),
		'section'         => 'corporaze_topbar_options',
		'settings'        => 'corporaze_email_address',
		'type'            => 'text',
		'active_callback' => 'corporaze_is_topbar_enabled',
	)
);
