﻿je_unite_the_nations = {
	icon = "gfx/interface/icons/event_icons/waving_flag.dds"
	
	group = je_group_foreign_affairs

	scripted_button = je_unite_the_nations_proclaim_turtle_island_button
    scripted_button = je_unite_the_nations_organize_the_tribes_button
    scripted_button = je_unite_the_nations_offer_confederation_button

	is_shown_when_inactive = {
		NOT = { is_country_type = decentralized }
		country_is_in_north_america = yes
		any_primary_culture = {
			has_discrimination_trait = indigenous_american_heritage
		}
		OR = {
			NOT = {
				exists = c:TIS
			}
			AND = {
				exists = c:TIS
				c:TIS = this
			}
		}
	}

	possible = {
		is_subject = no
	}

	complete = {
		custom_tooltip = {
			text = je_unite_the_nations_complete_tt
			NOT = { 
				any_country = { 
					country_is_in_north_america = yes 
					is_country_type = decentralized 
					any_primary_culture = {
						shares_heritage_trait_with_any_primary_culture = ROOT
					}
				} 
			}
		}
        any_scope_state = {
            owner = root
            is_homeland_of_country_cultures = ROOT
            count >= 5
        }
	}

	on_complete = {
		if = {
			limit = { is_country_type = unrecognized }
			set_country_type = recognized
		}
		add_modifier = {
			name = turtle_island_state_of_nations
			months = -1 # FOREVER
		}
	}

	fail = {
	}

	on_fail = {
	}

	on_monthly_pulse = {
	}
	on_yearly_pulse = {
	}

	#current_value = {
	#}

	#goal_add_value = {
	#	value = 120
	#}

	#progressbar = yes

	weight = 100

	should_be_pinned_by_default = yes
}
