<?php
/**
 * Breadcrumb
 *
 * @package Newsbreeze
 */

$wp_customize->add_section(
	'newsbreeze_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'newsbreeze' ),
		'panel' => 'newsbreeze_theme_options',
	)
);

// Breadcrumb - Enable Breadcrumb.
$wp_customize->add_setting(
	'newsbreeze_enable_breadcrumb',
	array(
		'sanitize_callback' => 'newsbreeze_sanitize_switch',
		'default'           => true,
	)
);

$wp_customize->add_control(
	new Newsbreeze_Toggle_Switch_Custom_Control(
		$wp_customize,
		'newsbreeze_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'newsbreeze' ),
			'section' => 'newsbreeze_breadcrumb',
		)
	)
);

// Breadcrumb - Separator.
$wp_customize->add_setting(
	'newsbreeze_breadcrumb_separator',
	array(
		'sanitize_callback' => 'sanitize_text_field',
		'default'           => '/',
	)
);

$wp_customize->add_control(
	'newsbreeze_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'newsbreeze' ),
		'active_callback' => 'newsbreeze_is_breadcrumb_enabled',
		'section'         => 'newsbreeze_breadcrumb',
	)
);
