<?php
	$plural_name = '';
	if( function_exists( 'dt_booking_cs_get_option' ) ) :
		$plural_name	=	dt_booking_cs_get_option( 'singular-service-text', esc_html__('Service', 'dt-reservation-plugin') );
	endif;

	vc_map( array(
		"name" => $plural_name.esc_html__(' List', 'dt-reservation-plugin'),
		"base" => "dt_sc_service_list",
		"icon" => "dt_sc_service_list",
		"category" => esc_html__( 'Booking Manager', 'dt-reservation-plugin' ),
		"params" => array(

			# Terms
			array(
				'type' => 'autocomplete',
				'heading' => __( 'Terms', 'dt-reservation-plugin' ),
				'param_name' => 'terms',
				'settings' => array(
					'multiple' => true,
					'min_length' => 1,
					'groups' => true,
					'unique_values' => true,
					'display_inline' => true,
					'delay' => 500,
					'auto_focus' => true,
				),
				'param_holder_class' => 'vc_not-for-custom',
				'description' => __( 'Enter service category & pick.', 'dt-reservation-plugin' )
			),

			# Count
			array (
				"type" => "textfield",
				"heading" => esc_html__( "Products Per Page", 'dt-reservation-plugin' ),
				"param_name" => "posts_per_page",
				"value" => 3,
				"save_always" => true
			),
			
			# Order By
			array (
				"type" => "dropdown",
				"heading" => esc_html__( "Order by", 'dt-reservation-plugin' ),
				"param_name" => "orderby",
				'save_always' => true,
				"value" => array (
					esc_html__('ID','dt-reservation-plugin') => 'ID',
					esc_html__('Title','dt-reservation-plugin') => 'title',
					esc_html__('Name','dt-reservation-plugin') => 'name',
					esc_html__('Type','dt-reservation-plugin') => 'type',
					esc_html__('Date','dt-reservation-plugin') => 'date',
					esc_html__('Random','dt-reservation-plugin') => 'rand'
				)
			),

			# Order
			array (
				"type" => "dropdown",
				"heading" => esc_html__( "Sort order", 'dt-reservation-plugin' ),
				"param_name" => "order",
				'save_always' => true,
				"value" => array (
					esc_html__( 'Descending', 'dt-reservation-plugin' ) => 'desc',
					esc_html__( 'Ascending', 'dt-reservation-plugin' ) => 'asc'
				)
			),

			# Class
			array (
				"type" => "textfield",
				"heading" => esc_html__( 'Extra class name', 'dt-reservation-plugin' ),
				"param_name" => "el_class",
				"description" => esc_html__( "If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'dt-reservation-plugin' )
			)
	     )
	) );