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

$wp_customize->add_section(
	'corporaze_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'corporaze' ),
		'panel' => 'corporaze_theme_options',
	)
);

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

$wp_customize->add_control(
	new Corporaze_Toggle_Switch_Custom_Control(
		$wp_customize,
		'corporaze_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'corporaze' ),
			'section' => 'corporaze_breadcrumb',
		)
	)
);

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

$wp_customize->add_control(
	'corporaze_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'corporaze' ),
		'active_callback' => 'corporaze_is_breadcrumb_enabled',
		'section'         => 'corporaze_breadcrumb',
	)
);
