<?php

// Prevent Direct Access
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

new \Kirki\Section( 'testimonials_section', array(
	'title'          => esc_html__('Testimonials', 'maxo-fa'),
	'priority'       => 20,
) );

// Background Image
new \Kirki\Field\Image( array(
	'settings'    => 'testimonials_background',
	'label'       => esc_html__('Background Image', 'maxo-fa'),
	'section'     => 'testimonials_section',
	'choices'     => array(
		'save_as' => 'id',
	),
) );

// Testimonials
new \Kirki\Field\Repeater( array(
	'label'       => esc_html__('Testimonials', 'maxo-fa'),
	'section'     => 'testimonials_section',
	'row_label'   => array(
		'type'  => 'field',
		'value' => esc_html__('Testimonial', 'maxo-fa'),
		'field' => 'name',
	),
	'button_label' => esc_html__('Add New Testimonial', 'maxo-fa'),
	'settings'     => 'testimonials',
	'default'     => array(),
	'fields' => array(
		'name' => array(
			'type'        => 'text',
			'label'       => esc_html__('Name', 'maxo-fa'),
		),
		'job_position' => array(
			'type'        => 'text',
			'label'       => esc_html__('Job Position', 'maxo-fa'),
		),
		'text' => array(
			'type'        => 'textarea',
			'label'       => esc_html__('Text', 'maxo-fa'),
		),
	)
) );
