scripted_gui = {
	
	pd_hiden_mark = {
		context_type = selected_state_context

		window_name = "pd_hiden_mark"

		visible = {
			set_temp_variable = { this_state = FROM.FROM }
			ROOT = {
				is_ai = no
				is_in_array = {
					array = pd_state_list
					value = this_state
				}
			}
		}

		effects = {
			pd_hiden_mark_btn_click = {
				set_temp_variable = { this_state = FROM.FROM }
				if = {
					limit = {
						ROOT = {
							OR = {
								is_in_array = {
									array = pd_take_array
									value = this_state
								}
								is_in_array = {
									array = pd_puppet_array
									value = this_state
								}
								is_in_array = {
									array = pd_demilitarize_array
									value = this_state
								}
								is_in_array = {
									array = pd_liberate_array
									value = this_state
								}
							}
						}
					}
					remove_state_from_list = yes
				}
				else = {
					add_state_to_list = yes
				}
			}
		}
		
		triggers = {
			pd_hiden_mark_btn_click_enabled = {
				ROOT = {
					NOT = { has_country_flag = pd_waiting_response }
					is_ai = no
				}
			}
		}
	}
}

