<?php

/**
 * Footer Options
 *
 * @package auto_mechanic
 */

$wp_customize->add_section(
	'auto_mechanic_footer_options',
	array(
		'panel' => 'auto_mechanic_theme_options',
		'title' => esc_html__( 'Footer Options', 'auto-mechanic' ),
	)
);

$wp_customize->add_setting(
	'auto_mechanic_footer_copyright_text',
	array(
		'default'           => '',
		'sanitize_callback' => 'wp_kses_post',
		'transport'         => 'refresh',
	)
);

$wp_customize->add_control(
	'auto_mechanic_footer_copyright_text',
	array(
		'label'    => esc_html__( 'Copyright Text', 'auto-mechanic' ),
		'section'  => 'auto_mechanic_footer_options',
		'settings' => 'auto_mechanic_footer_copyright_text',
		'type'     => 'textarea',
	)
);

// Footer Options - Scroll Top.
$wp_customize->add_setting(
	'auto_mechanic_scroll_top',
	array(
		'sanitize_callback' => 'auto_mechanic_sanitize_switch',
		'default'           => true,
	)
);

$wp_customize->add_control(
	new Auto_Mechanic_Toggle_Switch_Custom_Control(
		$wp_customize,
		'auto_mechanic_scroll_top',
		array(
			'label'   => esc_html__( 'Enable Scroll Top Button', 'auto-mechanic' ),
			'section' => 'auto_mechanic_footer_options',
		)
	)
);
