<?php

global $intense_visions_options;

$this->fields = array(
	'map_marker' => array(
		'type' => 'repeater',
		'title' => __( 'Map Markers', 'intense' ),
		'preview_content' => __( '', 'intense' ),
		'fields' => array(
			'source' => array(
				'type' => 'dropdown',
				'title' => __( 'Source', 'intense' ),
				'options' => array(
					'custom' => __( 'Custom', 'intense' ),
					'intense_clients' => __( 'Clients ', 'intense' ),
					'intense_events' => __( 'Events ', 'intense' ),
					'intense_jobs' => __( 'Jobs ', 'intense' ),
					'intense_locations' => __( 'Locations ', 'intense' ),
					'intense_project' => __( 'Projects ', 'intense' ),
					'intense_team' => __( 'Team Members ', 'intense' ),
				),
				'description' => __( 'Use Custom for adding your own markers. Other sources are from the different CPT\'s, use these to display markers for the addresses in these posts.', 'intense' ),
				'default' => 'custom'
			),
			'taxonomy' => array(
				'type' => 'taxonomy',
				'category' => 'category',
				'title' => __( 'Taxonomy', 'intense' ),
				'class' => 'cptsettings',
		        'skinnable' => false
			),
			'categories' => array(
				'type' => 'category',
				'category' => 'category',
				'title' => __( 'Category(s)', 'intense' ),
				'description' => __( 'By default, all categories will be shown.', 'intense' ),
				'class' => 'cptsettings',
				'skinnable' => false
			),
			'include_post_ids' => array(
				'type' => 'text',
				'title' => __( 'Include Post IDs', 'intense' ),
				'description' => __( 'Comma delimited list of post IDs for a set list of posts that you want to show. Leave blank to not limit posts shown.', 'intense' ),
				'class' => 'cptsettings',
				'skinnable' => false
			),
			'address' => array(
				'type' => 'text',
				'title' => __( 'Address', 'intense' ),
				'class' => 'customsettings',
				'skinnable' => false
			),
			'latitude' => array(
				'type' => 'text',
				'title' => __( 'Latitude', 'intense' ),
				'class' => 'customsettings',
				'skinnable' => false
			),
			'longitude' => array(
				'type' => 'text',
				'title' => __( 'Longitude', 'intense' ),
				'class' => 'customsettings',
				'skinnable' => false
			),
			'title' => array(
				'type' => 'text',
				'title' => __( 'Title', 'intense' ),
				'class' => 'customsettings',
				'skinnable' => false
			),
			'description' => array(
				'type' => 'text',
				'title' => __( 'Description', 'intense' ),
				'class' => 'customsettings',
				'skinnable' => false
			),
			'markertype' => array(
				'type' => 'dropdown',
				'title' => __( 'Marker Type', 'intense' ),
				'options' => array(
					'MARKER' => __( 'Marker', 'intense' ),
					'icon' => __( 'Icon', 'intense' ),
					'BUBBLE' => __( 'Bubble', 'intense' ),
				),
				'class' => 'customsettings cptsettings'
			),
			'markertext' => array(
				'type' => 'text',
				'title' => __( 'Text', 'intense' ),
				'class' => 'bubblesettings',
				'skinnable' => false
			),
			'color' => array(
				'type' => 'color_advanced',
				'title' => __( 'Color', 'intense' ),
				'class' => 'markersettings bubblesettings'
			),
			'animation' => array(
				'type' => 'dropdown',
				'title' => __( 'Animation', 'intense' ),
				'options' => array(
					'' => __( 'None', 'intense' ),
					'DROP' => __( 'Drop', 'intense' ),
					'BOUNCE' => __( 'Bounce', 'intense' ),
				),
				'class' => 'markersettings iconsettings bubblesettings'
			),
			'iconsource' => array(
				'type' => 'icon_source',
				'title' => __( 'Icon Source', 'intense' ),
				'default' => 'font-awesome',
				'class' => 'iconsettings',
				'composer_show_value' => true
			),
			'icontype' => array(
				'type' => 'icon',		
				'title' => __( 'Icon', 'intense' ),
				'description' => __( 'Some more complex icons may not work. If you want to change the color, you have to modify the SVG or create a new one in your theme/child theme.', 'intense' ),
				'class' => 'iconsettings',
				'composer_show_value' => true
			),
			// 'iconsize' => array(
			// 	'type' => 'dropdown',
			// 	'title' => __( 'Size', 'intense' ),
			// 	'options' => array(
			// 		'1' => '1',
			// 		'2' => '2',
			// 		'3' => '3',
			// 		'4' => '4',
			// 		'5' => '5'
			// 	),
			// 	'default' => '1',
			// 	'class' => 'iconsettings',
			// ),
			'iconheight' => array(
				'type' => 'text',
				'title' => __( 'Height', 'intense' ),
				'description' => __( 'If no height is set, the default is 32.', 'intense' ),
				'class' => 'iconsettings'
			),
			'iconwidth' => array(
				'type' => 'text',
				'title' => __( 'Width', 'intense' ),
				'description' => __( 'If no width is set, the default is 32.', 'intense' ),
				'class' => 'iconsettings'
			),
			'markerimage' => array(
				'type' => 'image',
				'title' => __( 'Custom Marker', 'intense' ),
				'description' => __( 'enter a WordPress attachment ID or a URL - Suggested size is 32x32, anchor will be bottom center', 'intense' ),
				'class' => 'markersettings',
				'skinnable' => false
			),
			'markeranchor' => array(
				'type' => 'text',
				'title' => __( 'Marker Anchor', 'intense' ),
				'description' => '0,0 is the top left of the image/icon, so the anchor would be 16,32 for a 32x32 image/icon when you want the point at the bottom center - default is 16,32 if a custom marker or icon is added) examples... "16,32", "0,32", "0,16"',
				'class' => 'markersettings iconsettings'
			),
			'markershadow' => array(
				'type' => 'image',
				'title' => __( 'Marker Shadow', 'intense' ),
				'description' => __( 'enter a WordPress attachment ID or a URL - suggested size is 32x32, anchor will be bottom center', 'intense' ),
				'class' => 'markersettings',
				'skinnable' => false
			),
			'markershadowanchor' => array(
				'type' => 'text',
				'title' => __( 'Shadow Anchor', 'intense' ),
				'description' => '0,0 is the top left of the image, so the anchor would be 16,32 for a 32x32 image when you want the point at the bottom center - default is 16,32 if a custom marker is added) examples... "16,32", "0,32", "0,16"',
				'class' => 'markersettings'
			),
		),
		'item_name' => __( 'Marker', 'intense' )
	),
	'general_tab' => array(
		'type' => 'tab',
		'title' => __( 'General', 'intense' ),
		'fields' =>  array(
			'id' => array(
				'type' => 'text',
				'title' => __( 'ID', 'intense' ),
				'description' => __( 'optional - used to set the client-side ID', 'intense' ),
				'skinnable' => false
			),
			'type' => array(
				'type' => 'dropdown',
				'title' => __( 'Type', 'intense' ),
				'options' => array(
					'Roadmap' => __( 'Roadmap', 'intense' ),
					'Satellite' => __( 'Satellite', 'intense' ),
					'Hybrid' => __( 'Hybrid', 'intense' ),
				)
			),
			'width' => array(
				'type' => 'text',
				'title' => __( 'Width', 'intense' ),
				'description' => __( 'example: 100% or 300px', 'intense' ),
				'default' => '100%'
			),
			'height' => array(
				'type' => 'text',
				'title' => __( 'Height', 'intense' ),
				'description' => __( 'example: 100% or 300px', 'intense' ),
				'default' => '300px'
			),
			'zoom' => array(
				'type' => 'text',
				'title' => __( 'Zoom', 'intense' ),
				'description' => __( 'Enter a number from 0 - 19 (0 = world, 19 = street)', 'intense' ),
				'default' => 10
			),
			'fit_bounds' => array(
				'type' => 'checkbox',
				'title' => __( 'Fit Bounds', 'intense' ),
				'description' => __( 'Fit map bounds to show all markers - zoom level will change', 'intense' ),
			),
			'shadow' => array(
				'type' => 'shadow',
				'title' => __( 'Shadow', 'intense' ),
			),
			'address' => array(
				'type' => 'text',
				'title' => __( 'Address', 'intense' ),
				'description' => 'Only add an address or latitude and longitude coordinates if you want a map to display with no markers. This will set the center of the map.',
			),
			'latitude' => array(
				'type' => 'text',
				'title' => __( 'Latitude', 'intense' ),
				'description' => '',
			),
			'longitude' => array(
				'type' => 'text',
				'title' => __( 'Longitude', 'intense' ),
				'description' => '',
			),			
			'class' => array(
				'type' => 'text',
				'title' => __( 'CSS Class', 'intense' ),
			),
		)
	),
	'controls_tab' => array(
		'type' => 'tab',
		'title' => __( 'Controls', 'intense' ),
		'fields' =>  array(
			'scroll_wheel' => array(
				'type' => 'checkbox',
				'title' => __( 'Zoom with Scroll Wheel', 'intense' ),
			),
			'scale_control' => array(
				'type' => 'checkbox',
				'title' => __( 'Show Scale Control', 'intense' ),
			),
			'street_view' => array(
				'type' => 'checkbox',
				'title' => __( 'Show Street View', 'intense' ),
				'default' => 1,
			),
			'overview_map' => array(
				'type' => 'checkbox',
				'title' => __( 'Show Overview Map', 'intense' ),
			),
			'pan_control' => array(
				'type' => 'checkbox',
				'title' => __( 'Show Pan Control', 'intense' ),
			),
			'is_draggable' => array(
				'type' => 'checkbox',
				'title' => __( 'Is Map Draggable', 'intense' ),
			),
			'map_type_control' => array(
				'type' => 'checkbox',
				'title' => __( 'Show Map Type Control', 'intense' ),
				'default' => 1,
			),
			'map_type_style' => array(
				'type' => 'dropdown',
				'title' => __( 'Map Type Control Style', 'intense' ),
				'options' => array(
					'DEFAULT' => __( 'Auto', 'intense' ),
					'DROPDOWN_MENU' => __( 'Dropdown Menu', 'intense' ),
					'HORIZONTAL_BAR' => __( 'Horizontal Bar', 'intense' ),
				)
			),
			'zoom_control' => array(
				'type' => 'checkbox',
				'title' => __( 'Show Zoom Control', 'intense' ),
				'default' => 1,
			),
			'zoom_control_style' => array(
				'type' => 'dropdown',
				'title' => __( 'Zoom Control Style', 'intense' ),
				'options' => array(
					'DEFAULT' => __( 'Auto', 'intense' ),
					'LARGE' => __( 'Large', 'intense' ),
					'SMALL' => __( 'Small', 'intense' ),
				)
			),
		)
	),
	'layers_tab' => array(
		'type' => 'tab',
		'title' => __( 'Layers', 'intense' ),
		'fields' =>  array(
			'traffic_layer' => array(
				'type' => 'checkbox',
				'title' => __( 'Show Traffic Layer', 'intense' ),
			),
			'transit_layer' => array(
				'type' => 'checkbox',
				'title' => __( 'Show Transit Layer', 'intense' ),
			),
			'bicycle_layer' => array(
				'type' => 'checkbox',
				'title' => __( 'Show Bicycle Layer', 'intense' ),
			),
		)
	),
	'colors_tab' => array(
		'type' => 'tab',
		'title' => __( 'Colors', 'intense' ),
		'fields' =>  array(
			'hue' => array(
				'type' => 'color_advanced',
				'title' => __( 'Hue', 'intense' ),
				'description' => 'Indicates the basic color.',
				'default' => 'primary'
			),
			'saturation' => array(
				'type' => 'text',
				'title' => __( 'Saturation', 'intense' ),
				'description' => 'Enter a value between -100 and 100 <br />Indicates the percentage change in intensity of the basic color to apply to the element.',
			),
			'lightness' => array(
				'type' => 'text',
				'title' => __( 'Lightness', 'intense' ),
				'description' => 'Enter a value between -100 and 100 <br />Indicates the percentage change in brightness of the element. Negative values increase darkness (where -100 specifies black) while positive values increase brightness (where +100 specifies white).',
			),
			'gamma' => array(
				'type' => 'text',
				'title' => __( 'Gamma', 'intense' ),
				'description' => 'Enter a value between 0.01 and 10.0, where 1.0 applies no correction <br />Indicates the amount of gamma correction to apply to the element. Gammas modify the lightness of hues in a non-linear fashion, while not impacting white or black values. Gammas are typically used to modify the contrast of multiple elements. For example, you could modify the gamma to increase or decrease the contrast between the edges and interiors of elements. Low gamma values (< 1) increase contrast, while high values (> 1) decrease contrast.',
			),
			'lightness_invert' => array(
				'type' => 'checkbox',
				'title' => __( 'Invert Lightness', 'intense' ),
				'description' => 'Inverts the existing lightness. This is useful, for example, for quickly switching to a darker map with white text.',
			),
		)
	),
);
