<?php

/**
 * Customizer broadcaster section settings
 *
 * @package wpstream-theme
 */

/**
 * Function to add broadcaster section settings to the customizer.
 *
 * @param WP_Customize_Manager $wp_customize Customizer object.
 */

function wpstream_broadcaster_section_settings( $wp_customize ) {

	$title_color = get_theme_mod( 'wpstream_theme_style_white' ) ? '#151120' : '#f1f1f1';
	$background_color = get_theme_mod( 'wpstream_theme_style_white' ) ? '#f0f0f3' : '#f1f1f1';

	$wp_customize->add_section(
		'wpstream_broadcaster_settings',
		array(
			'title' => esc_html__( 'Broadcaster section', 'hello-wpstream' ),
			'panel' => 'wpstream_general_design',
		)
	);

	$wp_customize->add_setting(
		'wpstream_broadcaster_section_title_color',
		array(
			'default'           => $title_color,
			'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'wpstream_broadcaster_section_title_color',
			array(
				'label'    => esc_html__( 'Text color', 'hello-wpstream' ),
				'section'  => 'wpstream_broadcaster_settings',
				'settings' => 'wpstream_broadcaster_section_title_color',
			)
		)
	);

	$wp_customize->add_setting(
		'wpstream_broadcaster_section_background_color',
		array(
			'default'           => $background_color,
			'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'wpstream_broadcaster_section_background_color',
			array(
				'label'    => esc_html__( 'Background color', 'hello-wpstream' ),
				'section'  => 'wpstream_broadcaster_settings',
				'settings' => 'wpstream_broadcaster_section_background_color',
			)
		)
	);

	$wp_customize->add_setting(
		'wpstream_broadcaster_section_link_color',
		array(
			'default'           => '#60AFFF',
			'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'wpstream_broadcaster_section_link_color',
			array(
				'label'    => esc_html__( 'Link color', 'hello-wpstream' ),
				'section'  => 'wpstream_broadcaster_settings',
				'settings' => 'wpstream_broadcaster_section_link_color',
			)
		)
	);

	$wp_customize->add_setting(
		'wpstream_broadcaster_section_link_hover_color',
		array(
			'default'           => '#60AFFF',
			'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'wpstream_broadcaster_section_link_hover_color',
			array(
				'label'    => esc_html__( 'Link hover color', 'hello-wpstream' ),
				'section'  => 'wpstream_broadcaster_settings',
				'settings' => 'wpstream_broadcaster_section_link_hover_color',
			)
		)
	);

}