<?php

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

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

// Left Image
new \Kirki\Field\Image( array(
	'settings'    => 'services_image',
	'label'       => esc_html__('Side Image', 'maxo-fa'),
	'section'     => 'services_section',
	'choices'     => array(
		'save_as' => 'id',
	),
) );

// Title
new \Kirki\Field\Text( array(
	'settings' => 'services_title',
	'label'    => esc_html__('Title', 'maxo-fa'),
	'section'  => 'services_section',
) );

// Services
new \Kirki\Field\Repeater( array(
	'label'       => esc_html__('Services List', 'maxo-fa'),
	'section'     => 'services_section',
	'row_label'   => array(
		'type'  => 'field',
		'value' => esc_html__('Service', 'maxo-fa'),
		'field' => 'title',
	),
	'button_label' => esc_html__('Add New Service', 'maxo-fa'),
	'settings'     => 'services',
	'default'     => array(),
	'fields' => array(
		'title' => array(
			'type'        => 'text',
			'label'       => esc_html__('Title', 'maxo-fa'),
		),
		'text' => array(
			'type'        => 'textarea',
			'label'       => esc_html__('Text', 'maxo-fa'),
		),
	)
) );
