<?php

/**
 * Header Options
 *
 * @package dark_fitness
 */


// General Options
$wp_customize->add_section(
	'dark_fitness_general_options',
	array(
		'panel' => 'dark_fitness_theme_options',
		'title' => esc_html__( 'General Options', 'dark-fitness' ),
	)
);

// General Options - Enable Preloader.
$wp_customize->add_setting(
	'dark_fitness_enable_preloader',
	array(
		'sanitize_callback' => 'dark_fitness_sanitize_switch',
		'default'           => false,
	)
);

$wp_customize->add_control( new Dark_Fitness_Toggle_Switch_Custom_Control(
		$wp_customize,
		   'dark_fitness_enable_preloader',
		array(
			'label'   => esc_html__( 'Enable Preloader', 'dark-fitness' ),
			'section' => 'dark_fitness_general_options',
		)
	)
);




// Site Title - Enable Setting.
$wp_customize->add_setting(
	'dark_fitness_enable_site_title_setting',
	array(
		'default'           => true,
		'sanitize_callback' => 'dark_fitness_sanitize_switch',
	)
);

$wp_customize->add_control(
	new Dark_Fitness_Toggle_Switch_Custom_Control(
		$wp_customize,
		'dark_fitness_enable_site_title_setting',
		array(
			'label'    => esc_html__( 'Disable Site Title', 'dark-fitness' ),
			'section'  => 'title_tagline',
			'settings' => 'dark_fitness_enable_site_title_setting',
		)
	)
);

// Tagline - Enable Setting.
$wp_customize->add_setting(
	'dark_fitness_enable_tagline_setting',
	array(
		'default'           => false,
		'sanitize_callback' => 'dark_fitness_sanitize_switch',
	)
);

$wp_customize->add_control(
	new Dark_Fitness_Toggle_Switch_Custom_Control(
		$wp_customize,
		'dark_fitness_enable_tagline_setting',
		array(
			'label'    => esc_html__( 'Enable Tagline', 'dark-fitness' ),
			'section'  => 'title_tagline',
			'settings' => 'dark_fitness_enable_tagline_setting',
		)
	)
);

$wp_customize->add_section(
	'dark_fitness_header_options',
	array(
		'panel' => 'dark_fitness_theme_options',
		'title' => esc_html__( 'Header Options', 'dark-fitness' ),
	)
);

// Header Options - Enable Topbar.
$wp_customize->add_setting(
	'dark_fitness_enable_topbar',
	array(
		'sanitize_callback' => 'dark_fitness_sanitize_switch',
		'default'           => false,
	)
);

$wp_customize->add_control(
	new Dark_Fitness_Toggle_Switch_Custom_Control(
		$wp_customize,
		'dark_fitness_enable_topbar',
		array(
			'label'   => esc_html__( 'Enable Topbar', 'dark-fitness' ),
			'section' => 'dark_fitness_header_options',
		)
	)
);

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

$wp_customize->add_control(
	'dark_fitness_contact_number',
	array(
		'label'           => esc_html__( 'Contact Number', 'dark-fitness' ),
		'section'         => 'dark_fitness_header_options',
		'type'            => 'text',
		'active_callback' => 'dark_fitness_is_topbar_enabled',
	)
);



// Header Options - Custom Button Label.
$wp_customize->add_setting(
	'dark_fitness_menu_custom_button_label',
	array(
		'default'           => '',
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'dark_fitness_menu_custom_button_label',
	array(
		'label'    => esc_html__( 'Menu Custom Button Label', 'dark-fitness' ),
		'section'  => 'dark_fitness_header_options',
		'settings' => 'dark_fitness_menu_custom_button_label',
		'type'     => 'text',
		'active_callback' => 'dark_fitness_is_topbar_enabled',
	)
);

// Header Options - Custom Button URL.
$wp_customize->add_setting(
	'dark_fitness_menu_custom_button_url',
	array(
		'default'           => '#',
		'sanitize_callback' => 'esc_url_raw',
	)
);

$wp_customize->add_control(
	'dark_fitness_menu_custom_button_url',
	array(
		'label'    => esc_html__( 'Menu Button URL', 'dark-fitness' ),
		'section'  => 'dark_fitness_header_options',
		'settings' => 'dark_fitness_menu_custom_button_url',
		'type'     => 'url',
		'active_callback' => 'dark_fitness_is_topbar_enabled',
	)
);

// Header Options - Enable Social Icons.
$wp_customize->add_setting(
	'dark_fitness_enable_social',
	array(
		'sanitize_callback' => 'dark_fitness_sanitize_switch',
		'default'           => false,
	)
);

$wp_customize->add_control(
	new Dark_Fitness_Toggle_Switch_Custom_Control(
		$wp_customize,
		'dark_fitness_enable_social',
		array(
			'label'   => esc_html__( 'Enable Social', 'dark-fitness' ),
			'description' => esc_html__( 'If you want to add a social icon you need to go to Dashboard = Appearance = Menus then create a new menu now add Custom Links then add proper links then choose Social then click Create Menu.', 'dark-fitness' ),
			'section' => 'dark_fitness_header_options',
			'active_callback' => 'dark_fitness_is_topbar_enabled',
		)
	)
);
