<?php

/**
 * What We Do Section
 *
 * @package fast_food_joint
 */

	$wp_customize->add_section(
		'fast_food_joint_about_section',
		array(
			'panel'    => 'fast_food_joint_front_page_options',
			'title'    => esc_html__( 'What We Do Section', 'fast-food-joint' ),
			'priority' => 10,
		)
	);

	// What We Do Section - Enable Section.
	$wp_customize->add_setting(
		'fast_food_joint_enable_about_section',
		array(
			'default'           => false,
			'sanitize_callback' => 'fast_food_joint_sanitize_switch',
		)
	);

	$wp_customize->add_control(
		new Fast_Food_Joint_Toggle_Switch_Custom_Control(
			$wp_customize,
			'fast_food_joint_enable_about_section',
			array(
				'label'    => esc_html__( 'Enable What We Do Section', 'fast-food-joint' ),
				'section'  => 'fast_food_joint_about_section',
				'settings' => 'fast_food_joint_enable_about_section',
			)
		)
	);

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'fast_food_joint_enable_about_section',
			array(
				'selector' => '#fast_food_joint_about_section .section-link',
				'settings' => 'fast_food_joint_enable_about_section',
			)
		);
	}

	// Image setting 1
	$wp_customize->add_setting('fast_food_joint_custom_image_setting_1', array(
	    'default'           => '',
	    'transport'         => 'refresh',
	    'sanitize_callback' => 'esc_url_raw', // Sanitization callback function
	));

	// Image control 1
	$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'custom_image_setting_control_1', array(
	    'label'    => __('What We Do Image 1', 'fast-food-joint'),
	    'section'  => 'fast_food_joint_about_section',
	    'settings' => 'fast_food_joint_custom_image_setting_1',
		'active_callback' => 'fast_food_joint_is_about_section_enabled',
	)));


	// Image setting 2
	$wp_customize->add_setting('fast_food_joint_custom_image_setting_2', array(
	    'default'           => '',
	    'transport'         => 'refresh',
	    'sanitize_callback' => 'esc_url_raw', // Sanitization callback function
	));

	// Image control 1
	$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'custom_image_setting_control_2', array(
	    'label'    => __('What We Do Image 2', 'fast-food-joint'),
	    'section'  => 'fast_food_joint_about_section',
	    'settings' => 'fast_food_joint_custom_image_setting_2',
		'active_callback' => 'fast_food_joint_is_about_section_enabled',
	)));

	// Image setting 3
	$wp_customize->add_setting('fast_food_joint_custom_image_setting_3', array(
	    'default'           => '',
	    'transport'         => 'refresh',
	    'sanitize_callback' => 'esc_url_raw', // Sanitization callback function
	));

	// Image control 1
	$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'custom_image_setting_control_3', array(
	    'label'    => __('What We Do Image 3', 'fast-food-joint'),
	    'section'  => 'fast_food_joint_about_section',
	    'settings' => 'fast_food_joint_custom_image_setting_3',
		'active_callback' => 'fast_food_joint_is_about_section_enabled',
	)));

	// What We Do Section - What We Do Heading.
	$wp_customize->add_setting(
		'fast_food_joint_about_us_left_heading',
		array(
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'fast_food_joint_about_us_left_heading',
		array(
			'label'           => esc_html__( 'What We Do Heading', 'fast-food-joint' ),
			'section'         => 'fast_food_joint_about_section',
			'settings'        => 'fast_food_joint_about_us_left_heading',
			'type'            => 'text',
			'active_callback' => 'fast_food_joint_is_about_section_enabled',
		)
	);

	// What We Do Section - What We Do Content.
	$wp_customize->add_setting(
		'fast_food_joint_about_us_left_text',
		array(
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'fast_food_joint_about_us_left_text',
		array(
			'label'           => esc_html__( 'What We Do Content', 'fast-food-joint' ),
			'section'         => 'fast_food_joint_about_section',
			'settings'        => 'fast_food_joint_about_us_left_text',
			'type'            => 'text',
			'active_callback' => 'fast_food_joint_is_about_section_enabled',
		)
	);

	// What We Do Section - Button Label.
	$wp_customize->add_setting(
		'fast_food_joint_about_button_label_',
		array(
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'fast_food_joint_about_button_label_',
		array(
			'label'           => esc_html__( 'What We Do Button Label', 'fast-food-joint' ),
			'section'         => 'fast_food_joint_about_section',
			'settings'        => 'fast_food_joint_about_button_label_',
			'type'            => 'text',
			'active_callback' => 'fast_food_joint_is_about_section_enabled',
		)
	);

	// What We Do Section - Button Link.
	$wp_customize->add_setting(
		'fast_food_joint_about_button_link_',
		array(
			'default'           => '',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'fast_food_joint_about_button_link_',
		array(
			'label'           => esc_html__( 'What We Do Button Link', 'fast-food-joint' ),
			'section'         => 'fast_food_joint_about_section',
			'settings'        => 'fast_food_joint_about_button_link_',
			'type'            => 'url',
			'active_callback' => 'fast_food_joint_is_about_section_enabled',
		)
	);