<?php

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

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

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

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

// Features
new \Kirki\Field\Repeater( array(
	'label'       => esc_html__('Features List', 'maxo-fa'),
	'section'     => 'features_section',
	'row_label'   => array(
		'type'  => 'field',
		'value' => esc_html__('Feature', 'maxo-fa'),
		'field' => 'title',
	),
	'button_label' => esc_html__('Add New Feature', 'maxo-fa'),
	'settings'     => 'features',
	'default'     => array(),
	'fields' => array(
		'icon' => array(
			'type'        => 'text',
			'label'       => esc_html__('Icon', 'maxo-fa'),
			'description' => '<a href="'.get_theme_file_uri('assets/icons-reference.pdf').'" target="_blank">'.esc_html__('Icons List', 'maxo-fa').'</a>',
		),
		'title' => array(
			'type'        => 'text',
			'label'       => esc_html__('Title', 'maxo-fa'),
		),
		'text' => array(
			'type'        => 'textarea',
			'label'       => esc_html__('Text', 'maxo-fa'),
		),
	)
) );
