<?php
/*
 * All Custom Shortcode for [theme_name] theme.
 * Author & Copyright: themexshaper
 * URL: http://themeforest.net/user/themexshaper
 */

if( ! function_exists( 'confin_shortcodes' ) ) {
  function confin_shortcodes( $options ) {

    $options       = array();

    /* Topbar Shortcodes */
    $options[]     = array(
      'title'      => esc_html__('Topbar Shortcodes', 'confin'),
      'shortcodes' => array(

        // Header Quote
        array(
          'name'          => 'header_cta',
          'title'         => esc_html__('Header CTA', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'cta_text',
              'type'      => 'text',
              'title'     => esc_html__('CTA Text', 'confin'),
            ),
            array(
              'id'        => 'cta_url',
              'type'      => 'text',
              'title'     => esc_html__('CTA URL', 'confin'),
            ),

          ),
        ),
        // Header Quote

        // Topbar item
        array(
          'name'          => 'confin_widget_topbars',
          'title'         => esc_html__('Topbar info', 'confin'),
          'view'          => 'clone',
          'clone_id'      => 'confin_widget_topbar',
          'clone_title'   => esc_html__('Add New', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),

          ),
          'clone_fields'  => array(

            array(
              'id'        => 'title',
              'type'      => 'text',
              'title'     => esc_html__('Header Info Title', 'confin')
            ),
            array(
              'id'        => 'topbar_icon',
              'type'      => 'icon',
              'title'     => esc_html__('Header Info Description', 'confin')
            ),

          ),

        ),

      ),
    );

    /* Header Shortcodes */
    $options[]     = array(
      'title'      => esc_html__('Header Shortcodes', 'confin'),
      'shortcodes' => array(

        // header Social
        array(
          'name'          => 'confin_header_socials',
          'title'         => esc_html__('Header Social', 'confin'),
          'view'          => 'clone',
          'clone_id'      => 'confin_header_social',
          'clone_title'   => esc_html__('Add New Social', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),

          ),
          'clone_fields'  => array(
            array(
              'id'        => 'social_icon',
              'type'      => 'icon',
              'title'     => esc_html__('Social Icon', 'confin')
            ),
            array(
              'id'        => 'social_icon_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Icon Color', 'confin'),
            ),
            array(
              'id'        => 'social_link',
              'type'      => 'text',
              'title'     => esc_html__('Social Link', 'confin')
            ),
            array(
              'id'        => 'target_tab',
              'type'      => 'switcher',
              'title'     => esc_html__('Open New Tab?', 'confin'),
              'yes'     => esc_html__('Yes', 'confin'),
              'no'     => esc_html__('No', 'confin'),
            ),

          ),

        ),
        // header Social End

      ),
    );

    /* Content Shortcodes */
    $options[]     = array(
      'title'      => esc_html__('Content Shortcodes', 'confin'),
      'shortcodes' => array(

        // Spacer
        array(
          'name'          => 'vc_empty_space',
          'title'         => esc_html__('Spacer', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'height',
              'type'      => 'text',
              'title'     => esc_html__('Height', 'confin'),
              'attributes' => array(
                'placeholder'     => '20px',
              ),
            ),

          ),
        ),
        // Spacer

        // Topbar item
        array(
          'name'          => 'service_contacts',
          'title'         => esc_html__('Service Contact', 'confin'),
          'view'          => 'clone',
          'clone_id'      => 'service_contact',
          'clone_title'   => esc_html__('Add New', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'title',
              'type'      => 'text',
              'title'     => esc_html__('Title', 'confin'),
            ),
            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),

          ),
          'clone_fields'  => array(

            array(
              'id'        => 'title',
              'type'      => 'text',
              'title'     => esc_html__('Info Title', 'confin')
            ),
            array(
              'id'        => 'icon',
              'type'      => 'icon',
              'title'     => esc_html__('Icon', 'confin')
            ),

          ),

        ),
        // Social Icons
        array(
          'name'          => 'confin_socials',
          'title'         => esc_html__('Social Icons', 'confin'),
          'view'          => 'clone',
          'clone_id'      => 'confin_social',
          'clone_title'   => esc_html__('Add New', 'confin'),
          'fields'        => array(
            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),

            // Colors
            array(
              'type'    => 'notice',
              'class'   => 'info',
              'content' => esc_html__('Colors', 'confin')
            ),
            array(
              'id'        => 'icon_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Icon Color', 'confin'),
              'wrap_class' => 'column_third',
            ),
            array(
              'id'        => 'icon_hover_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Icon Hover Color', 'confin'),
              'wrap_class' => 'column_third',
              'dependency'  => array('social_select', '!=', 'style-three'),
            ),
            array(
              'id'        => 'bg_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Backrgound Color', 'confin'),
              'wrap_class' => 'column_third',
              'dependency'  => array('social_select', '!=', 'style-one'),
            ),
            array(
              'id'        => 'bg_hover_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Backrgound Hover Color', 'confin'),
              'wrap_class' => 'column_third',
              'dependency'  => array('social_select', '==', 'style-two'),
            ),
            array(
              'id'        => 'border_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Border Color', 'confin'),
              'wrap_class' => 'column_third',
              'dependency'  => array('social_select', '==', 'style-three'),
            ),

            // Icon Size
            array(
              'id'        => 'icon_size',
              'type'      => 'text',
              'title'     => esc_html__('Icon Size', 'confin'),
              'wrap_class' => 'column_full',
            ),

          ),
          'clone_fields'  => array(

            array(
              'id'        => 'social_link',
              'type'      => 'text',
              'attributes' => array(
                'placeholder'     => 'http://',
              ),
              'title'     => esc_html__('Link', 'confin')
            ),
            array(
              'id'        => 'social_icon',
              'type'      => 'icon',
              'title'     => esc_html__('Social Icon', 'confin')
            ),
            array(
              'id'        => 'target_tab',
              'type'      => 'switcher',
              'title'     => esc_html__('Open New Tab?', 'confin'),
              'on_text'     => esc_html__('Yes', 'confin'),
              'off_text'     => esc_html__('No', 'confin'),
            ),

          ),

        ),
        // Social Icons

        // Useful Links
        array(
          'name'          => 'confin_useful_links',
          'title'         => esc_html__('Useful Links', 'confin'),
          'view'          => 'clone',
          'clone_id'      => 'confin_useful_link',
          'clone_title'   => esc_html__('Add New', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'column_width',
              'type'      => 'select',
              'title'     => esc_html__('Column Width', 'confin'),
              'options'        => array(
                'full-width' => esc_html__('One Column', 'confin'),
                'half-width' => esc_html__('Two Column', 'confin'),
                'third-width' => esc_html__('Three Column', 'confin'),
              ),
            ),
            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),

          ),
          'clone_fields'  => array(

            array(
              'id'        => 'title_link',
              'type'      => 'text',
              'title'     => esc_html__('Link', 'confin')
            ),
            array(
              'id'        => 'target_tab',
              'type'      => 'switcher',
              'title'     => esc_html__('Open New Tab?', 'confin'),
              'on_text'     => esc_html__('Yes', 'confin'),
              'off_text'     => esc_html__('No', 'confin'),
            ),
            array(
              'id'        => 'link_title',
              'type'      => 'text',
              'title'     => esc_html__('Title', 'confin')
            ),

          ),

        ),
        // Useful Links

        // Simple Image List
        array(
          'name'          => 'confin_image_lists',
          'title'         => esc_html__('Simple Image List', 'confin'),
          'view'          => 'clone',
          'clone_id'      => 'confin_image_list',
          'clone_title'   => esc_html__('Add New', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),

          ),
          'clone_fields'  => array(

            array(
              'id'        => 'get_image',
              'type'      => 'upload',
              'title'     => esc_html__('Image', 'confin')
            ),
            array(
              'id'        => 'link',
              'type'      => 'text',
              'attributes' => array(
                'placeholder'     => 'http://',
              ),
              'title'     => esc_html__('Link', 'confin')
            ),
            array(
              'id'    => 'open_tab',
              'type'  => 'switcher',
              'std'   => false,
              'title' => esc_html__('Open link to new tab?', 'confin')
            ),

          ),

        ),
        // Simple Image List

        // Simple Link
        array(
          'name'          => 'confin_simple_link',
          'title'         => esc_html__('Simple Link', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'link_style',
              'type'      => 'select',
              'title'     => esc_html__('Link Style', 'confin'),
              'options'        => array(
                'link-underline' => esc_html__('Link Underline', 'confin'),
                'link-arrow-right' => esc_html__('Link Arrow (Right)', 'confin'),
                'link-arrow-left' => esc_html__('Link Arrow (Left)', 'confin'),
              ),
            ),
            array(
              'id'        => 'link_icon',
              'type'      => 'icon',
              'title'     => esc_html__('Icon', 'confin'),
              'value'      => 'fa fa-caret-right',
              'dependency'  => array('link_style', '!=', 'link-underline'),
            ),
            array(
              'id'        => 'link_text',
              'type'      => 'text',
              'title'     => esc_html__('Link Text', 'confin'),
            ),
            array(
              'id'        => 'link',
              'type'      => 'text',
              'title'     => esc_html__('Link', 'confin'),
              'attributes' => array(
                'placeholder'     => 'http://',
              ),
            ),
            array(
              'id'        => 'target_tab',
              'type'      => 'switcher',
              'title'     => esc_html__('Open New Tab?', 'confin'),
              'on_text'     => esc_html__('Yes', 'confin'),
              'off_text'     => esc_html__('No', 'confin'),
            ),
            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),

            // Normal Mode
            array(
              'type'    => 'notice',
              'class'   => 'info',
              'content' => esc_html__('Normal Mode', 'confin')
            ),
            array(
              'id'        => 'text_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Text Color', 'confin'),
              'wrap_class' => 'column_half el-hav-border',
            ),
            array(
              'id'        => 'border_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Border Color', 'confin'),
              'wrap_class' => 'column_half el-hav-border',
              'dependency'  => array('link_style', '==', 'link-underline'),
            ),
            // Hover Mode
            array(
              'type'    => 'notice',
              'class'   => 'info',
              'content' => esc_html__('Hover Mode', 'confin')
            ),
            array(
              'id'        => 'text_hover_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Text Hover Color', 'confin'),
              'wrap_class' => 'column_half el-hav-border',
            ),
            array(
              'id'        => 'border_hover_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Border Hover Color', 'confin'),
              'wrap_class' => 'column_half el-hav-border',
              'dependency'  => array('link_style', '==', 'link-underline'),
            ),

            // Size
            array(
              'type'    => 'notice',
              'class'   => 'info',
              'content' => esc_html__('Font Sizes', 'confin')
            ),
            array(
              'id'        => 'text_size',
              'type'      => 'text',
              'title'     => esc_html__('Text Size', 'confin'),
              'attributes' => array(
                'placeholder'     => 'Eg: 14px',
              ),
            ),

          ),
        ),
        // Simple Link

        // Blockquotes
        array(
          'name'          => 'confin_blockquote',
          'title'         => esc_html__('Blockquote', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'blockquote_style',
              'type'      => 'select',
              'title'     => esc_html__('Blockquote Style', 'confin'),
              'options'        => array(
                '' => esc_html__('Select Blockquote Style', 'confin'),
                'style-one' => esc_html__('Style One', 'confin'),
                'style-two' => esc_html__('Style Two', 'confin'),
              ),
            ),
            array(
              'id'        => 'text_size',
              'type'      => 'text',
              'title'     => esc_html__('Text Size', 'confin'),
            ),
            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),
            array(
              'id'        => 'content_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Content Color', 'confin'),
            ),
            array(
              'id'        => 'left_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Left Border Color', 'confin'),
            ),
            array(
              'id'        => 'border_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Border Color', 'confin'),
            ),
            array(
              'id'        => 'bg_color',
              'type'      => 'color_picker',
              'title'     => esc_html__('Background Color', 'confin'),
            ),
            // Content
            array(
              'id'        => 'content',
              'type'      => 'textarea',
              'title'     => esc_html__('Content', 'confin'),
            ),

          ),

        ),
        // Blockquotes

      ),
    );

    /* Widget Shortcodes */
    $options[]     = array(
      'title'      => esc_html__('Widget Shortcodes', 'confin'),
      'shortcodes' => array(

        // widget Contact info
        array(
          'name'          => 'confin_widget_contact_info',
          'title'         => esc_html__('Contact info', 'confin'),
          'fields'        => array(
            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),
            array(
              'id'        => 'title',
              'type'      => 'text',
              'title'     => esc_html__('Title', 'confin'),
            ),
            array(
              'id'        => 'desc',
              'type'      => 'textarea',
              'title'     => esc_html__('Description', 'confin'),
            ),
            array(
              'id'        => 'link_text',
              'type'      => 'text',
              'title'     => esc_html__('Link text', 'confin'),
            ),
            array(
              'id'        => 'link',
              'type'      => 'text',
              'title'     => esc_html__('Link', 'confin'),
            ),

          ),
        ),
        // widget download-widget
        array(
          'name'          => 'confin_download_widgets',
          'title'         => esc_html__('Download Widget', 'confin'),
          'view'          => 'clone',
          'clone_id'      => 'confin_download_widget',
          'clone_title'   => esc_html__('Add New', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),
          ),
          'clone_fields'  => array(

            array(
              'id'        => 'download_icon',
              'type'      => 'icon',
              'title'     => esc_html__('Download Icon', 'confin')
            ),
            array(
              'id'        => 'title',
              'type'      => 'text',
              'title'     => esc_html__('Download Title', 'confin')
            ),
            array(
              'id'        => 'link',
              'type'      => 'text',
              'title'     => esc_html__('Download Link', 'confin')
            ),

          ),

        ),

      ),
    );

    /* Footer Shortcodes */
    $options[]     = array(
      'title'      => esc_html__('Footer Shortcodes', 'confin'),
      'shortcodes' => array(

        // Footer Menus
        array(
          'name'          => 'confin_footer_menus',
          'title'         => esc_html__('Footer Menu Links', 'confin'),
          'view'          => 'clone',
          'clone_id'      => 'confin_footer_menu',
          'clone_title'   => esc_html__('Add New', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),

          ),
          'clone_fields'  => array(

            array(
              'id'        => 'menu_title',
              'type'      => 'text',
              'title'     => esc_html__('Menu Title', 'confin')
            ),
            array(
              'id'        => 'menu_link',
              'type'      => 'text',
              'title'     => esc_html__('Menu Link', 'confin')
            ),
            array(
              'id'        => 'target_tab',
              'type'      => 'switcher',
              'title'     => esc_html__('Open New Tab?', 'confin'),
              'on_text'     => esc_html__('Yes', 'confin'),
              'off_text'     => esc_html__('No', 'confin'),
            ),

          ),

        ),
        // Footer Menus
        array(
          'name'          => 'footer-infos',
          'title'         => esc_html__('footer logo and Text', 'confin'),
          'fields'        => array(
            array(
              'id'        => 'footer_logo',
              'type'      => 'image',
              'title'     => esc_html__('Footer About', 'confin'),
            ),
            array(
              'id'        => 'desc',
              'type'      => 'textarea',
              'title'     => esc_html__('Description', 'confin'),
            ),
            array(
              'id'        => 'phone_number',
              'type'      => 'text',
              'title'     => esc_html__('Phone Number', 'confin'),
            ),

            array(
              'id'        => 'email',
              'type'      => 'text',
              'title'     => esc_html__('Email', 'confin'),
            ),

            array(
              'id'        => 'address',
              'type'      => 'text',
              'title'     => esc_html__('Address', 'confin'),
            ),

            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),

          ),

        ),
      // footer contact info
      array(
        'name'          => 'confin_footer_contact_infos',
        'title'         => esc_html__('Contact info', 'confin'),
        'view'          => 'clone',
        'clone_id'      => 'confin_footer_contact_info',
        'clone_title'   => esc_html__('Add New', 'confin'),
        'fields'        => array(

          array(
            'id'        => 'custom_class',
            'type'      => 'text',
            'title'     => esc_html__('Custom Class', 'confin'),
          ),

        ),
        'clone_fields'  => array(

          array(
            'id'        => 'item',
            'type'      => 'text',
            'title'     => esc_html__('Contact info item', 'confin')
          ),

        ),

      ),
      // footer Address
       array(
          'name'          => 'confin_footer_address_item',
          'title'         => esc_html__('Address', 'confin'),
          'view'          => 'clone',
          'clone_id'      => 'confin_footer_address_items',
          'clone_title'   => esc_html__('Add New', 'confin'),
          'fields'        => array(

            array(
              'id'        => 'custom_class',
              'type'      => 'text',
              'title'     => esc_html__('Custom Class', 'confin'),
            ),

          ),
          'clone_fields'  => array(
            array(
              'id'        => 'item',
              'type'      => 'text',
              'title'     => esc_html__('Address item', 'confin')
            ),
          ),
        ),

      ),
    );

  return $options;

  }
  add_filter( 'cs_shortcode_options', 'confin_shortcodes' );
}