<?php

/**
 * Breadcrumb
 *
 * @package dark_fitness
 */

$wp_customize->add_section(
	'dark_fitness_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'dark-fitness' ),
		'panel' => 'dark_fitness_theme_options',
	)
);

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

$wp_customize->add_control(
	new Dark_Fitness_Toggle_Switch_Custom_Control(
		$wp_customize,
		'dark_fitness_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'dark-fitness' ),
			'section' => 'dark_fitness_breadcrumb',
		)
	)
);

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

$wp_customize->add_control(
	'dark_fitness_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'dark-fitness' ),
		'active_callback' => 'dark_fitness_is_breadcrumb_enabled',
		'section'         => 'dark_fitness_breadcrumb',
	)
);
