<?php
/**
 * Breadcrumb Options
 *
 * @package Code4rest
 */

namespace Code4rest;

use Code4rest\Theme_Customizer;
use function Code4rest\code4rest;

Theme_Customizer::add_settings(
	array(
		'breadcrumb_engine' => array(
			'control_type' => 'code4rest_select_control',
			'section'      => 'breadcrumbs',
			'transport'    => 'refresh',
			'default'      => code4rest()->default( 'breadcrumb_engine' ),
			'label'        => esc_html__( 'Breadcrumb Engine', 'code4rest' ),
			'input_attrs'  => array(
				'options' => array(
					'' => array(
						'name' => __( 'Default', 'code4rest' ),
					),
					'rankmath' => array(
						'name' => __( 'RankMath (must have activated in plugin)', 'code4rest' ),
					),
					'yoast' => array(
						'name' => __( 'Yoast (must have activated in plugin)', 'code4rest' ),
					),
					'seopress' => array(
						'name' => __( 'SEOPress (must have activated in plugin)', 'code4rest' ),
					),
				),
			),
		),
		'breadcrumb_home_icon' => array(
			'control_type' => 'code4rest_switch_control',
			'sanitize'     => 'code4rest_sanitize_toggle',
			'section'      => 'breadcrumbs',
			'default'      => code4rest()->default( 'breadcrumb_home_icon' ),
			'label'        => esc_html__( 'Use icon for home?', 'code4rest' ),
			'transport'    => 'refresh',
			'context'      => array(
				array(
					'setting'    => 'breadcrumb_engine',
					'operator'   => '=',
					'value'      => '',
				),
			),
		),
	)
);
