scripted_gui = {
	VAT_curia_container = {
		context_type = decision_category
		window_name = "vat_curia_container_ui_window"
		#HAS VARS: side_left_support, side_right_support, side_left, side_right
		#HAS ARRS: vat_curia_vote_frames
		#Adding to side_left_support(witch is representative for bop), don`t to forget to clamp from 0 to 70!
		effects = {
			vat_curia_swap_bop_laws_click = {
				if = {
					limit = {
						check_variable = {
							curia_mode = 1
						}
					}
					set_variable = {
						curia_mode = 0
					}
				}
				else = {
					set_variable = {
						curia_mode = 1
					}
				}
			}
		}
		properties = {
			side_left_portrait	= {
				image = "[var_curia_get_side_left_portrait]"
			}
			side_right_portrait	= {
				image = "[var_curia_get_side_right_portrait]"
			}
			support_progress = {
				frame = vat_curia_bop_frames
			}
			vat_curia_vote_0	= { frame = vat_curia_vote_frames^0		}
			vat_curia_vote_1	= { frame = vat_curia_vote_frames^1		}
			vat_curia_vote_2	= { frame = vat_curia_vote_frames^2		}
			vat_curia_vote_3	= { frame = vat_curia_vote_frames^3		}
			vat_curia_vote_4	= { frame = vat_curia_vote_frames^4		}
			vat_curia_vote_5	= { frame = vat_curia_vote_frames^5		}
			vat_curia_vote_6	= { frame = vat_curia_vote_frames^6		}
			vat_curia_vote_7	= { frame = vat_curia_vote_frames^7		}
			vat_curia_vote_8	= { frame = vat_curia_vote_frames^8		}
			vat_curia_vote_9	= { frame = vat_curia_vote_frames^9		}
			vat_curia_vote_10	= { frame = vat_curia_vote_frames^10	}
			vat_curia_vote_11	= { frame = vat_curia_vote_frames^11	}
			vat_curia_vote_12	= { frame = vat_curia_vote_frames^12	}
			vat_curia_vote_13	= { frame = vat_curia_vote_frames^13	}
			vat_curia_vote_14	= { frame = vat_curia_vote_frames^14	}
			vat_curia_vote_15	= { frame = vat_curia_vote_frames^15	}
			vat_curia_vote_16	= { frame = vat_curia_vote_frames^16	}
			vat_curia_vote_17	= { frame = vat_curia_vote_frames^17	}
			vat_curia_vote_18	= { frame = vat_curia_vote_frames^18	}
			vat_curia_vote_19	= { frame = vat_curia_vote_frames^19	}
			vat_curia_vote_20	= { frame = vat_curia_vote_frames^20	}
			vat_curia_vote_21	= { frame = vat_curia_vote_frames^21	}
			vat_curia_vote_22	= { frame = vat_curia_vote_frames^22	}
			vat_curia_vote_23	= { frame = vat_curia_vote_frames^23	}
			vat_curia_vote_24	= { frame = vat_curia_vote_frames^24	}
			vat_curia_vote_25	= { frame = vat_curia_vote_frames^25	}
			vat_curia_vote_26	= { frame = vat_curia_vote_frames^26	}
			vat_curia_vote_27	= { frame = vat_curia_vote_frames^27	}
			vat_curia_vote_28	= { frame = vat_curia_vote_frames^28	}
			vat_curia_vote_29	= { frame = vat_curia_vote_frames^29	}
			vat_curia_vote_30	= { frame = vat_curia_vote_frames^30	}
			vat_curia_vote_31	= { frame = vat_curia_vote_frames^31	}
			vat_curia_vote_32	= { frame = vat_curia_vote_frames^32	}
			vat_curia_vote_33	= { frame = vat_curia_vote_frames^33	}
			vat_curia_vote_34	= { frame = vat_curia_vote_frames^34	}
			vat_curia_vote_35	= { frame = vat_curia_vote_frames^35	}
			vat_curia_vote_36	= { frame = vat_curia_vote_frames^36	}
			vat_curia_vote_37	= { frame = vat_curia_vote_frames^37	}
			vat_curia_vote_38	= { frame = vat_curia_vote_frames^38	}
			vat_curia_vote_39	= { frame = vat_curia_vote_frames^39	}
			vat_curia_vote_40	= { frame = vat_curia_vote_frames^40	}
			vat_curia_vote_41	= { frame = vat_curia_vote_frames^41	}
			vat_curia_vote_42	= { frame = vat_curia_vote_frames^42	}
			vat_curia_vote_43	= { frame = vat_curia_vote_frames^43	}
			vat_curia_vote_44	= { frame = vat_curia_vote_frames^44	}
			vat_curia_vote_45	= { frame = vat_curia_vote_frames^45	}
			vat_curia_vote_46	= { frame = vat_curia_vote_frames^46	}
			vat_curia_vote_47	= { frame = vat_curia_vote_frames^47	}
			vat_curia_vote_48	= { frame = vat_curia_vote_frames^48	}
			vat_curia_vote_49	= { frame = vat_curia_vote_frames^49	}
			vat_curia_vote_50	= { frame = vat_curia_vote_frames^50	}
			vat_curia_vote_51	= { frame = vat_curia_vote_frames^51	}
			vat_curia_vote_52	= { frame = vat_curia_vote_frames^52	}
			vat_curia_vote_53	= { frame = vat_curia_vote_frames^53	}
			vat_curia_vote_54	= { frame = vat_curia_vote_frames^54	}
			vat_curia_vote_55	= { frame = vat_curia_vote_frames^55	}
			vat_curia_vote_56	= { frame = vat_curia_vote_frames^56	}
			vat_curia_vote_57	= { frame = vat_curia_vote_frames^57	}
			vat_curia_vote_58	= { frame = vat_curia_vote_frames^58	}
			vat_curia_vote_59	= { frame = vat_curia_vote_frames^59	}
			vat_curia_vote_60	= { frame = vat_curia_vote_frames^60	}
			vat_curia_vote_61	= { frame = vat_curia_vote_frames^61	}
			vat_curia_vote_62	= { frame = vat_curia_vote_frames^62	}
			vat_curia_vote_63	= { frame = vat_curia_vote_frames^63	}
			vat_curia_vote_64	= { frame = vat_curia_vote_frames^64	}
			vat_curia_vote_65	= { frame = vat_curia_vote_frames^65	}
			vat_curia_vote_66	= { frame = vat_curia_vote_frames^66	}
			vat_curia_vote_67	= { frame = vat_curia_vote_frames^67	}
			vat_curia_vote_68	= { frame = vat_curia_vote_frames^68	}
			vat_curia_vote_69	= { frame = vat_curia_vote_frames^69	}
		}
	}
	VAT_curia_laws_container = {
		context_type = decision_category
		window_name = "vat_curia_laws_container_ui_window"
		dynamic_lists = {
			suspended_laws_grid = {
				array = suspended_laws
				change_scope = no
				entry_container = "suspended_law"
				value = sl_v
				index = sl_i
			}
		}
		triggers = {
			vat_curia_law_vote_0_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_1_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_2_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_3_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_4_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_5_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_6_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_7_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_8_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_9_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_10_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_11_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_12_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_13_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_14_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_15_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_16_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_17_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_18_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_19_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_20_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_21_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_22_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_23_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_24_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_25_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_26_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_27_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_28_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_29_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_30_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_31_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_32_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_33_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_34_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_35_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_36_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_37_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_38_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_39_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_40_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_41_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_42_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_43_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_44_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_45_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_46_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_47_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_48_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_49_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_50_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_51_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_52_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_53_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_54_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_55_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_56_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_57_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_58_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_59_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_60_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_61_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_62_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_63_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_64_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_65_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_66_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_67_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_68_visible		= { check_variable = { curia_laws_mode = 0 } }
			vat_curia_law_vote_69_visible		= { check_variable = { curia_laws_mode = 0 } }
			suspended_law_button_visible		= { check_variable = { curia_laws_mode = 1 } }
			suspended_law_button_click_enabled	= { 
				check_variable = { sl_v > 0 }
				NOT = {
					has_active_mission = VAT_curia_law_voting_mission
					has_active_mission = VAT_curia_law_additional_voting_mission
					has_active_mission = VAT_curia_law_opposition_suggest
				}
				#TODO: сделать триггер про country_flag про недавнее голосование за законопроект
			}
			#veto_icon_visible = { check_variable =  { curia_laws_mode = 0 } }
			#pope_opinion_visible = { check_variable = { current_law_pope_vote = 0} check_variable = { curia_laws_mode = 0 } }
			#secretary_opinion_visible = { check_variable = { current_law_secretary_vote = 0} check_variable = { curia_laws_mode = 0 } }
			veto_icon_visible = { 
				NOT = {
					AND = {
						check_variable = {
							current_law_pope_vote = 1
						}
						check_variable = {
							current_law_secretary_vote = 1
						}
					}
					check_variable = { 
						current_law = 0
					}
				}
				check_variable =  { curia_laws_mode = 0 }
			}
			current_law_votes_title_visible = { NOT = { check_variable = { current_law = 0 } } check_variable =  { curia_laws_mode = 0 }}
			current_law_title_visible = { NOT = { check_variable = { current_law = 0 } } check_variable =  { curia_laws_mode = 0 }}
			current_law_name_visible = { check_variable =  { curia_laws_mode = 0 } }
			background_visible = { check_variable = { curia_laws_mode = 0 } }
			failed_laws_title_visible = { check_variable = { curia_laws_mode = 1 } }
		}
		effects = {
			swap_law_view_click = {
				if = {
					limit = {
						check_variable = {
							curia_laws_mode = 1
						}
					}
					set_variable = {
						curia_laws_mode = 0
					}
				}
				else = {
					set_variable = {
						curia_laws_mode = 1
					}
				}
			}
			suspended_law_button_click = {
				set_variable = {
					current_law = sl_v
				}
				set_variable = {
					current_law_pope_vote = suspended_law_pope_vote^sl_i
				}
				set_variable = {
					current_law_secretary_vote = suspended_law_secretary_vote^sl_i
				}
				set_variable = {
					curia_law_vote_value = suspended_law_start_votes^sl_i
				}
				remove_from_array = {
					array = suspended_laws
					index = sl_i
				}
				remove_from_array = {
					array = suspended_law_pope_vote
					index = sl_i
				}
				remove_from_array = {
					array = suspended_law_secretary_vote
					index = sl_i
				}
				remove_from_array = {
					array = suspended_law_start_votes
					index = sl_i
				}
				add_to_array = {
					suspended_laws = 0
				}
				add_to_array = {
					suspended_law_pope_vote = 0
				}
				add_to_array = {
					suspended_law_secretary_vote = 0
				}
				add_to_array = {
					suspended_law_start_votes = 0
				}
				VAT_update_curia_law_gui = yes
				activate_mission = VAT_curia_law_voting_mission
			}
		}
		properties = {
			vat_curia_law_vote_0	= { frame = vat_curia_law_vote_frames^0		}
			vat_curia_law_vote_1	= { frame = vat_curia_law_vote_frames^1		}
			vat_curia_law_vote_2	= { frame = vat_curia_law_vote_frames^2		}
			vat_curia_law_vote_3	= { frame = vat_curia_law_vote_frames^3		}
			vat_curia_law_vote_4	= { frame = vat_curia_law_vote_frames^4		}
			vat_curia_law_vote_5	= { frame = vat_curia_law_vote_frames^5		}
			vat_curia_law_vote_6	= { frame = vat_curia_law_vote_frames^6		}
			vat_curia_law_vote_7	= { frame = vat_curia_law_vote_frames^7		}
			vat_curia_law_vote_8	= { frame = vat_curia_law_vote_frames^8		}
			vat_curia_law_vote_9	= { frame = vat_curia_law_vote_frames^9		}
			vat_curia_law_vote_10	= { frame = vat_curia_law_vote_frames^10	}
			vat_curia_law_vote_11	= { frame = vat_curia_law_vote_frames^11	}
			vat_curia_law_vote_12	= { frame = vat_curia_law_vote_frames^12	}
			vat_curia_law_vote_13	= { frame = vat_curia_law_vote_frames^13	}
			vat_curia_law_vote_14	= { frame = vat_curia_law_vote_frames^14	}
			vat_curia_law_vote_15	= { frame = vat_curia_law_vote_frames^15	}
			vat_curia_law_vote_16	= { frame = vat_curia_law_vote_frames^16	}
			vat_curia_law_vote_17	= { frame = vat_curia_law_vote_frames^17	}
			vat_curia_law_vote_18	= { frame = vat_curia_law_vote_frames^18	}
			vat_curia_law_vote_19	= { frame = vat_curia_law_vote_frames^19	}
			vat_curia_law_vote_20	= { frame = vat_curia_law_vote_frames^20	}
			vat_curia_law_vote_21	= { frame = vat_curia_law_vote_frames^21	}
			vat_curia_law_vote_22	= { frame = vat_curia_law_vote_frames^22	}
			vat_curia_law_vote_23	= { frame = vat_curia_law_vote_frames^23	}
			vat_curia_law_vote_24	= { frame = vat_curia_law_vote_frames^24	}
			vat_curia_law_vote_25	= { frame = vat_curia_law_vote_frames^25	}
			vat_curia_law_vote_26	= { frame = vat_curia_law_vote_frames^26	}
			vat_curia_law_vote_27	= { frame = vat_curia_law_vote_frames^27	}
			vat_curia_law_vote_28	= { frame = vat_curia_law_vote_frames^28	}
			vat_curia_law_vote_29	= { frame = vat_curia_law_vote_frames^29	}
			vat_curia_law_vote_30	= { frame = vat_curia_law_vote_frames^30	}
			vat_curia_law_vote_31	= { frame = vat_curia_law_vote_frames^31	}
			vat_curia_law_vote_32	= { frame = vat_curia_law_vote_frames^32	}
			vat_curia_law_vote_33	= { frame = vat_curia_law_vote_frames^33	}
			vat_curia_law_vote_34	= { frame = vat_curia_law_vote_frames^34	}
			vat_curia_law_vote_35	= { frame = vat_curia_law_vote_frames^35	}
			vat_curia_law_vote_36	= { frame = vat_curia_law_vote_frames^36	}
			vat_curia_law_vote_37	= { frame = vat_curia_law_vote_frames^37	}
			vat_curia_law_vote_38	= { frame = vat_curia_law_vote_frames^38	}
			vat_curia_law_vote_39	= { frame = vat_curia_law_vote_frames^39	}
			vat_curia_law_vote_40	= { frame = vat_curia_law_vote_frames^40	}
			vat_curia_law_vote_41	= { frame = vat_curia_law_vote_frames^41	}
			vat_curia_law_vote_42	= { frame = vat_curia_law_vote_frames^42	}
			vat_curia_law_vote_43	= { frame = vat_curia_law_vote_frames^43	}
			vat_curia_law_vote_44	= { frame = vat_curia_law_vote_frames^44	}
			vat_curia_law_vote_45	= { frame = vat_curia_law_vote_frames^45	}
			vat_curia_law_vote_46	= { frame = vat_curia_law_vote_frames^46	}
			vat_curia_law_vote_47	= { frame = vat_curia_law_vote_frames^47	}
			vat_curia_law_vote_48	= { frame = vat_curia_law_vote_frames^48	}
			vat_curia_law_vote_49	= { frame = vat_curia_law_vote_frames^49	}
			vat_curia_law_vote_50	= { frame = vat_curia_law_vote_frames^50	}
			vat_curia_law_vote_51	= { frame = vat_curia_law_vote_frames^51	}
			vat_curia_law_vote_52	= { frame = vat_curia_law_vote_frames^52	}
			vat_curia_law_vote_53	= { frame = vat_curia_law_vote_frames^53	}
			vat_curia_law_vote_54	= { frame = vat_curia_law_vote_frames^54	}
			vat_curia_law_vote_55	= { frame = vat_curia_law_vote_frames^55	}
			vat_curia_law_vote_56	= { frame = vat_curia_law_vote_frames^56	}
			vat_curia_law_vote_57	= { frame = vat_curia_law_vote_frames^57	}
			vat_curia_law_vote_58	= { frame = vat_curia_law_vote_frames^58	}
			vat_curia_law_vote_59	= { frame = vat_curia_law_vote_frames^59	}
			vat_curia_law_vote_60	= { frame = vat_curia_law_vote_frames^60	}
			vat_curia_law_vote_61	= { frame = vat_curia_law_vote_frames^61	}
			vat_curia_law_vote_62	= { frame = vat_curia_law_vote_frames^62	}
			vat_curia_law_vote_63	= { frame = vat_curia_law_vote_frames^63	}
			vat_curia_law_vote_64	= { frame = vat_curia_law_vote_frames^64	}
			vat_curia_law_vote_65	= { frame = vat_curia_law_vote_frames^65	}
			vat_curia_law_vote_66	= { frame = vat_curia_law_vote_frames^66	}
			vat_curia_law_vote_67	= { frame = vat_curia_law_vote_frames^67	}
			vat_curia_law_vote_68	= { frame = vat_curia_law_vote_frames^68	}
			vat_curia_law_vote_69	= { frame = vat_curia_law_vote_frames^69	}
			veto_icon = {
				image = "[get_veto_icon]"
			}
		}
	}
}
