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

    if (function_exists('kc_add_map')){
        kc_add_map(
            array(
                'med_about' => array(
                    'name' =>  esc_html__('Confin About','confin-core'),
                    'description' => esc_html__('Confin Abou Section', 'confin-core'),
                    'icon' => 'cpicon kc-icon-box',
                    'category' => ConfinLibrary::confin_kc_cat_name(),
                    'params' => array(
                    'Content' => array(
                     array(
                      'name' => 'about_style',
                      'label' => esc_html__('About Style', 'confin-core'),
                      'type' => 'select',
                      'options' => array(
                        'standard' => esc_html__( 'Standard', 'confin-core' ),
                        'classic' => esc_html__( 'Classic', 'confin-core' ),
                        'elegant' => esc_html__( 'Elegant', 'confin-core' ),
                        'normal' => esc_html__( 'Normal', 'confin-core' ),
                        'video' => esc_html__( 'Video', 'confin-core' ),
                      ),
                      ),
                      array(
                          'name' => 'subtitle',
                          'label' => esc_html__( 'About Sub Title','confin-core'),
                          'type' => 'text',
                          'admin_label' => true,
                          'description' => esc_html__('Write About Sub Title ', 'confin-core'),
                          'relation' => array(
                            'parent'    => 'about_style',
                            'hide_when' => 'video'
                          ),
                        ),
                      array(
                          'name' => 'title',
                          'label' => esc_html__( 'About Title','confin-core'),
                          'type' => 'textarea',
                          'admin_label' => true,
                          'description' => esc_html__('Write About Title ', 'confin-core'),
                      ),
                      array(
                          'name' => 'transparent_title',
                          'label' => esc_html__( 'About Transparent Title','confin-core'),
                          'type' => 'text',
                          'admin_label' => true,
                          'description' => esc_html__('Write About Transparent Title ', 'confin-core'),
                          'relation' => array(
                            'parent'    => 'about_style',
                            'hide_when' => 'video'
                          ),
                      ),
                      array(
                          'name' => 'desc',
                          'label' => esc_html__( 'About Description','confin-core'),
                          'type' => 'editor',
                          'admin_label' => true,
                          'description' => esc_html__('Write About About Description', 'confin-core'),
                        ),
                      array(
                          'name' => 'button_text',
                          'label' => esc_html__( 'Button Text','confin-core'),
                          'type' => 'text',
                          'admin_label' => true,
                          'description' => esc_html__('Write About Button Text', 'confin-core'),
                        ),
                      array(
                          'name' => 'button_link',
                          'label' => esc_html__( 'Button Link','confin-core'),
                          'type' => 'text',
                          'admin_label' => true,
                          'description' => esc_html__('Write About Button Link', 'confin-core'),
                        ),
                      array(
                          'name' => 'info_name',
                          'label' => esc_html__( 'About Info Name','confin-core'),
                          'type' => 'text',
                          'admin_label' => true,
                          'description' => esc_html__('Write About Info Name', 'confin-core'),
                          'relation' => array(
                            'parent'    => 'about_style',
                            'show_when' => 'video'
                          ),
                        ),
                      array(
                          'name' => 'info_title',
                          'label' => esc_html__( 'About Info Title','confin-core'),
                          'type' => 'text',
                          'admin_label' => true,
                          'description' => esc_html__('Write About Info Title', 'confin-core'),
                          'relation' => array(
                            'parent'    => 'about_style',
                            'show_when' => 'video'
                          ),
                        ),
                      array(
                        'name' => 'image_url',
                        'type' => 'attach_image',
                        'label' => esc_html__('Set About Image ', 'confin'),
                      ),
                      array(
                        'name' => 'video_url',
                        'type' => 'text',
                        'label' => esc_html__('Set About Video Link ', 'confin'),
                        'relation' => array(
                          'parent'    => 'about_style',
                          'show_when' => 'video'
                        ),
                      ),
                      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__('About 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__('About 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__('About 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__('About 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_size',
                        'label' => esc_html__('About 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' => 'desc_color',
                        'label' => esc_html__('About Description Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for Description', 'confin-core')
                    ),
                    array(
                        'name' => 'button_size',
                        'label' => esc_html__('About Button Size','confin-core'),
                        'type' => 'number_slider',
                        'options' => array(
                          'min' => 15,
                          'max' => 60,
                          'unit' => 'px',
                          'show_input' => true
                        ),
                        'description' => esc_html__('Enter font-size for Button such as: 15px, 1em ..etc..', 'confin-core')
                      ),
                    array(
                        'name' => 'button_color',
                        'label' => esc_html__('About Button Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for Button', 'confin-core')
                      ),
                    array(
                        'name' => 'button_hover',
                        'label' => esc_html__('About Button Hover Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set Hover color for Button', 'confin-core')
                      ),

                    )
                  )
                ),  // End of elemnt kc_icon

            )
        ); // End add map

    } // End if

}
