<?php
/**
 * Header Options
 *
 * @package Routine News
 */

$wp_customize->add_section(
	'routine_news_header_options',
	array(
		'panel' => 'routine_news_theme_options',
		'title' => esc_html__( 'Header Options', 'routine-news' ),
	)
);

// Header Section - Enable Topbar Section.
$wp_customize->add_setting(
	'routine_news_enable_topbar_section',
	array(
		'default'           => true,
		'sanitize_callback' => 'routine_news_sanitize_switch',
	)
);

$wp_customize->add_control(
	new Routine_News_Toggle_Switch_Custom_Control(
		$wp_customize,
		'routine_news_enable_topbar_section',
		array(
			'label'    => esc_html__( 'Enable Topbar Section', 'routine-news' ),
			'section'  => 'routine_news_header_options',
			'settings' => 'routine_news_enable_topbar_section',
		)
	)
);

// Header Options - Topbar Menu Title Label.
$wp_customize->add_setting(
	'routine_news_topbar_menu_title_label',
	array(
		'default'           => __( 'Quick Links', 'routine-news' ),
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'routine_news_topbar_menu_title_label',
	array(
		'label'    => esc_html__( 'Topbar Menu Title Label', 'routine-news' ),
		'section'  => 'routine_news_header_options',
		'settings' => 'routine_news_topbar_menu_title_label',
		'type'     => 'text',
	)
);

// Header Section - Horizontal Line.
$wp_customize->add_setting(
	'routine_news_header_horizontal_line',
	array(
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	new Routine_News_Customize_Horizontal_Line(
		$wp_customize,
		'routine_news_header_horizontal_line',
		array(
			'section'  => 'routine_news_header_options',
			'settings' => 'routine_news_header_horizontal_line',
			'type'     => 'hr',
		)
	)
);

// Header Options - Header Button Custom Label.
$wp_customize->add_setting(
	'routine_news_header_custom_button_label',
	array(
		'default'           => __( 'Subscribe', 'routine-news' ),
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'routine_news_header_custom_button_label',
	array(
		'label'    => esc_html__( 'Header Custom Button', 'routine-news' ),
		'section'  => 'routine_news_header_options',
		'settings' => 'routine_news_header_custom_button_label',
		'type'     => 'text',
	)
);

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

$wp_customize->add_control(
	'routine_news_header_custom_button_url',
	array(
		'label'    => esc_html__( 'Button Link', 'routine-news' ),
		'section'  => 'routine_news_header_options',
		'settings' => 'routine_news_header_custom_button_url',
		'type'     => 'url',
	)
);
