<?php
add_action('init', 'confin_features_kc_map', 99 );
function confin_features_kc_map() {

	if (function_exists('kc_add_map')){
	    kc_add_map(
	        array(
	            'reg_features' => array(
	                'name' => esc_html__('Features','confin-core'),
	                'description' => esc_html__('Display single icon', 'confin-core'),
	                'icon' => 'cpicon cpicon kc-icon-box-alert',
	                'category' => ConfinLibrary::confin_kc_cat_name(),
	                'params' => array(
                  'Content' => array(
                    array(
                      'name' => 'feature_style',
                      'label' => esc_html__('Feature Style', 'confin-core'),
                      'type' => 'select',
                      'options' => array(
                        'standard' => esc_html__( 'Standard', 'confin-core' ),
                        'standard-2' => esc_html__( 'Standard 2', 'confin-core' ),
                        'classic' => esc_html__( 'Classic', 'confin-core' ),
                      ),
                    ),
                    array(
                        'type'          => 'group',
                        'label'         => esc_html__(' Options', 'confin-core'),
                        'name'          => 'feature_items',
                        'description'   => esc_html__( 'features Iteams Group Field', 'confin-core' ),
                        'options'       => array('add_text' => esc_html__(' Add new features Iteam', 'confin-core')),
                        'params' => array(
                          array(
                              'name' => 'feature_icon',
                              'label' => esc_html__( 'Icon','confin-core'),
                              'type' => 'icon_picker',
                              'description' => esc_html__('Chose features  icon', 'confin-core'),
                            ),
                          array(
                              'name' => 'title',
                              'label' => esc_html__( 'Title','confin-core'),
                              'type' => 'text',
                              'admin_label' => true,
                              'description' => esc_html__('Write features  Title ', 'confin-core'),
                            ),
                          array(
                              'name' => 'desc',
                              'label' => esc_html__( 'Description','confin-core'),
                              'type' => 'textarea',
                              'admin_label' => true,
                              'description' => esc_html__('Write features  Description ', 'confin-core'),
                            ),
                        ),
                      ),
                    ),
                    'Style' => array(
	                    array(
                        'name' => 'class',
                        'label' => esc_html__('Extra Class','confin-core'),
                        'type' => 'text',
                        'admin_label' => true,
                        'description' => esc_html__('Enter Extra Class for Titlte ..', 'confin-core')
                      ),array(
                        'name' => 'title_size',
                        'label' => esc_html__('Title Size','confin-core'),
                        'type' => 'number_slider',
                        'options' => array(
                          'min' => 15,
                          'max' => 60,
                          'unit' => 'px',
                          'show_input' => true
                        ),
                        'description' => esc_html__('Enter font-size for title such as: 15px, 1em ..etc..', 'confin-core')
	                    ),
	                    array(
                        'name' => 'title_color',
                        'label' => esc_html__('Title Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for title', 'confin-core')
	                    ),
                      array(
                        'name' => 'icon_size',
                        'label' => esc_html__('features Icon Size','confin-core'),
                        'type' => 'number_slider',
                        'options' => array(
                          'min' => 20,
                          'max' => 50,
                          'unit' => 'px',
                          'show_input' => true
                        ),
                        'description' => esc_html__('Enter font-size for features Icon such as: 15px, 1em ..etc..', 'confin-core')
                      ),
                      array(
                        'name' => 'icon_color',
                        'label' => esc_html__('features Icon Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for features Icon', 'confin-core')
                      ),
	                    array(
                        'name' => 'desc_size',
                        'label' => esc_html__('features Description Size','confin-core'),
                       'type' => 'number_slider',
                        'options' => array(
                          'min' => 15,
                          'max' => 30,
                          'unit' => 'px',
                          'show_input' => true
                        ),
                        'description' => esc_html__('Enter font-size for features Description such as: 15px, 1em ..etc..', 'confin-core')
	                    ),
                      array(
                        'name' => 'desc_color',
                        'label' => esc_html__('features Description Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for features Description', 'confin-core')
                      ),
                      array(
                        'name' => 'border_color',
                        'label' => esc_html__('features Border Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for features Border', 'confin-core')
                      ),
		                )
	                )
	            ),  // End of elemnt kc_icon
	        )
	    ); // End add map
	} // End if
}
