<?php
add_action('init', 'confin_contact_info_kc_map', 99 );
function confin_contact_info_kc_map() {
    if (function_exists('kc_add_map')){
        kc_add_map(
            array(
                'contact_info' => array(
                    'name' =>  esc_html__('Confin Contact Info','confin-core'),
                    'description' => esc_html__('Confin Contact Info', 'confin-core'),
                    'icon' => 'cpicon kc-icon-box',
                    'category' => ConfinLibrary::confin_kc_cat_name(),
                    'params' => array(
                    'Content' => array(
                      array(
                        'type'          => 'group',
                        'label'         => esc_html__('Contact Info', 'confin-core'),
                        'name'          => 'contact_items',
                        'options'       => array('add_text' => esc_html__(' Add info', 'confin-core')),
                        'params' => array(
                          array(
                              'name' => 'icon',
                              'label' => esc_html__( 'Icon','confin-core'),
                              'type' => 'icon_picker',
                              'admin_label' => true,
                              'description' => esc_html__('Write Contact Info  Title ', 'confin-core'),
                            ),
                          array(
                              'name' => 'info',
                              'label' => esc_html__( 'Info','confin-core'),
                              'type' => 'textarea',
                              'admin_label' => true,
                              'description' => esc_html__('Write Contact Info ', 'confin-core'),
                            ),
                        ),
                      ),
                      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')
                      ),
                    ),
                    'Style' => array(
                    array(
                        'name' => 'title_color',
                        'label' => esc_html__('Contact Info Title Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for title', 'confin-core')
                      ),
                    array(
                        'name' => 'title_size',
                        'label' => esc_html__('Contact Info 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' => 'subtitle_color',
                        'label' => esc_html__('Contact Info Sub Title Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for Sub title', 'confin-core')
                      ),
                    array(
                        'name' => 'subtitle_size',
                        'label' => esc_html__('Contact Info Sub 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 Sub title such as: 15px, 1em ..etc..', 'confin-core')
                      ),
                     array(
                        'name' => 'desc_color',
                        'label' => esc_html__('Contact Info Description Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for Description', 'confin-core')
                    ),
                    array(
                        'name' => 'desc_size',
                        'label' => esc_html__('Contact Info Description Size','confin-core'),
                        'type' => 'number_slider',
                        'options' => array(
                          'min' => 15,
                          'max' => 60,
                          'unit' => 'px',
                          'show_input' => true
                        ),
                        'description' => esc_html__('Enter font-size for Description such as: 15px, 1em ..etc..', 'confin-core')
                      ),
                     array(
                        'name' => 'icon_color',
                        'label' => esc_html__('Contact Info icon Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for icon', 'confin-core')
                      ),
                     array(
                        'name' => 'info_color',
                        'label' => esc_html__('Contact Info Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color icon', 'confin-core')
                      ),

                    )
                  )
                ),  // End of elemnt kc_icon

            )
        ); // End add map

    } // End if

}
