<?php

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

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

// Suptitle
new \Kirki\Field\Text( array(
	'settings' => 'clients_suptitle',
	'label'    => esc_html__('Text Above Title', 'maxo-fa'),
	'section'  => 'clients_section',
) );

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

// Clients
new \Kirki\Field\Repeater( array(
	'label'       => esc_html__('Clients', 'maxo-fa'),
	'section'     => 'clients_section',
	'row_label'   => array(
		'type' => 'field',
		'value' => esc_html__('Client', 'maxo-fa'),
		'field' => 'title',
	),
	'button_label' => esc_html__('Add New Client', 'maxo-fa'),
	'settings'     => 'clients',
	'default'      => array(),
	'fields' => array(
		'title' => array(
			'type'        => 'text',
			'label'       => esc_html__('Title', 'maxo-fa'),
		),
		'link' => array(
			'type'        => 'text',
			'label'       => esc_html__('Link', 'maxo-fa'),
		),
		'image' => array(
			'type'        => 'image',
			'label'       => esc_html__('Image', 'maxo-fa'),
			'choices'     => array(
				'save_as' => 'id',
			),
		),
	)
) );
