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

$wp_customize->add_section(
	'construktly_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'construktly' ),
		'panel' => 'construktly_theme_options',
	)
);

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

$wp_customize->add_control(
	new Construktly_Toggle_Switch_Custom_Control(
		$wp_customize,
		'construktly_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'construktly' ),
			'section' => 'construktly_breadcrumb',
		)
	)
);

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

$wp_customize->add_control(
	'construktly_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'construktly' ),
		'active_callback' => 'construktly_is_breadcrumb_enabled',
		'section'         => 'construktly_breadcrumb',
	)
);
