#	Example:
# 
#	example_trigger = {
#		tag = GER
#		is_ai = no
#	}
#
#
#	In a script file:
#
#	trigger = {
#		exampel_trigger = yes
#	}
# 

BUL_state_is_in_the_aegean_sea = {
	custom_trigger_tooltip = {
		tooltip = BUL_state_is_in_the_aegean_sea_tt
		OR = {
			state = 184
			state = 731
			state = 47
			state = 186
			state = 187
			state = 182
			state = 342
			state = 339
			state = 340
			state = 341
			state = 164
			state = 1024
		}
	}
}

BUL_state_is_in_the_black_sea = {
	custom_trigger_tooltip = {
		tooltip = BUL_state_is_in_the_black_sea_tt
		OR = {
			state = 341
			state = 797
			state = 211
			state = 77
			state = 971
			state = 766
			state = 192
			state = 197
			state = 196
			state = 137
			state = 200
			state = 227
			state = 218
			state = 233
			state = 234
			state = 231
			state = 354
			state = 355
			state = 356
			state = 347
			state = 826
		}
	}
}

BUL_state_is_in_the_adriatic_sea = {
	custom_trigger_tooltip = {
		tooltip = BUL_state_is_in_the_adriatic_sea_tt
		OR = {
			state = 185
			state = 805
			state = 44
			state = 934
			state = 105
			state = 103
			state = 163
			state = 736
			state = 852
			state = 160
			state = 161
			state = 157
			state = 117
			state = 156
			state = 849
			state = 1017
			state = 1035
			state = 1036
			state = 1018
			state = 1019
		}
	}
}

BUL_country_seeks_macedonian_stability = {
	custom_trigger_tooltip = {
		tooltip = BUL_country_seeks_macedonian_stability_tt
		OR = {
			controls_state = 803
			controls_state = 106
			controls_state = 970
			controls_state = 731
			controls_state = 184
			AND = {
				tag = ENG
				OR = {
					has_government = democratic
					is_in_faction_with = GRE
					is_in_faction_with = YUG
					803 = { controller = { is_in_faction_with = ENG } }
					106 = { controller = { is_in_faction_with = ENG } }
					970 = { controller = { is_in_faction_with = ENG } }
					731 = { controller = { is_in_faction_with = ENG } }
					184 = { controller = { is_in_faction_with = ENG } }
				}
				
			}
			AND = {
				tag = FRA
				OR = {
					has_government = democratic
					is_in_faction_with = GRE
					is_in_faction_with = YUG
					803 = { controller = { is_in_faction_with = ENG } }
					106 = { controller = { is_in_faction_with = ENG } }
					970 = { controller = { is_in_faction_with = ENG } }
					731 = { controller = { is_in_faction_with = ENG } }
					184 = { controller = { is_in_faction_with = ENG } }
				}
				
			}
		}
	}
}

BUL_has_freedom_of_press = {
	custom_trigger_tooltip = {
		tooltip = BUL_freedom_of_press_trigger_tt
		NOT = { has_decision = institute_press_censorship_neutrality_state }
		NOT = { has_decision = institute_press_censorship_fascist_state }
		NOT = { has_decision = institute_press_censorship_democratic_state }
		NOT = { has_decision = institute_press_censorship_communist_state }
	}
}

BUL_has_banned_faction_media = {
	custom_trigger_tooltip = {
		tooltip = BUL_has_banned_faction_media_trigger_tt
		OR = {
			has_country_flag = { flag = BUL_bs_media_banned_flag days < 365 }
			has_country_flag = { flag = BUL_bzns_media_banned_flag days < 365 }
			has_country_flag = { flag = BUL_nsm_media_banned_flag days < 365 }
		}
	}
}

BUL_historical_requirements_met = {
	OR = {
		has_war_with = SOV
		any_allied_country = {
			has_war_with = SOV
		}
	}
	SOV = {
		surrender_progress < 0.05
	}
	OR = {
		SOV = {
			any_controlled_state = {
				OR = {
					has_state_flag = BUL_initial_bulgarian_state_flag
					has_state_flag = BUL_historical_bulgarian_claim_flag
				}
				is_fully_controlled_by = PREV
			}
		}
		SOV = {
			any_controlled_state = {
				is_core_of = GER
				NOT = {
					state = 188
					state = 763
					state = 5
					state = 807
					state = 85
				}
			}
		}
	}
}

BUL_has_restored_greater_bulgaria = {
	48 = { is_fully_controlled_by = ROOT } #Sofia
	212 = { is_fully_controlled_by = ROOT } #Plovdiv
	801 = { is_fully_controlled_by = ROOT } #Moesia
	211 = { is_fully_controlled_by = ROOT } #Burgas
	803 = { is_fully_controlled_by = ROOT } #Southern Serbia
	106 = { is_fully_controlled_by = ROOT } #Macedonia
	184 = { is_fully_controlled_by = ROOT } #Central Macedonia
	1024 = { is_fully_controlled_by = ROOT } #Thrace
	77 = { is_fully_controlled_by = ROOT } #Dobrudja
	971 = { is_fully_controlled_by = ROOT } #North Dobrudja
}

BUL_country_can_influence_bulgaria = {
	OR = {
		tag = GER
		tag = SOV
		tag = ENG
		tag = ITA
	}
}

BUL_is_macedonian_state = {
	OR = {
		state = 106
		state = 731
		state = 184
	}
}

BUL_is_balkan_nation = {
	custom_trigger_tooltip = {
		tooltip = BUL_is_balkan_nation_tt
		OR = {
			original_tag = BUL
			original_tag = GRE
			original_tag = YUG
			original_tag = ALB
			original_tag = ROM
			original_tag = TUR
			original_tag = SLV
			original_tag = BOS
			original_tag = HRZ
			original_tag = MAC
			original_tag = SER
			original_tag = CRO
			original_tag = KOS
			original_tag = MNT
			original_tag = TRA
		}
	}
}

