guiTypes = {
	#
	# Operation details UI/window definition
	#

	containerWindowType = {
		name = "operation_overview_window" #window definition
		position = { x= -370 y = -256 } #centers UI in viewport
		size = { width = 780 height = 560 }

		orientation = center
		#show_position = { x= 535 y = 78 }
		#show_animation_type = decelerated
		#hide_animation_type = accelerated
		animation_time = 300
		click_to_front = yes
		moveable = yes 

		#hide_sound = menu_close_window
		show_sound = menu_open_window

		background = { 
			name = "Background"
			spriteType ="GFX_tiled_paper_w_frame_bg"
		}

		#
		# Header with close button
		#

		containerWindowType = {
			name = "operation_header"
			position = { x = 3 y = 3 }
			size = { width=780 height=41}

			background = {
				name = "operation_header_bg"
				spriteType = "GFX_tiled_header"
				alwaystransparent = yes
			}

			instantTextboxType = {
				name = "operation_name_text"
				position = { x = 45 y = 0 }
				font = "hoi_36header"
				maxWidth = 640
				maxHeight = 20
			}

			buttonType = {
				name = "btn_close"
				orientation="upper_right"
				position = {x=-41 y=3}
				spriteType = "GFX_closebutton"
				shortcut = "ESCAPE"
				clicksound = click_close
				pdx_tooltip = "CLOSE"
			}
		}
		# End of header

		containerWindowType = {
			name = "container_target_info"
			#orientation = upper_left
			position = { x = 15 y = 43 }
			size = { width=250 height=455 }

			containerWindowType = {
				name = "operation_icon_container"
				position = {x = 0 y = 0}

				iconType = {
					name = "operation_bg"
					spriteType = "GFX_container_target_info_bg"
					position = { x = 0 y = 0}
				}

				iconType = {
					name = "operation_icon"
					spriteType = "GFX_operation_icon"
					position = { x = 10 y = 8}
				}

				iconType = {
					name = "clip_icon"
					position = {x=15 y=-2}
					quadTextureSprite ="GFX_clip"
					alwaystransparent = yes
				}
			}

			containerWindowType = {
				name = "flag_container"
				position = { x = 87 y = 10 }
				size = { width = 45 height = 31 }

				buttonType = {
					name = "btn_target_flag"
					spriteType = "GFX_flag_small2"
					position = { x = 5 y = 2 }
				}

				iconType = {
					name = "flag_frame"
					spriteType = "GFX_small_flag_frame_thin"
					position = { x =2 y = 0 }
					alwaystransparent = yes
				}

				instantTextboxType = {
					name = "flag_name"
					position = { x = 50 y = 0 }
					font = "hoi_18mbs"
					maxWidth = 110
					maxHeight = 20
					#format = right
				}

				# set target button
				buttonType = {
					name = "btn_location"
					position = {x= 8 y=35}
					buttonFont = "hoi_18mbs"
					clicksound = click_close
					quadTextureSprite ="GFX_button_148x34"
				}
			}

			containerWindowType = {
				# [HardCoded] Used to move other containers here in code
				name = "list_anchor_container"
				position = { x = 0 y = 90 }
				size = { width = 67 height = 5 }
			}

			containerWindowType = {
				# [HardCoded] Moved in code
				name = "resources_grid_container"
				position = { x = 0 y = 0 }
				size = { width = 252 height = 306 }
				clipping = no

				gridBoxType = {
					name = "resources_grid"
					size = { width = 252 height = 306 }
					slotsize = { width = 240 height = 41 }
					max_slots_horizontal = 1
					format = "UPPER_LEFT"
				}
			}

			containerWindowType = {
				# [HardCoded] Moved in code
				name = "duration_container"
				position = { x = 0 y = 0 }
				size = { width = 67 height = 35 }
				clipping = no

				background = {
					name = "entry_bg"
					spriteType = "GFX_list_entry_bg"
					alwaystransparent = yes
				}

				containerWindowType = {
					# [HardCoded] Cannot be renamed
					name = "duration_progressbar_container"
					position = { x = 110 y = 3 }

					iconType = {
						name = "progressbar_content"
						spriteType = "GFX_operation_progress_bar"
						position = { x = 0 y = 3 }
					}
					
					iconType = {
						name = "progressbar_frame"
						spriteType = "GFX_operation_progress_bar_frame"
						position = { x = -2 y = 2}
						
					}

					instantTextboxType = {
						name = "operation_progress_text"
						position = { x = 45 y = 5 }
						font = "hoi_16mbs"
						maxWidth = 80
						maxHeight = 20
					}
				}

				instantTextboxType = {
					name = "operation_duration_text"
					position = { x = 35 y = 7 }
					font = "hoi_16mbs"
					maxWidth = 130
					maxHeight = 20
				}
			}

			containerWindowType = {
				# [HardCoded] Moved in code
				name = "outlook_container"
				position = { x = 0 y = 0 }
				size = { width = 67 height = 35 }
				clipping = no

				background = {
					name = "entry_bg"
					spriteType = "GFX_list_entry_bg"
					alwaystransparent = yes
				}

				instantTextboxType = {
					name = "operation_outlook_label"
					position = { x = 35 y = 7 }
					font = "hoi_16mbs"
					maxWidth = 130
					maxHeight = 20
					text = "OPERATION_OUTLOOK_LABEL"
				}

				iconType = {
					name = "progressbar_content"
					spriteType = "GFX_operation_progress_bar"
					position = { x = 110 y = 3 }
				}
				
				iconType = {
					name = "progressbar_frame"
					spriteType = "GFX_operation_progress_bar_frame"
					position = { x = 108 y = 2}
					
				}

				instantTextboxType = {
					name = "operation_outlook_text"
					position = { x = 110 y = 6 }
					font = "hoi_16mbs"
					maxWidth = 130
					maxHeight = 20
					format = center
					text = "TEST"
				}
			}

			containerWindowType = {
				# [HardCoded] Moved in code
				name = "operatives_container"
				size = { width=100%% height=93 }

				gridBoxType = {
					name = "operatives_grid"
					size = { width = 260 height = 306 }
					slotsize = { width = 60 height = 75 }
					max_slots_vertical = 1
					format = "UPPER_LEFT"
					
					background = {
						name = "operatives_view_entry_bg"
						spriteType = "GFX_operatives_view_entry_bg"
						position = {x = 0 y = 0}
						alwaystransparent = yes
					}
				}
			}

			#instantTextboxType = {
			#	name = "operation_description_text"
			#	position = { x = 37 y = 75 }
			#	font = "hoi_16mbs"
			#	maxWidth = 330
			#	maxHeight = 200
			#}
		}

		# grid for the big picture phase pieces

		containerWindowType = {
			name = "phases_container"
				position = { x = 265 y = 43 }
				size = { width = 580 height = 476 }

			containerWindowType = {
				name = "top_Window"
				position = { x=0 y=-30 }
				size = { width = 581 height =121 }
				#moveable = yes
				Orientation = UPPER_LEFT

				background = {
					name = "Background"
					spriteType ="GFX_operations_clipboard_top_bg"
					alwaystransparent = yes
				}
			}

			containerWindowType = {
				name = "midsection"
				position = { x=0 y=91 }	
				size = { width = 580 height = 100 }
				#moveable = yes
				clipping = no
				Orientation = UPPER_LEFT

				background = {
					name = "Background"
					quadTextureSprite ="GFX_operations_clipboard_mid_bg"
					alwaystransparent = yes
				}

				gridBoxType = {
					name = "phase_titles_grid"
					position = { x = 10 y = -101 }
					size = { width = 460 height = 170 }
					slotsize = { width = 160 height = 170 }
					max_slots_vertical = 1
					format = "UPPER_LEFT"
				}
			}

			containerWindowType = {
				name = "bottom_Window"
				position = { x=0 y=200 }
				size = { width = 581 height = 206 }
				#moveable = yes
				clipping = no
				Orientation = UPPER_LEFT

				background = {
					name = "Background"
					spriteType ="GFX_operations_clipboard_bottom_bg"
					alwaystransparent = yes
				}

				gridBoxType = {
					name = "phases_grid"
					position = { x = 0 y = -10 }
					size = { width = 510 height = 306 }
					slotsize = { width = 510 height = 70 }
					max_slots_horizontal = 1
					format = "UPPER_LEFT"
				}

				instantTextboxType = {
					name = "operation_outcome_text"
					position = { x = 20 y = 20 }
					font = "hoi4_typewriter16"
					maxWidth = 465
					maxHeight = 170
					scrollbarType = standardtext_slider
				}
			}

			#gridBoxType = {
			#	name = "phase_titles_grid"
			#	position = { x = 10 y = 10 }
			#	size = { width = 460 height = 170 }
			#	slotsize = { width = 170 height = 170 }
			#	max_slots_vertical = 1
			#	format = "UPPER_LEFT"
			#}
		}


		# these are the phases with descriptions and small icons
		#gridBoxType = {
		#	name = "phases_grid"
		#	position = { x = 260 y = 220 }
		#	size = { width = 510 height = 306 }
		#	slotsize = { width = 510 height = 50 }
		#	max_slots_horizontal = 1
		#	format = "UPPER_LEFT"
		#}

		containerWindowType = {
			name = "container_bottom"
			orientation = lower_left
			size = { width = 752 height = 40}
			position = {x=13 y=-52}

			background = {
				name = "Background"
				spriteType ="GFX_operation_bottom_bg"
				alwaystransparent = yes
			}

			containerWindowType = {
				name = "button_launch_container"
				position = {x=270 y=3 }

				buttonType = {
					name = "btn_start_button"
					position = { x=-15 y=0 }
					clicksound = click_close
					spriteType = "GFX_button_221x34_anim"
					buttonFont = "hoi_16mbs"
				}

				buttonType = {
					name = "btn_collect"
					position = { x=-15 y=0 }
					buttonFont = "hoi_16mbs"
					clicksound = click_close
					quadTextureSprite ="GFX_button_221x34"
					#spriteType = "GFX_operation_collect_anim"
				}

				buttonType = {
					name = "btn_refund"
					position = { x=219 y=3 }
					quadTextureSprite = "GFX_operation_refund_operation"
					clicksound = click_close
				}

				checkBoxType = {
					name = "cb_auto_commence"
					position = { x = -50 y = 5 }
					quadTextureSprite = "GFX_generic_checkbox3"
					clicksound = decisions_ui_button
				}
				
				instantTextboxType = {
					name = "auto_commence_text"
					position = { x = -235 y = 9 }
					font = "hoi_16mbs"
					format = right
					maxWidth = 180
					maxHeight = 300
					text = OPERATION_VIEW_AUTO_COMMENCE
				}
				
				checkBoxType = {
					name = "cb_auto_repeat"
					position = { x = 260 y = 5 }
					quadTextureSprite = "GFX_generic_checkbox3"
					clicksound = decisions_ui_button
				}
				
				instantTextboxType = {
					name = "auto_repeat_text"
					position = { x = 295 y = 9 }
					font = "hoi_16mbs"
					maxWidth = 180
					maxHeight = 300
					text = OPERATION_VIEW_AUTO_REPEAT
					pdx_tooltip = OPERATION_VIEW_AUTO_REPEAT_TIP
				}
			}
		}

		containerWindowType = {
			name = "reward_container"
			position = { x = 267 y = 440 }
			size = { width = 500 height = 80 }

			background = {
				name = "reward_bg"
				spriteType = "GFX_reward_bg" 
				alwaystransparent = yes
			}

			iconType = {
				name = "operation_reward_icon"
				position = { x = 0 y = -12 }
				spriteType = "GFX_reward_icon"
			}

			iconType = { #should toggle once operation is complete and has extra (bonus) outcome
				name = "operation_reward_icon_bonus"
				position = { x = 0 y = -12 }
				spriteType = "GFX_reward_icon_bonus"
				pdx_tooltip = "OPERATION_BONUS_REWARD"
			}

			instantTextboxType = {
				name = "operation_reward_text"
				position = { x = 100 y = 10 }
				font = "hoi_16mbs"
				maxWidth = 390
				maxHeight = 58
				scrollbarType = standardtext_slider
			}
		}

		iconType = {
			name = "operation_complete_icon"
			spriteType ="GFX_operation_complete"
			position = { x = 310 y = 130 }
			scale = 0.6
			frame = 1
		}

		iconType = {
			name = "operation_completed_warning"
			position = { x = 510 y = 180 }
			spriteType = "GFX_alerts_category"
			frame = 3
			alwaystransparent = yes
		}

	}

	#
	# Operatives
	#

	containerWindowType = {
		name = "operation_operative_leader_portrait_window"
		size = { width = 54 height = 74 }
		position = {x = 0 y = 0}

		buttonType = {
			name = "portrait_btn"
			position = { x=3 y=5 }
			spriteType = "GFX_operative_unknown"
			clicksound = click_default
			scale = 0.33
		}

		# Vanilla override exists solely to add this button; the operative UI code requires it but base gui omits it.
		buttonType = {
			name = "portrait_dismiss_btn"
			position = { x=2 y=53 }
			spriteType = "GFX_remove"
			scale = 0.85
		}

		iconType = {
			name = "portrait_anim_icon"
			position = { x=3 y=5 }
			spriteType = "GFX_group_add_operative_anim"
			scale = 0.85
			alwaystransparent = yes
		}

		iconType = {
			name = "leader_captured"
			position = { x=0 y=1 }
			spriteType = "GFX_leader_portrait_captured"
			alwaystransparent = yes
			scale=0.78
		}

		iconType = {
			name = "portrait_frame"
			quadTextureSprite ="GFX_unit_leader_portrait_frame_badge"
			alwaystransparent = yes
		}

		iconType = {
			name = "leader_enroute"
			position = {x=36 y=-2}
			quadTextureSprite ="GFX_leader_en_route"
			alwaystransparent = yes
		}
	}

	#
	# small phase with description
	#

	containerWindowType = {
		name = "operation_phases_view_entry"
		size = { width=500 height=40 }
		clipping = no

		
		iconType = {
			name = "phase_progress_icon"
			position = { x = 39 y = -8}
			spriteType = "GFX_phase_circular_progress_pie_chart"
		}
  

		iconType = {
			name = "phase_entry_icon"
			position = { x = 10 y = -2 }
		}

		instantTextboxType = {
			name = "phase_entry_desc"
			position = { x = 75 y = 0 }
			font = "hoi4_typewriter16"
			maxWidth = 400
			maxHeight = 20
		}
	}

	#
	# Operative
	#
	

	containerWindowType = {
		name = "operation_operative_view_entry"
		size = { width=200 height=200 }
		clipping = no

		positionType = {
			name = "operative_portrait_pos"
			position = { x=15 y= 6 }
		}

		### reveal in code as bg for mission or operation icon overlay
		iconType = {
			name = "portrait_overlay_bg"
			position = { x=50 y=60 }
			spriteType = "GFX_mapicon_operative_mission_background"
			scale= 0.5
		}

		iconType = {
			name = "resume_mission_icon"
			position = { x=20 y=60 }
			spriteType = "GFX_operative_resume_mission_icon_small"
			pdx_tooltip = "OPERATIVE_RESUME_MISSION_AFTER_OPERATION_INDICATOR_TOOLTIP"
			scale= 0.85
		}

		iconType = {
			name = "mission_icon"
			position = { x=52 y=62 }
			spriteType = "GFX_operative_mission_icons_small"
			frame = 1
		}

		iconType = {
			name = "operation_icon"
			position = { x=50 y=60 }
			scale = 0.5
		}

	}
	
	
	#
	# Phase Title
	#

	containerWindowType = {
		name = "operation_phase_titles_view_entry"
		#size = { width=150 height=160 }
		position = { x=-10 y=50 }
		clipping = no

		iconType = {
			name = "phase_title_picture"
			position = { x = 20 y = 0 }
			scale = 0.7 # TODO TEMP
		}

		iconType = {
			name = "pin"
			spriteType = "GFX_phase_pin"
			position = { x = 76 y = -14}
		}

		# TODO supposed to be some postit/tape bg
		#iconType = {
		#	name = "phase_title_bg"
		#	spriteType = "GFX_decision_item_bg"
		#}

		containerWindowType = {
			name = "phase_title_title"
			size = { width=150 height=50 }
			position = { x=20 y=90 }


			instantTextboxType = {
				name = "phase_title_name"
				#position = { x = 15 y = 130 }
				position = { x = 10 y = 10 }
				font = "hoi4_typewriter16"
				maxWidth = 130
				maxHeight = 20
				format = center
			}

			background = {
				name = "phase_title_background"
				spriteType = "GFX_phase_title_bg"
				position = { x = 0 y = 7 }
				alwaystransparent = yes
			}
		}
	}

	#
	# Resources
	#

	containerWindowType = {
		name = "operation_resources_view_entry"
		size = { width=250 height=40 }
		position = {x=0 y=0}

		background = {
			name = "resource_bg"
			quadTextureSprite = "GFX_list_entry_bg"
			alwaystransparent = yes
		}

		iconType = {
			name = "resource_icon_bg"
			spriteType = "GFX_resource_bg"
			position = { x = 15 y = 4 }
		}

		iconType = {
			name = "resource_icon"
			position = { x = -70 y = 0 }
			scale = 0.6
			orientation = center
			centerposition = yes
			# sprite replaced in code
			spriteType = "GFX_industrial_capacity_icon"
		}

		iconType = {
			name = "resource_progress_icon"
			position = { x = 220 y = 10 }
			spriteType = "GFX_decision_item_progress_good"
		}

		containerWindowType = {
			name = "resource_progress_container"
			position = { x = 110 y = 15 }

			iconType = {
				name = "resource_progress"
				position = { x = 3 y = 3 }
				spriteType = "GFX_efficiency_progressbar"
			}

			iconType = {
				name = "resource_progress_frame"
				spriteType = "GFX_efficiency_progressbar_frame"
			}

			instantTextboxType = {
				name = "resource_amount"
				position = { x = 0 y = -14 }
				font = "hoi_16mbs"
				maxWidth = 98
				maxHeight = 20
				format = center
			}
		}
	}
}
