scripted_gui = {

	sbi_harms_revolt_decision_ui = {
		context_type = decision_category
		window_name = "sbi_harms_revolt_decision_ui_window"

		properties = {

			Harms_Intel_Aggression_Progressbar = {
				frame = Harms_Intel_Aggression_Progress
			}
			
			Harms_Intel_Amount_Progressbar = {
				frame = Harms_Intel_Amount_Progress
			}
			
			Harms_Workers_Aggression_Progressbar = {
				frame = Harms_Workers_Aggression_Progress
			}
			
			Harms_Workers_Amount_Progressbar = {
				frame = Harms_Workers_Amount_Progress
			}
			
			Harms_Peasants_Aggression_Progressbar = {
				frame = Harms_Peasants_Aggression_Progress
			}
			
			Harms_Peasants_Amount_Progressbar = {
				frame = Harms_Peasants_Amount_Progress
			}
			
			Harms_Church_Aggression_Progressbar = {
				frame = Harms_Church_Aggression_Progress
			}
			
			Harms_Church_Amount_Progressbar = {
				frame = Harms_Church_Amount_Progress
			}
			
			Harms_Radicals_Aggression_Progressbar = {
				frame = Harms_Radicals_Aggression_Progress
			}
			
			Harms_Radicals_Amount_Progressbar = {
				frame = Harms_Radicals_Amount_Progress
			}

		}
		
		triggers = {
			Harms_Intel_GEDRUCKT_Piechart_visible = {
				has_country_flag = Harms_Intels_GEDRUCKT_flag
			}
			Harms_Workers_GEDRUCKT_Piechart_visible = {
				has_country_flag = Harms_Workers_GEDRUCKT_flag
			}
			Harms_Peasants_GEDRUCKT_Piechart_visible = {
				has_country_flag = Harms_Peasants_GEDRUCKT_flag
			}
			Harms_Church_GEDRUCKT_Piechart_visible = {
				has_country_flag = Harms_Church_GEDRUCKT_flag
			}
			Harms_Radicals_GEDRUCKT_Piechart_visible = {
				has_country_flag = Harms_Radicals_GEDRUCKT_flag
			}
		}
		
		effects = {
			Harms_Intel_Piechart_click = {
				if = {
					limit = { NOT = { has_country_flag = Harms_Intels_GEDRUCKT_flag } }
				}
				set_country_flag = Harms_Piechart_current_Intels
				clr_country_flag = Harms_Piechart_current_Radicals
				clr_country_flag = Harms_Piechart_current_Church
				clr_country_flag = Harms_Piechart_current_Peasants
				clr_country_flag = Harms_Piechart_current_Workers
			}
			
			Harms_Radicals_Piechart_click = {
				if = {
					limit = { NOT = { has_country_flag = Harms_Radicals_GEDRUCKT_flag } }
				}
				clr_country_flag = Harms_Piechart_current_Intels
				set_country_flag = Harms_Piechart_current_Radicals
				clr_country_flag = Harms_Piechart_current_Church
				clr_country_flag = Harms_Piechart_current_Peasants
				clr_country_flag = Harms_Piechart_current_Workers
			}
			
			Harms_Church_Piechart_click = {
				if = {
					limit = { NOT = { has_country_flag = Harms_Church_GEDRUCKT_flag } }
				}
				clr_country_flag = Harms_Piechart_current_Intels
				clr_country_flag = Harms_Piechart_current_Radicals
				set_country_flag = Harms_Piechart_current_Church
				clr_country_flag = Harms_Piechart_current_Peasants
				clr_country_flag = Harms_Piechart_current_Workers
			}
			
			Harms_Peasants_Piechart_click = {
				if = {
					limit = { NOT = { has_country_flag = Harms_Peasants_GEDRUCKT_flag } }
				}
				clr_country_flag = Harms_Piechart_current_Intels
				clr_country_flag = Harms_Piechart_current_Radicals
				clr_country_flag = Harms_Piechart_current_Church
				set_country_flag = Harms_Piechart_current_Peasants
				clr_country_flag = Harms_Piechart_current_Workers
			}
			
			Harms_Workers_Piechart_click = {
				if = {
					limit = { NOT = { has_country_flag = Harms_Workers_GEDRUCKT_flag } }
				}
				clr_country_flag = Harms_Piechart_current_Intels
				clr_country_flag = Harms_Piechart_current_Radicals
				clr_country_flag = Harms_Piechart_current_Church
				clr_country_flag = Harms_Piechart_current_Peasants
				set_country_flag = Harms_Piechart_current_Workers
			}
		}
		
		visible = {
			always = yes
		}
	}
	
}