<?php

	$vc_icons_data = health_init_vc_icons();

	$args = array( 'hide_empty' => true );
	$categories = get_terms( $args );
	$cats = $cats_woo = $cats_serv = array();
	foreach($categories as $category){
		if( is_object($category) ){
			if( $category->taxonomy == 'portfolio_category' ){
				$cats[$category->name] = $category->slug;
			} elseif( $category->taxonomy == 'product_cat' ) {
				$cats_woo[$category->name] = $category->term_id;
			} elseif( $category->taxonomy == 'services_category' ) {
				$cats_serv[$category->name] = $category->slug;
			}
		}
	}

	$args = array( 'post_type' => 'services');
	$services = get_posts($args);
	$serv = array();
	if(empty($services['errors'])){
		foreach($services as $service){
			$serv[$service->post_title] = $service->ID;
		}
	}
	
	$args = array( 'post_type' => 'wpcf7_contact_form');
	$forms = get_posts($args);
	$cform7 = array();
	if(empty($forms['errors'])){
		foreach($forms as $form){		
			$cform7[$form->post_title] = $form->ID;
		}
	}

	$add_animation = array(
		vc_map_add_css_animation(),
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Animation Settings', 'health' ),
			'param_name' => 'animation_settings',
			'value' => array(
				esc_html__( 'Default', 'health' ) => '',
				esc_html__( 'Custom', 'health' ) => 'custom',
			),
			'description' => esc_html__( 'Use default/custom animation settings.', 'health' ),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( "Duration", 'health' ),
			'param_name' => 'wow_duration',
			'value' => '',
			'description' => esc_html__( 'Change the animation duration in seconds.', 'health' ),
			'dependency' => array(
				'element' => 'animation_settings',
				'not_empty' => true,
			),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( "Delay", 'health' ),
			'param_name' => 'wow_delay',
			'value' => '',
			'description' => esc_html__( 'Delay before the animation starts in seconds.', 'health' ),
			'dependency' => array(
				'element' => 'animation_settings',
				'not_empty' => true,
			),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( "Offset", 'health' ),
			'param_name' => 'wow_offset',
			'value' => '',
			'description' => esc_html__( 'Distance to start the animation (related to the browser bottom) in pixels.', 'health' ),
			'dependency' => array(
				'element' => 'animation_settings',
				'not_empty' => true,
			),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( "Iteration", 'health' ),
			'param_name' => 'wow_iteration',
			'value' => '',
			'description' => esc_html__( 'Number of times the animation is repeated.', 'health' ),
			'dependency' => array(
				'element' => 'animation_settings',
				'not_empty' => true,
			),
		),
	);

	$add_animation_group = array(
		vc_map_add_css_animation(),
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Animation Settings', 'health' ),
			'param_name' => 'animation_settings',
			'value' => array(
				esc_html__( 'Default', 'health' ) => '',
				esc_html__( 'Custom', 'health' ) => 'custom',
			),
			'description' => esc_html__( 'Use default/custom animation settings.', 'health' ),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( "Items in Group", 'health' ),
			'param_name' => 'wow_group',
			'value' => '',
			'description' => esc_html__( 'Items number in animated group.', 'health' ),
			'dependency' => array(
				'element' => 'animation_settings',
				'not_empty' => true,
			),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( "Group Delay Offset", 'health' ),
			'param_name' => 'wow_group_delay',
			'value' => '',
			'description' => esc_html__( 'Offset delay before the next group animation starts in seconds.', 'health' ),
			'dependency' => array(
				'element' => 'animation_settings',
				'not_empty' => true,
			),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( "Duration", 'health' ),
			'param_name' => 'wow_duration',
			'value' => '',
			'description' => esc_html__( 'Change the animation duration in seconds.', 'health' ),
			'dependency' => array(
				'element' => 'animation_settings',
				'not_empty' => true,
			),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( "Delay", 'health' ),
			'param_name' => 'wow_delay',
			'value' => '',
			'description' => esc_html__( 'Delay before the animation starts in seconds.', 'health' ),
			'dependency' => array(
				'element' => 'animation_settings',
				'not_empty' => true,
			),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( "Offset", 'health' ),
			'param_name' => 'wow_offset',
			'value' => '',
			'description' => esc_html__( 'Distance to start the animation (related to the browser bottom) in pixels.', 'health' ),
			'dependency' => array(
				'element' => 'animation_settings',
				'not_empty' => true,
			),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( "Iteration", 'health' ),
			'param_name' => 'wow_iteration',
			'value' => '',
			'description' => esc_html__( 'Number of times the animation is repeated.', 'health' ),
			'dependency' => array(
				'element' => 'animation_settings',
				'not_empty' => true,
			),
		),
	);


	$jarallax = array(
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( "Background Style", 'health' ),
			'param_name' => 'bgstyle',
			'value' => array(
				esc_html__( "Default", 'health' ) => '',
				esc_html__( "Parallax", 'health' ) => 'jarallax',
				esc_html__( "Fixed", 'health' ) => 'attachment',
			),
			'description' => esc_html__( "Image background style", 'health' ),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'attach_image',
			'heading' => esc_html__( "Background Image", 'health' ),
			'param_name' => 'bgimage',
			'value' => '',
			'description' => esc_html__( "Background image ", 'health' ),
			'dependency' => array(
				'element' => 'bgstyle',
				'value' => array('jarallax', 'attachment'),
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),

		array(
			'type' => 'dropdown',
			'heading' => esc_html__( "Stretch Content", 'health' ),
			'param_name' => 'jarstretch',
			'value' => array('No', 'Yes'),
			'description' => esc_html__( 'Select stretching options for content.', 'health' ),
			'dependency' => array(
				'element' => 'bgstyle',
				'value' => 'jarallax',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( "Type", 'health' ),
			'param_name' => 'jartype',
			'value' => array('Default', 'scale', 'opacity', 'scroll-opacity', 'scale-opacity'),
			'description' => '',
			'dependency' => array(
				'element' => 'bgstyle',
				'value' => 'jarallax',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			"type" => "textfield",
			"heading" => esc_html__( "Speed", 'health' ),
			"param_name" => "jarspeed",
			"value" => '',
			"description" => esc_html__( "Provide numbers from -1.0 to 2.0", 'health' ),
			'dependency' => array(
				'element' => 'bgstyle',
				'value' => 'jarallax',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'dropdown',
			'heading' => "Text Color",
			'param_name' => 'ptextcolor',
			'value' => array("Default" , "White" , "Black"),
			'description' => esc_html__( "Text Color", 'health' ),
			'group' => esc_html__( 'Row Options', 'health' ),
		),

		// Gradient
        array(
            'type' => 'param_group',
            'value' => '',
            'heading' => esc_html__( 'Gradient', 'health' ),
            'param_name' => 'gradient_colors',
            // Note params is mapped inside param-group:
            'params' => array(
                array(
                    'type' => 'colorpicker',
                    'value' => '',
                    'heading' => esc_html__( 'Color For Gradient', 'health' ),
                    'param_name' => 'gradient_color',
                )
            ),
		    'group' => esc_html__( 'Gradient', 'health' ),
        ),
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Direction', 'health' ),
			'param_name' => 'gradient_direction',
			'value' => array(
				esc_html__( 'To Right ', 'health' ).html_entity_decode('&rarr;') => 'to right',
				esc_html__( 'To Left ', 'health' ).html_entity_decode('&larr;') => 'to left',
				esc_html__( 'To Bottom ', 'health' ).html_entity_decode('&darr;') => 'to bottom',
				esc_html__( 'To Top ', 'health' ).html_entity_decode('&uarr;') => 'to top',
				esc_html__( 'To Bottom Right ', 'health' ).html_entity_decode('&#8600;') => 'to bottom right',
				esc_html__( 'To Bottom Left ', 'health' ).html_entity_decode('&#8601;') => 'to bottom left',
				esc_html__( 'To Top Right ', 'health' ).html_entity_decode('&#8599;') => 'to top right',
				esc_html__( 'To Top Left ', 'health' ).html_entity_decode('&#8598;') => 'to top left',
				esc_html__( 'Angle ', 'health' ).html_entity_decode('&#10227;') => 'angle',
			),
			'description' => '',
			'group' => esc_html__( 'Gradient', 'health' ),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( 'Angle Direction', 'health' ),
			'param_name' => 'gradient_angle',
			'value' => "90",
			'description' => esc_html__( 'Values -360 - 360', 'health' ),
			'dependency' => array(
				'element' => 'gradient_direction',
				'value' => 'angle',
			),
			'group' => esc_html__( 'Gradien', 'health' ),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( 'Opacity', 'health' ),
			'param_name' => 'gradient_opacity',
			'value' => "1",
			'description' => esc_html__( 'Values 0.01 - 0.99', 'health' ),
			'group' => esc_html__( 'Gradient', 'health' ),
		),

		// Decors
		// Top Decor
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Show Section Top Decor', 'health' ),
			'param_name' => 'pdecor',
			'value' => array(
				esc_html__( "No", 'health' ) => '0',
				esc_html__( "Yes", 'health' ) => '1',
			),
			'description' => esc_html__( "Show decor at the top of the section.", 'health' ),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( 'Height', 'health' ),
			'param_name' => 'decor_height',
			'value' => '90',
			'description' => esc_html__( 'Values 0 - 300', 'health' ),
			'dependency' => array(
				'element' => 'pdecor',
				'value' => '1',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Show Border', 'health' ),
			'param_name' => 'decor_border',
			'value' => array(
				esc_html__( 'No', 'health' ) => '0',
				esc_html__( 'Yes', 'health' ) => '1',
			),
			'description' => '',
			'dependency' => array(
				'element' => 'pdecor',
				'value' => '1',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Show Point Circle', 'health' ),
			'param_name' => 'decor_circles',
			'value' => array(
				esc_html__( 'No', 'health' ) => '0',
				esc_html__( 'Yes', 'health' ) => '1',
			),
			'description' => '',
			'dependency' => array(
				'element' => 'pdecor',
				'value' => '1',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( 'Top Decor Opacity', 'health' ),
			'param_name' => 'decor_opacity',
			'value' => '',
			'description' => esc_html__( 'Values 0.01 - 0.99', 'health' ),
			'dependency' => array(
				'element' => 'pdecor',
				'value' => '1',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( 'Top Decor Points', 'health' ),
			'param_name' => 'decor_points_top',
			'value' => '',
			'description' => esc_html__( 'Example: 0,10 5,8 23,75 41,35 59,60 77,10 95,55 100,30', 'health' ),
			'dependency' => array(
				'element' => 'pdecor',
				'value' => '1',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),

		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Overlay', 'health' ),
			'param_name' => 'poverlay',
			'value' => array(
				esc_html__( "Use", 'health' ) => 'pix-row-overlay',
				esc_html__( "None", 'health' ) => 'no-overlay',
			),
			'description' => '',
			'group' => esc_html__( 'Row Options', 'health' ),
		),

	);

	$attributes2 = array(
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Disable Gap', 'health' ),
			'param_name' => 'pix_gap',
			'value' => array(
				esc_html__( 'No', 'health' ) => '',
				esc_html__( 'Yes', 'health' ) => 'disable',
			),
			'description' => esc_html__( 'No padding between columns.', 'health' ),
		),
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Use Section Anchor', 'health' ),
			'param_name' => 'panchor',
			'value' => array("No" , "Yes"),
			'description' => esc_html__( 'Need Row ID. ', 'health' )
		),
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Padding', 'health' ),
			'param_name' => 'ppadding',
			'value' => array(
				esc_html__( "No Padding", 'health' ) => 'pix-vc_row-no-padding',
				esc_html__( "Both", 'health' ) => 'vc_row-padding-both',
				esc_html__( "Top", 'health' ) => 'vc_row-padding-top',
				esc_html__( "Bottom", 'health' ) => 'vc_row-padding-bottom',
			),
			'description' => esc_html__( 'Top, bottom, both', 'health' ),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
	);

	$attributes3 = array(
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Vertical Row Title', 'health' ),
			'param_name' => 'row_title',
			'value' => array(
				esc_html__( 'No', 'health' ) => '0',
				esc_html__( 'Yes', 'health' ) => '1',
			),
			'description' => esc_html__( "Show vertical title of the section.", 'health' ),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Title Position', 'health' ),
			'param_name' => 'title_pos',
			'value' => array(
				esc_html__( 'Left', 'health' ) => 'left',
				esc_html__( 'Right', 'health' ) => 'right',
			),
			'dependency' => array(
				'element' => 'row_title',
				'value' => '1',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( 'Title', 'health' ),
			'param_name' => 'title',
			'description' => esc_html__( 'Title', 'health' ),
			'dependency' => array(
				'element' => 'row_title',
				'value' => '1',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( 'Subtitle', 'health' ),
			'param_name' => 'subtitle',
			'description' => esc_html__( 'Subtitle', 'health' ),
			'dependency' => array(
				'element' => 'row_title',
				'value' => '1',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'textfield',
			'heading' => esc_html__( 'Number', 'health' ),
			'param_name' => 'num',
			'description' => esc_html__( 'Number', 'health' ),
			'dependency' => array(
				'element' => 'row_title',
				'value' => '1',
			),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
		array(
			'type' => 'animation_style',
			'heading' => esc_html__( 'Animate Title', 'health' ),
			'param_name' => 'title_animate',
			'value' => '',
			'dependency' => array(
				'element' => 'row_title',
				'value' => '1',
			),
			'description' => esc_html__( 'Use title animation.', 'health' ),
			'group' => esc_html__( 'Row Options', 'health' ),
		),
	);
	$attributes = array_merge($attributes2, health_get_vc_icons($vc_icons_data), $jarallax, $attributes3);
	vc_add_params( 'vc_row', $attributes );
	vc_add_params( 'vc_row_inner', array(vc_map_add_css_animation()) );
	vc_add_params( 'vc_row_inner', $jarallax );
	vc_add_params( 'vc_column', $jarallax );


	///// VC_MAP /////
	if ( class_exists( 'WPBakeryShortCodesContainer' ) ) {
		class WPBakeryShortCode_Box_Container extends WPBakeryShortCodesContainer {
			protected $controls_css_settings = 'out-tc vc_controls-content-widget';
			protected $controls_list = array( 'add', 'edit', 'clone', 'delete' );

			public function __construct( $settings ) {
				parent::__construct( $settings );
			}

			public function contentAdmin( $atts, $content = null ) {

				$elem = $this->getElementHolder( '' );
				$elem = str_ireplace( 'wpb_content_element', '', $elem );
				$elem = str_ireplace( '%wpb_element_content%', '<div class="wpb_column_container vc_container_for_children vc_clearfix vc_empty-container ui-sortable ui-droppable"></div>', $elem );
				$output = $elem;

				return $output;
			}
		}
	}


	
	health_vc_map(
		array(
			"name" => esc_html__( "Portfolio", 'health' ),
			"base" => "common_portfolio",
			"class" => "pix-templ-icon",
			'category' => esc_html__( 'Theme Widgets', 'health' ),
			"params" => array(
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Display Type', 'health' ),
					'param_name' => 'display',
					'value' => array(
						esc_html__( 'Isotop', 'health' ) => 'isotop',
						esc_html__( 'Puzzle', 'health' ) => 'puzzle',
						esc_html__( 'Grid', 'health' ) => 'grid',
					),
					'description' => '',
				),
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Show filter', 'health' ),
					'param_name' => 'filter',
					'value' => array(
						esc_html__( "Yes", 'health' ) => 'yes',
						esc_html__( "No", 'health' ) => 'no',
					),
					'description' => '',
				),
				array(
					'type' => 'checkbox',
					'heading' => esc_html__( 'Categories', 'health' ),
					'param_name' => 'cat_port',
					'value' => $cats,
					'description' => esc_html__( 'Select categories to show their portfolio.', 'health' ),
				),
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Columns Number', 'health' ),
					'param_name' => 'perrow',
					'value' => array(
						esc_html__( '2 Columns', 'health' ) => '2',
						esc_html__( '3 Columns', 'health' ) => '3',
						esc_html__( '4 Columns', 'health' ) => '4',
					),
					'dependency' => array(
						'element' => 'display',
						'value' => array('isotop'),
					),
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Items Count', 'health' ),
					'param_name' => 'count',
					'description' => esc_html__( 'Select number portfolio works to show per page. Leave empty to show all warks.', 'health' ),
				),
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Item type', 'health' ),
					'param_name' => 'type',
					'value' => array(
						esc_html__( 'With space', 'health' ) => 'type_without_icons',
						esc_html__( 'With space and over buttons', 'health' ) => 'type_with_icons',
						esc_html__( 'Without space', 'health' ) => 'type_without_space',
					),
					'dependency' => array(
						'element' => 'display',
						'value' => array('isotop'),
					),
				),
                array(
                    'type' => 'textfield',
                    'heading' => esc_html__( 'Project Link text', 'health' ),
                    'param_name' => 'btntext_pl',
                    'value' => '',
                    'dependency' => array(
                        'element' => 'type',
                        'value' => array('type_with_icons'),
                    ),
                ),
                array(
                    'type' => 'textfield',
                    'heading' => esc_html__( 'Client Link text', 'health' ),
                    'param_name' => 'btntext_cl',
                    'value' => '',
                    'dependency' => array(
                        'element' => 'type',
                        'value' => array('type_with_icons'),
                    ),
                ),
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Show Load more button', 'health' ),
					'param_name' => 'btnshow',
					'value' => array(
						esc_html__( 'No', 'health' ) => 'no',
						esc_html__( 'Yes', 'health' ) => 'yes',
					),
					'dependency' => array(
						'element' => 'display',
						'value' => array('isotop'),
					),
					'description' => esc_html__( 'Show or not button Load more', 'health' ),
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Button text', 'health' ),
					'param_name' => 'btntext',
					'value' => esc_html__( 'Load more', 'health' ),
					'dependency' => array(
						'element' => 'btnshow',
						'value' => array('yes'),
					),
				),
				array(
					'type' => 'textarea_html',
					'holder' => 'div',
					'heading' => esc_html__( 'Description', 'health' ),
					'param_name' => 'content',
					'value' => '',
				),
				array(
					'type' => 'tab_id',
					'heading' => esc_html__( 'ID', 'health' ),
					'param_name' => "tab_id",
				),
			)
		),
		$add_animation_group
	);
	if ( class_exists( 'WPBakeryShortCode' ) ) {
		class WPBakeryShortCode_Common_Portfolio extends WPBakeryShortCode {

		}
	}

	////////////////////////


	
	/// common_services_cat
	vc_map(
		array(
			"name" => esc_html__( "Departments", 'health' ),
			"base" => "common_services_cat",
			"class" => "pix-health-icon",
			"category" => esc_html__( "Theme Widgets", 'health'),
			"params" => array(
				array(
					'type' => 'checkbox',
					'heading' => esc_html__( 'Departments', 'health' ),
					'param_name' => 'cats',
					'value' => $cats_serv,
					'description' => esc_html__( 'Select departments to show', 'health' ),
				),
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Appearance', 'health' ),
					'param_name' => 'appearance',
					'value' => array(
						esc_html__( 'Departament 1 (With Icon Only)', 'health' ) => 'department-1',
						esc_html__( 'Departament 2 (With Hover Image)', 'health' ) => 'department-2',
						esc_html__( 'Departament 3 (With Background Image)', 'health' ) => 'department-3',
					),
					'description' => '',
				),
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Items Per Row', 'health' ),
					'param_name' => 'per_row',
					'value' => array(
						"1" => 1,
						"2" => 2,
						"3" => 3,
						"4" => 4,
						"5" => 5,
						"6" => 6,
					),
					'description' => '',
				),
				array(
					'type' => 'textfield',
					'holder' => 'div',
					'heading' => esc_html__( 'Limit Text Description', 'health' ),
					'param_name' => 'limit_text',
					'description' => esc_html__( 'Default 20 characters.', 'health' ),
				),
				array(
					'type' => 'textfield',
					'holder' => 'div',
					'heading' => esc_html__( 'Button Text', 'health' ),
					'param_name' => 'btn_text',
					'description' => esc_html__( 'Leave empty to hide.', 'health' ),
					'dependency' => array(
						'element' => 'appearance',
						'value' => array('department-1', 'department-2'),
					),
				),
				vc_map_add_css_animation(),
			)
		)
	);
	if ( class_exists( 'WPBakeryShortCode' ) ) {
		class WPBakeryShortCode_Common_Services_Cat extends WPBakeryShortCode {

		}
	}
	//////////////////////////////////////////////////////////////////////


	/// common_services
	vc_map(
		array(
			"name" => esc_html__( "Services", 'health' ),
			"base" => "common_services",
			"class" => "pix-health-icon",
			"category" => esc_html__( "Theme Widgets", 'health'),
			"params" => array(
                array(
                    'type' => 'dropdown',
                    'heading' => esc_html__( 'Style', 'health' ),
                    'param_name' => 'style',
                    'value' => array(
                        esc_html__( "Classic", 'health' ) => 'classic',
                        esc_html__( "Boxed", 'health' ) => 'boxed'
                    ),
                    'description' => esc_html__('Select services display style', 'health' ),
                ),

				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Use Template With', 'health' ),
					'param_name' => 'template',
					'value' => array(
						esc_html__( "With Department Menu", 'health' ) => 'menu',
						esc_html__( "Isotop Filter", 'health' ) => 'isotop',
						esc_html__( "Without Menu And Filter", 'health' ) => 'landing',
					),
					'description' => esc_html__('In "With Department Menu" template you can\'t select departments.', 'health' ),
				),
				array(
					'type' => 'checkbox',
					'heading' => esc_html__( 'Departmens', 'health' ),
					'param_name' => 'cat_serv',
					'value' => $cats_serv,
					'description' => esc_html__( 'Select departmens to show their services.', 'health' ),
					'dependency' => array(
						'element' => 'template',
						'value' => array('isotop', 'landing'),
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Items Per Row', 'health' ),
					'param_name' => 'per_row',
					'value' => array(
						esc_html__( "4 ", 'health' ) => 'col-md-3 col-sm-6',
						esc_html__( "3 ", 'health' ) => 'col-md-4',
					),
					'dependency' => array(
						'element' => 'template',
						'value' => array('landing'),
					),
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Items Count', 'health' ),
					'param_name' => 'count',
					'description' => esc_html__( 'Select number services to show.', 'health' ),
					'dependency' => array(
						'element' => 'template',
						'value' => array('menu', 'landing'),
					),
				),
                array(
                    'type' => 'dropdown',
                    'heading' => esc_html__( 'Sticky Department Menu', 'health' ),
                    'param_name' => 'sticky',
                    'value' => array(
                        esc_html__( 'Yes', 'health' ) => 'sticky-bar',
                        esc_html__( 'No', 'health' ) => 'no-sticky-bar',
                    ),
                    'dependency' => array(
                        'element' => 'template',
                        'value' => array('menu'),
                    ),
                ),

				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Button text', 'health' ),
					'param_name' => 'buttext',
					'value' => esc_html__( 'READ MORE', 'health' ),
					'description' => '',
				),
                array(
                    'type' => 'dropdown',
                    'heading' => esc_html__( 'Text Position', 'health' ),
                    'param_name' => 'textposition',
                    'value' => array(
                        esc_html__( "Center", 'health' ) => 'center',
                        esc_html__( "Left", 'health' ) => 'left',
                        esc_html__( "Right", 'health' ) => 'right'
                    ),
                    'description' => esc_html__('Text Position', 'health' ),
                ),
                array(
                    'type' => 'dropdown',
                    'heading' => esc_html__( 'Text Transform', 'health' ),
                    'param_name' => 'texttransform',
                    'value' => array(
                        esc_html__( "Normal", 'health' ) => 'normal',
                        esc_html__( "Uppercase", 'health' ) => 'uppercase',
                        esc_html__( "Lowercase", 'health' ) => 'lowercase'

                    ),
                    'description' => esc_html__('Text Transform', 'health' ),
                ),
                		array(
			'type' => 'widgetised_sidebars',
			'heading' => __( 'Sidebar', 'js_composer' ),
			'param_name' => 'sidebar_id',
			'description' => __( 'Select widget area to display.', 'js_composer' ),
		),
			)
		)
	);
	if ( class_exists( 'WPBakeryShortCode' ) ) {
		class WPBakeryShortCode_Common_Services extends WPBakeryShortCode {

		}
	}
	//////////////////////////////////////////////////////////////////////


	// Shopping Cart
	vc_map( array(
		'name' => esc_html__( 'Single Shopping Cart', 'health' ),
		'base' => 'common_shopping_cart',
		'class' => 'pix-health-icon',
		'category' => esc_html__( 'Theme Widgets' , 'health' ),
		'params' => array(
			array(
				'type' => 'textfield',
				'holder' => 'div',
				'heading' => esc_html__( 'Product ID', 'health' ),
				'param_name' => 'product_id',
				'value' => '',
				'description' => wp_kses_post(sprintf(__( 'See product ID <a target="_blank" href="%s">here</a>.', 'health' ), esc_url(admin_url().'edit.php?post_type=product'))),
			)
		)
	) );
	if ( class_exists( 'WPBakeryShortCode' ) ) {
		class WPBakeryShortCode_Common_Shopping_cart extends WPBakeryShortCode {
		}
	}
	

	/// common_section_pricetable
	//////// Price Table ////////
	vc_map( array(
		'name' => esc_html__( 'Price Table', 'health' ),
		'base' => 'common_pricetable',
		'class' => 'wpb_vc_tta_tabs pix-health-icon',
		'as_parent' => array('only' => 'common_pricecol'),
		'content_element' => true,
		'show_settings_on_create' => true,
		'category' => esc_html__( 'Theme Widgets', 'health'),
		'params' => array(
			array(
				'type' => 'dropdown',
				'heading' => esc_html__( 'Table Type', 'health' ),
				'param_name' => 'typetable',
				'value' => array(
					esc_html__( "Both", 'health' ) => '',
					esc_html__( "Monthly only", 'health' ) => 'monthly',
					esc_html__( "Yearly only", 'health' ) => 'yearly',
				),
				'description' => '',
			),
			array(
				'type' => 'textfield',
				'heading' => esc_html__( 'Monthly', 'health' ),
				'param_name' => 'monthtext',
				'value' => 'Monthly',
				'description' => esc_html__( 'Change text for button', 'health' ),
				'dependency' => array(
					'element' => 'typetable',
					'value' => array('', 'monthly'),
				),
			),
			array(
				'type' => 'textfield',
				'heading' => esc_html__( 'Yearly', 'health' ),
				'param_name' => 'yeartext',
				'value' => 'Yearly',
				'description' => esc_html__( 'Change text for button', 'health' ),
				'dependency' => array(
					'element' => 'typetable',
					'value' => array('', 'yearly'),
				),
			),
			array(
				'type' => 'textfield',
				'heading' => esc_html__( 'Monthly Short', 'health' ),
				'param_name' => 'monthshort',
				'value' => 'month',
				'description' => esc_html__( 'Change price duration', 'health' ),
				'dependency' => array(
					'element' => 'typetable',
					'value' => array('', 'monthly'),
				),
			),
			array(
				'type' => 'textfield',
				'heading' => esc_html__( 'Yearly Short', 'health' ),
				'param_name' => 'yearshort',
				'value' => 'year',
				'description' => esc_html__( 'Change price duration', 'health' ),
				'dependency' => array(
					'element' => 'typetable',
					'value' => array('', 'yearly'),
				),
			),
			array(
				'type' => 'textfield',
				'heading' => esc_html__( 'Currency', 'health' ),
				'param_name' => 'currency',
				'value' => '$',
				'description' => esc_html__( 'Change currency', 'health' )
			),
		),
		'admin_enqueue_js' => get_template_directory_uri().'/js/custom-vc-admin.js',
		'js_view' => 'VcPixContainerView',

	) );

	vc_map( array(
		'name' => esc_html__( 'Price Column', 'health' ),
		'base' => 'common_pricecol',
		'class' => 'pix-theme-icon',
		'as_child' => array('only' => 'common_pricetable'),
		'content_element' => true,
		'params' => array(
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Title', 'health' ),
					'param_name' => 'title',
					'description' => esc_html__( 'Column title.', 'health' )
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Subtitle', 'health' ),
					'param_name' => 'subtitle',
					'description' => esc_html__( 'Subtitle text.', 'health' )
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Month Price', 'health' ),
					'param_name' => 'monthprice',
					'description' => esc_html__( 'Price for the month.', 'health' ),

				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Year Price', 'health' ),
					'param_name' => 'yearprice',
					'description' => esc_html__( 'Price for the year.', 'health' ),
				),
				array(
					"type" => "checkbox",
					"class" => "",
					"heading" => esc_html__( "Is Popular", 'health' ),
					"param_name" => "ispopular",
					"description" => esc_html__( "Marked if checked.", 'health' )
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Button Text', 'health' ),
					'param_name' => 'btntext',
					'description' => esc_html__( 'Button text.', 'health' )
				),
				array(
					'type' => 'vc_link',
					'heading' => esc_html__( 'Link', 'health' ),
					'param_name' => 'link',
					'description' => esc_html__( 'Item link.', 'health' )
				),
				array(
					"type" => "textarea_html",
					"holder" => "div",
					"class" => "",
					"heading" => esc_html__( "Content", 'health' ),
					"param_name" => "content",
					"value" => wp_kses_post(__( "<p>I am test text block. Click edit button to change this text.</p>", 'health' )),
					"description" => esc_html__( "Enter information.", 'health' )
				),
		),
	) );
	if ( class_exists( 'WPBakeryShortCode_Box_Container' ) ) {
		class WPBakeryShortCode_Common_Pricetable extends WPBakeryShortCode_Box_Container {
		}
	}
	if ( class_exists( 'WPBakeryShortCode' ) ) {
		class WPBakeryShortCode_Common_Pricecol extends WPBakeryShortCode {
		}
	}
	////////////////////////


	/// common_mailchimp
	vc_map(
		array(
			'name' => esc_html__( 'Mailchimp Box', 'health' ),
			'base' => 'common_mailchimp',
			'class' => 'pix-health-icon',
			'category' => esc_html__( 'Theme Widgets', 'health'),
			'show_settings_on_create' => false,
			'content_element' => true,
			'params' => array(),
		)
	);
	if ( class_exists( 'WPBakeryShortCode' ) ) {
		class WPBakeryShortCode_Common_Mailchimp extends WPBakeryShortCode {

		}
	}


	/// common_twitter
	vc_map(
		array(
			"name" => esc_html__( 'Twitter Box', 'health' ),
			"base" => 'common_twitter',
			 "class" => 'pix-health-icon',
			"category" => esc_html__( 'Theme Widgets', 'health'),
			'show_settings_on_create' => true,
			'params' => array(
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Title', 'health' ),
					'param_name' => 'title',
					'value' => esc_html__( 'Latest from twitter', 'health' )
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Username', 'health' ),
					'param_name' => 'username',
					'description' => ''
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Consumer Key', 'health' ),
					'param_name' => 'consumer_key',
					'description' => ''
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Consumer Secret', 'health' ),
					'param_name' => 'consumer_secret',
					'description' => ''
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Access Token', 'health' ),
					'param_name' => 'access_token',
					'description' => ''
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Access Token Secret', 'health' ),
					'param_name' => 'access_token_secret',
					'description' => ''
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Number of Tweets to show', 'health' ),
					'param_name' => 'num_of_tweets',
					'value' => '5',
					'description' => ''
				),
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Carousel', 'health' ),
					'param_name' => 'carousel',
					'value' => array(
						esc_html__('Enable', 'health') => 1,
						esc_html__('Disable', 'health') => 0,
					),
					'description' => esc_html__( 'On/off carousel', 'health' )
				),
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Auto Play', 'health' ),
					'param_name' => 'autoplay',
					'value' => '4000',
					'description' => esc_html__( 'Enter autoplay speed in milliseconds. 0 is turn off autoplay.', 'health' ),
				),
			)
		)
	);
	if ( class_exists( 'WPBakeryShortCode' ) ) {
		class WPBakeryShortCode_Common_Twitter extends WPBakeryShortCode {
			public function hyperlinks($text) {
				$text = preg_replace('/\b([a-zA-Z]+:\/\/[\w_.\-]+\.[a-zA-Z]{2,6}[\/\w\-~.?=&%#+$*!]*)\b/i',"<a target=\"_blank\" href=\"$1\" class=\"twitter-link\">$1</a>", $text);
				$text = preg_replace('/\b(?<!:\/\/)(www\.[\w_.\-]+\.[a-zA-Z]{2,6}[\/\w\-~.?=&%#+$*!]*)\b/i',"<a target=\"_blank\" href=\"http://$1\" class=\"twitter-link\">$1</a>", $text);
				// match name@address
				$text = preg_replace("/\b([a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]*\@[a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]{2,6})\b/i","<a target=\"_blank\" href=\"mailto://$1\" class=\"twitter-link\">$1</a>", $text);
					//mach #trendingtopics. Props to Michael Voigt
				$text = preg_replace('/([\.|\,|\:|\?|\?|\>|\{|\(]?)#{1}(\w*)([\.|\,|\:|\!|\?|\>|\}|\)]?)\s/i', "$1<a target=\"_blank\" href=\"http://twitter.com/#search?q=$2\" class=\"twitter-link\">#$2</a>$3 ", $text);
				return $text;
			}
			/**
			 * Find twitter usernames and link to them
			 */
			public function twitter_users($text) {
				   $text = preg_replace('/([\.|\,|\:|\?|\?|\>|\{|\(]?)@{1}(\w*)([\.|\,|\:|\!|\?|\>|\}|\)]?)\s/i', "$1<a href=\"http://twitter.com/$2\" class=\"twitter-user\">@$2</a>$3 ", $text);
				   return $text;
			}
		}
	}
	
	/// common_icon_box
	health_vc_map(
		array(
			"name" => esc_html__( "Around Icon Box", 'health' ),
			"base" => "common_icon_box",
			"class" => "pix-theme-icon-common pix-theme-icon_info",
			"category" => esc_html__( 'Theme Widgets', 'health'),
			"params" => array(
				array(
					"type" => "textfield",
					"holder" => "div",
					"heading" => esc_html__( "Title", 'health' ),
					"param_name" => "title",
					"value" => esc_html__( "I am title", 'health' ),
					"description" => esc_html__( "Add Title ", 'health' )
				),
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Icon Position', 'health' ),
					'param_name' => 'position',
					'value' => array(
							esc_html__( 'Top', 'health' ) => '',
							esc_html__( 'Left', 'health' ) => 'divider-left-top',
							esc_html__( 'Bottom', 'health' ) => 'divider-left-bot',
							esc_html__( 'Right', 'health' ) => 'divider-right-top',
					),
					'description' => '',
				),
				array(
					'type' => 'checkbox',
					'heading' => esc_html__( 'Spin Icon', 'health' ),
					'param_name' => 'spin',
					'value' => '',
					'description' => '',
				),
				array(
					'type' => 'checkbox',
					'heading' => esc_html__( 'Dotted Decor After Icon', 'health' ),
					'param_name' => 'show_decor',
					'value' => 'true',
					'description' => '',
				),
				array(
					'type' => 'vc_link',
					'holder' => 'div',
					'heading' => esc_html__( 'Link', 'health' ),
					'param_name' => 'link',
					'value' => '',
					'description' => esc_html__( 'Icon link', 'health' )
				),
				array(
					'type' => 'colorpicker',
					'heading' => esc_html__( 'Select Icon Color', 'health' ),
					'param_name' => 'color',
					'value' => '',
					'description' => '',
				),
				array(
					"type" => "textarea_html",
					"holder" => "div",
					"heading" => esc_html__( "Content", 'health' ),
					"param_name" => "content",
					"value" => '',
					"description" => esc_html__( "Enter information.", 'health' )
				),
			)
		),
		$add_animation,
		health_get_vc_icons($vc_icons_data),
		2 // icon field order
	);
	if ( class_exists( 'WPBakeryShortCode' ) ) {
		class WPBakeryShortCode_Common_Icon_Box extends WPBakeryShortCode {

		}
	}


?>