scripted_gui = {

	nat_ideas = {
		context_type = player_context
		
		window_name = "nat_ideas_container"
		
		visible = {
            always = yes
		}
		
		effects = {
			nat_ideas_open_button_click = {
				if = {
					limit = { NOT = { has_country_flag = natideas_opened } }
					set_country_flag = natideas_opened
				}
				else = {
					clr_country_flag = natideas_opened
				}
			}
			nat_ideas_open_button_max_click = {
				if = {
					limit = { NOT = { has_country_flag = natideas_opened } }
					set_country_flag = natideas_opened
				}
				else = {
					clr_country_flag = natideas_opened
				}
			}
		}
		
		triggers = {
			nat_ideas_open_button_visible = {
				has_political_power < 99
			}
			nat_ideas_open_button_max_visible = {
				has_political_power > 99
			}
		}
		
		ai_test_interval = 300
		ai_test_variance = 0.1
		ai_max_weight_taken_per_test = 2
		
		ai_enabled = {
            always = yes
		}
		ai_check = {
			has_political_power > 300
		}
		
		ai_weights = {
			nat_ideas_open_button_click = {
				weight = 1.0
				ai_will_do = {
					factor = 1
				}
			}
			nat_ideas_open_button_max_click = {
				weight = 1.0
				ai_will_do = {
					factor = 1
				}
			}
		}
	}
    
}

