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

	if (function_exists('kc_add_map')){
	    kc_add_map(
	        array(
	            'reg_funfact' => array(
	                'name' => esc_html__('Confin Funfact','confin-core'),
	                'description' => esc_html__('Display single icon', 'confin-core'),
	                'icon' => 'cpicon kc-icon-coundown',
	                'category' => ConfinLibrary::confin_kc_cat_name(),
	                'params' => array(
                  'Content' => array(
                    array(
                        'type'          => 'group',
                        'label'         => esc_html__(' Options', 'confin-core'),
                        'name'          => 'funfact_items',
                        'description'   => esc_html__( 'Funfact Iteams Group Field', 'confin-core' ),
                        'options'       => array('add_text' => esc_html__(' Add new Funfact Iteam', 'confin-core')),
                        'params' => array(
                          array(
                              'name' => 'icon',
                              'label' => esc_html__( 'Icon','confin-core'),
                              'type' => 'icon_picker',
                              'admin_label' => true,
                              'description' => esc_html__('Select Fun fact  Icon ', 'confin-core'),
                            ),
                             array(
                              'name' => 'title',
                              'label' => esc_html__( 'Title','confin-core'),
                              'type' => 'text',
                              'admin_label' => true,
                              'description' => esc_html__('Write Funfact  Title ', 'confin-core'),
                            ),
                            array(
                              'name' => 'number',
                              'label' => esc_html__('Number','confin-core'),
                              'type' => 'text',
                              'admin_label' => false,
                              'description' => esc_html__('Write Funfact  Number ', 'confin-core'),
                            ),
                            array(
                              'name' => 'percent',
                              'label' => esc_html__('Percent','confin-core'),
                              'type' => 'text',
                              'admin_label' => false,
                              'description' => esc_html__('Write Funfact  Percent ', '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' => 'number_size',
                        'label' => esc_html__('Number Size','confin-core'),
                        'type' => 'number_slider',
                        'options' => array(
                          'min' => 15,
                          'max' => 60,
                          'unit' => 'px',
                          'show_input' => true
                        ),
                        'description' => esc_html__('Enter font-size for Funfact Number such as: 15px, 1em ..etc..', 'confin-core')
                      ),
                      array(
                        'name' => 'number_color',
                        'label' => esc_html__('Number Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for Funfact Number', 'confin-core')
                      ),
	                    array(
                        'name' => 'icon_size',
                        'label' => esc_html__('Icon Size','confin-core'),
                        'type' => 'number_slider',
                        'options' => array(
                          'min' => 15,
                          'max' => 60,
                          'unit' => 'px',
                          'show_input' => true
                        ),
                        'description' => esc_html__('Enter font-size for Funfact Icon such as: 15px, 1em ..etc..', 'confin-core')
	                    ),
	                    array(
                        'name' => 'icon_color',
                        'label' => esc_html__('Icon Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for Funfact Icon', 'confin-core')
	                    ),
		                )
	                )
	            ),  // End of elemnt kc_icon
	        )
	    ); // End add map
	} // End if
}
