# scripted_gui = {
	
# 	eoanb_offer_peace_deal = {
	
# 		context_type = diplomatic_action
		
# 		window_name = "eoanb_offer_peace_deal"
		
# 		visible = {
# 			always = yes
# 		}
		
# 		dynamic_lists = {
# 			eoanb_state_grid = {
# 				array = ROOT.eoanb_state_list
# 				change_scope = yes
# 				entry_container = "[eoanb_offer_peace_deal_loc]"
# 			}
# 		}
		
# 		effects = {
		
# 			# Tab selection
			
# 			eoanb_tab_take_click = {
# 				ROOT = { clr_country_flag = eoanb_root_gives }
# 				reset_peace_deal_proposal = yes
# 			}
			
# 			eoanb_tab_give_click = {
# 				ROOT = { set_country_flag = eoanb_root_gives }
# 				reset_peace_deal_proposal = yes
# 			}
		
# 			# State marking mode
		
# 			take_click = {
# 				set_variable = { ROOT.eoanb_selected = 1 }
# 			}
		
# 			puppet_click = {
# 				set_variable = { ROOT.eoanb_selected = 2 }
# 			}
			
# 			demilitarize_click = {
# 				set_variable = { ROOT.eoanb_selected = 3 }
# 			}
			
# 			liberate_click = {
# 				set_variable = { ROOT.eoanb_selected = 4 }
# 			}
			
# 			# War reparations
			
# 			war_reparations_click = {
# 				ROOT = { set_country_flag = eoanb_war_reparations }
# 				if = {
# 					limit = { ROOT = { has_country_flag = eoanb_root_gives } }
# 					subtract_from_variable = { ROOT.eoanb_total_cost = ROOT.eoanb_wr_cost }
# 				}
# 				else = {
# 					add_to_variable = { ROOT.eoanb_total_cost = ROOT.eoanb_wr_cost }
# 				}
# 			}
			
# 			war_reparations_set_click = {
# 				ROOT = { clr_country_flag = eoanb_war_reparations }
# 				if = {
# 					limit = { ROOT = { has_country_flag = eoanb_root_gives } }
# 					add_to_variable = { ROOT.eoanb_total_cost = ROOT.eoanb_wr_cost }
# 				}
# 				else = {
# 					subtract_from_variable = { ROOT.eoanb_total_cost = ROOT.eoanb_wr_cost }
# 				}
# 			}
			
# 			# Disarm
			
# 			disarm_click = {
# 				ROOT = { set_country_flag = eoanb_disarm }
# 				if = {
# 					limit = { ROOT = { has_country_flag = eoanb_root_gives } }
# 					subtract_from_variable = { ROOT.eoanb_total_cost = ROOT.eoanb_disarm_cost }
# 				}
# 				else = {
# 					add_to_variable = { ROOT.eoanb_total_cost = ROOT.eoanb_disarm_cost }
# 				}
# 			}
			
# 			disarm_set_click = {
# 				ROOT = { clr_country_flag = eoanb_disarm }
# 				if = {
# 					limit = { ROOT = { has_country_flag = eoanb_root_gives } }
# 					add_to_variable = { ROOT.eoanb_total_cost = ROOT.eoanb_disarm_cost }
# 				}
# 				else = {
# 					subtract_from_variable = { ROOT.eoanb_total_cost = ROOT.eoanb_disarm_cost }
# 				}
# 			}
			
# 			# Marking states
			
# 			eoanb_mark_click = {
# 				add_state_to_list = yes
# 			}
			
# 			eoanb_unmark_click = {
# 				remove_state_from_list = yes
# 			}
			
# 			eoanb_mark_give_click = {
# 				add_state_to_list = yes
# 			}
			
# 			eoanb_unmark_give_click = {
# 				remove_state_from_list = yes
# 			}
# 		}
		
# 		triggers = {
		
# 			# Tab selection
		
# 			eoanb_take_state_grid_visible = {
# 				NOT = { ROOT = { has_country_flag = eoanb_root_gives } }
# 			}
			
# 			eoanb_tab_take_active_visible = {
# 				NOT = { ROOT = { has_country_flag = eoanb_root_gives } }
# 			}
			
# 			eoanb_give_state_grid_visible = {
# 				ROOT = { has_country_flag = eoanb_root_gives }
# 			}
			
# 			eoanb_tab_give_active_visible = {
# 				ROOT = { has_country_flag = eoanb_root_gives }
# 			}
			
# 			eoanb_mark_give_visible = {
# 				ROOT = { has_country_flag = eoanb_root_gives }
# 			}
			
# 			eoanb_unmark_give_visible = {
# 				ROOT = { has_country_flag = eoanb_root_gives }
# 			}
			
# 			# Waitng response disable
			
# 			eoanb_tab_give_click_enabled = {
# 				ROOT = {
# 					NOT = { has_country_flag = eoanb_waiting_response }
# 				}
# 			}
		
# 			eoanb_mark_click_enabled = {
# 				ROOT = {
# 					NOT = { has_country_flag = eoanb_waiting_response }
# 				}
# 			}
			
# 			eoanb_unmark_click_enabled = {
# 				ROOT = {
# 					NOT = { has_country_flag = eoanb_waiting_response }
# 				}
# 			}
			
# 			# State marking mode
		
# 			take_selected_visible = {
# 				check_variable = { ROOT.eoanb_selected = 1 }
# 			}
			
# 			puppet_selected_visible = {
# 				check_variable = { ROOT.eoanb_selected = 2 }
# 			}
			
# 			demilitarize_selected_visible = {
# 				check_variable = { ROOT.eoanb_selected = 3 }
# 			}
			
# 			liberate_selected_visible = {
# 				check_variable = { ROOT.eoanb_selected = 4 }
# 			}
			
# 			war_reparations_set_visible = {
# 				ROOT = { has_country_flag = eoanb_war_reparations }
# 			}
			
# 			# War reparations
			
# 			war_reparations_click_enabled = {
# 				check_variable = { wr_payments < 2 }
# 				ROOT = {
# 					NOT = { has_country_flag = eoanb_waiting_response }
# 				}
# 			}
			
# 			war_reparations_set_click_enabled = {
# 				ROOT = {
# 					NOT = { has_country_flag = eoanb_waiting_response }
# 				}
# 			}
			
# 			# Disarm
			
# 			disarm_set_visible = {
# 				ROOT = { has_country_flag = eoanb_disarm }
# 			}
			
# 			disarm_click_enabled = {
# 				ROOT = {
# 					NOT = { has_country_flag = eoanb_waiting_response }
# 				}
# 			}
			
# 			disarm_set_click_enabled = {
# 				ROOT = {
# 					NOT = { has_country_flag = eoanb_waiting_response }
# 				}
# 			}
			
# 			# Acceptance icon
			
# 			accept_icon_yes_visible = {
# 				eoanb_ai_will_accept = yes
# 			}
			
# 			accept_icon_no_visible = {
# 				NOT = { eoanb_ai_will_accept = yes }
# 			}
# 		}
		
# 		ai_enabled = {
# 			always = no # Handled in a different way
#         	}
# 	}
# }