BUL_is_balkan_nation_no_bulgaria = {
	custom_trigger_tooltip = {
		tooltip = BUL_is_balkan_nation_tt
		OR = {
			original_tag = GRE
			original_tag = YUG
			original_tag = ALB
			original_tag = ROM
			original_tag = TUR
			original_tag = SLV
			original_tag = BOS
			original_tag = HRZ
			original_tag = MAC
			original_tag = SER
			original_tag = CRO
			original_tag = KOS
			original_tag = MNT
			original_tag = TRA
		}
	}
}

BUL_is_balkan_state = {
	OR = {
		is_core_of = BUL
		is_core_of = GRE
		is_core_of = YUG
		is_core_of = ALB
		is_core_of = ROM
		is_core_of = TUR
		is_core_of = SLV
		is_core_of = BOS
		is_core_of = HRZ
		is_core_of = MAC
		is_core_of = SER
		is_core_of = CRO
		is_core_of = KOS
		is_core_of = MNT
		is_core_of = TRA
	}
	is_on_continent = europe
}

BUL_has_abolished_monarchy = {
	custom_trigger_tooltip = {
		tooltip = BUL_has_abolished_monarchy_tt
		OR = {
			has_government = communism
			has_completed_focus = BUL_overthrow_the_tsar
			has_completed_focus = BUL_abolish_the_monarchy
			has_completed_focus = BUL_depose_the_tsar
		}
	}
}

BUL_is_not_alone_in_faction = {
	custom_trigger_tooltip = {
		tooltip = BUL_is_not_alone_in_faction_tt
		is_in_faction = yes
		any_allied_country = {
			NOT = { tag = ROOT }
		}
	}
}

### AI ###

BUL_is_historical_ai = {
	OR = {
		AND = {
			is_historical_focus_on = yes
			has_game_rule = {
				rule = BUL_ai_behavior
				option = DEFAULT
			}
		}
		has_country_flag = BUL_AI_RANDOM_HISTORICAL
		has_game_rule = {
			rule = BUL_ai_behavior
			option = HISTORICAL
		}
	}
}

BUL_is_communist_stalinist_ai = {
	OR = {
		has_country_flag = BUL_AI_RANDOM_COMMUNIST
		has_game_rule = {
			rule = BUL_ai_behavior 
			option = COMMUNIST
		}
	}
}

BUL_is_communist_balkan_ai = {
	OR = {
		has_country_flag = BUL_AI_RANDOM_COMMUNIST_BALKAN_FEDERATION
		has_game_rule = {
			rule = BUL_ai_behavior 
			option = COMMUNIST_BALKAN_FEDERATION
		}
	}
}

BUL_is_democratic_socialist_ai = {
	OR = {
		has_country_flag = BUL_AI_RANDOM_DEMOCRATIC_SOCIALIST
		has_game_rule = {
			rule = BUL_ai_behavior 
			option = DEMOCRATIC_SOCIALIST
		}
	}
}

BUL_is_democratic_liberal_ai = {
	OR = {
		has_country_flag = BUL_AI_RANDOM_DEMOCRATIC_LIBERAL
		has_game_rule = {
			rule = BUL_ai_behavior 
			option = DEMOCRATIC_LIBERAL
		}
	}
}

BUL_is_fascist_axis_ai = {
	OR = {
		has_country_flag = BUL_AI_RANDOM_FASCIST
		has_game_rule = {
			rule = BUL_ai_behavior 
			option = FASCIST
		}
	}
}

BUL_is_monarchist_ferdinand_ai = {
	OR = {
		has_country_flag = BUL_AI_RANDOM_THE_RETURN_OF_FERDINAND
		has_game_rule = {
			rule = BUL_ai_behavior 
			option = THE_RETURN_OF_FERDINAND
		}
	}
}

BUL_save_money_for_decisions = {
	date < 1940.01.01
	has_war = no
}

BUL_foreign_agreements_in_faction_with_ger = {
	custom_trigger_tooltip = {
		tooltip = BUL_foreign_agreements_factions_ger_tt
		NOT = {
			AND = {
				is_in_faction_with = GER
				NOT = {
					GER = { is_subject_of = ROOT }
				}
			}
		}
	}
}

BUL_foreign_agreements_in_faction_with_eng = {
	custom_trigger_tooltip = {
		tooltip = BUL_foreign_agreements_factions_eng_tt
		NOT = {
			AND = {
				is_in_faction_with = ENG
				NOT = {
					ENG = { is_subject_of = ROOT }
				}
			}
		}
	}
}

BUL_foreign_agreements_in_faction_with_sov = {
	custom_trigger_tooltip = {
		tooltip = BUL_foreign_agreements_factions_sov_tt
		NOT = {
			AND = {
				is_in_faction_with = SOV
				NOT = {
					SOV = { is_subject_of = ROOT }
				}
			}
		}
	}
}

BUL_foreign_agreements_in_faction_with_ita = {
	custom_trigger_tooltip = {
		tooltip = BUL_foreign_agreements_factions_ita_tt
		NOT = {
			AND = {
				is_in_faction_with = ITA
				NOT = {
					ITA = { is_subject_of = ROOT }
				}
			}
		}
	}
}

BUL_is_valid_subject = {
	OR = {
		is_subject = no
		is_subject_of = BUL
	}
}

BUL_has_some_sort_of_bogdan_filov = {
	BUL = {
		OR = {
			has_idea = BUL_bogdan_filov
			has_idea = BUL_bogdan_filov_fascism
			has_country_leader = {
				character = BUL_bogdan_filov
				ruling_only = yes
			}
		}
	}
}