je_ari_unification = {
	icon = "gfx/interface/icons/event_icons/event_portrait.dds"

	is_shown_when_inactive = {
		country_has_primary_culture = cu:catalan
	}

	possible = {
		country_rank >= rank_value:major_power
		has_technology_researched = pan-nationalism
		is_subject = no
	}

	complete = {
		hidden_trigger = {
			has_variable = je_unification_progress
		}
		calc_true_if = {
			amount >= 19
			owns_entire_state_region = STATE_CATALONIA
			owns_entire_state_region = STATE_ARAGON
			owns_entire_state_region = STATE_VALENCIA
			owns_entire_state_region = STATE_BALEARES
			owns_entire_state_region = STATE_SARDINIA
			owns_entire_state_region = STATE_CORSICA
			owns_entire_state_region = STATE_MALTA
			owns_entire_state_region = STATE_SICILY
			owns_entire_state_region = STATE_CALABRIA
			owns_entire_state_region = STATE_CAMPANIA
			owns_entire_state_region = STATE_APULIA
			owns_entire_state_region = STATE_ABRUZZO
			owns_entire_state_region = STATE_LAZIO
			owns_entire_state_region = STATE_UMBRIA
			owns_entire_state_region = STATE_TUSCANY
			owns_entire_state_region = STATE_ROMAGNA
			owns_entire_state_region = STATE_EMILIA
			owns_entire_state_region = STATE_PIEDMONT
			owns_entire_state_region = STATE_LOMBARDY
			owns_entire_state_region = STATE_SAVOY
			owns_entire_state_region = STATE_VENETIA
			owns_entire_state_region = STATE_ISTRIA
			owns_entire_state_region = STATE_DALMATIA
			owns_entire_state_region = STATE_MALTA
		}
	}

	on_monthly_pulse = {
		events = {
			dvg_ari_unification.2
		}
		effect = {
			if = { 
				limit = { NOT = { has_variable = je_unification_progress } } 
				set_variable = je_unification_progress
			}
		}
	}

	on_complete = {
		trigger_event = { id = dvg_ari_unification.4 }
		remove_variable = je_unification_progress
	}

	weight = 100
}
