<?php
/**
 * Header Options
 *
 * @package Newsbreeze
 */

$wp_customize->add_section(
	'newsbreeze_header_options',
	array(
		'panel' => 'newsbreeze_theme_options',
		'title' => esc_html__( 'Header Options', 'newsbreeze' ),
	)
);

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

$wp_customize->add_control(
	new Newsbreeze_Toggle_Switch_Custom_Control(
		$wp_customize,
		'newsbreeze_enable_topbar',
		array(
			'label'   => esc_html__( 'Enable Topbar', 'newsbreeze' ),
			'section' => 'newsbreeze_header_options',
		)
	)
);

// Header Options - Advertisement.
$wp_customize->add_setting(
	'newsbreeze_header_advertisement',
	array(
		'default'           => '',
		'sanitize_callback' => 'newsbreeze_sanitize_image',
	)
);

$wp_customize->add_control(
	new WP_Customize_Image_Control(
		$wp_customize,
		'newsbreeze_header_advertisement',
		array(
			'label'    => esc_html__( 'Advertisement', 'newsbreeze' ),
			'section'  => 'newsbreeze_header_options',
			'settings' => 'newsbreeze_header_advertisement',
		)
	)
);

	// Header Options - Advertisement URL.
$wp_customize->add_setting(
	'newsbreeze_header_advertisement_url',
	array(
		'default'           => '',
		'sanitize_callback' => 'esc_url_raw',
	)
);

$wp_customize->add_control(
	'newsbreeze_header_advertisement_url',
	array(
		'label'    => esc_html__( 'Advertisement URL', 'newsbreeze' ),
		'section'  => 'newsbreeze_header_options',
		'settings' => 'newsbreeze_header_advertisement_url',
		'type'     => 'url',
	)
);
