# Allows you to create your own dynamic keys
# to be called in localization.
# defined_text -> this is it, we're defining the text
# text -> a discrete entry that can be picked to display in loc.
# trigger -> determines if a text entry will be picked or not.
# (The triggers need to be valid for the scope the key is called in
# (eg Root or From.From).)
# localization_key -> points to the localization key
# that'll be used if trigger passes

defined_text = {
	name = SWE_GetReminder
	text = {
		trigger = {
			SWE = {
				has_country_flag = remind_me_about_rearnament_flag
			}
		}
		localization_key = SWE_reminderLocActive
	}
	text = {
		trigger = {
			SWE = {
				NOT = { has_country_flag = remind_me_about_rearnament_flag }
			}
		}
		localization_key = SWE_reminderLocNotActive
	}
}

defined_text = {
	name = SWE_vasa_ii_loc
	text = {
		trigger = {
			SWE = {
				has_government = communism
			}
		}
		localization_key = SWE_vasa_ii_communist
	}
	text = {
		trigger = {
			SWE = {
				NOT = { has_government = communism }
			}
		}
		localization_key = SWE_vasa_ii_default
	}
}


#Axel
defined_text = {
	name = AAT_Sweden_3_b_loc
	text = {
		trigger = {
			NOT = {
				has_country_leader = {
					ruling_only = yes
					character = SWE_axel_pehrssonbramstorp
				}
			}
		}
		localization_key = AAT_Sweden.3.axel_is_not_leader
	}
	text = {
		trigger = {
			has_country_leader = {
				ruling_only = yes
				character = SWE_axel_pehrssonbramstorp
			}
		}
		localization_key = AAT_Sweden.3.axel_is_leader
	}
}

defined_text = {
	name = AAT_Sweden_3_c_loc
	text = {
		trigger = {
			NOT = {
				has_country_leader = {
					ruling_only = yes
					character = SWE_gosta_bagge
				}
			}
		}
		localization_key = AAT_Sweden.3.bagge_is_not_leader
	}
	text = {
		trigger = {
			has_country_leader = {
				ruling_only = yes
				character = SWE_gosta_bagge
			}
		}
		localization_key = AAT_Sweden.3.bagge_is_leader
	}
}

defined_text = {
	name = GetLoc_remind_me_about_rearmanent
	text = {
		trigger = {
			SWE = {
				NOT = { has_country_flag = remind_me_about_rearnament_flag }
			}
		}
		localization_key = SWE_reminderLocNotActive
	}
	text = {
		trigger = {
			SWE = {
				has_country_flag = remind_me_about_rearnament_flag 
			}
		}
		localization_key = SWE_reminderLocNotActive
	}
}

defined_text = {
	name = SWE_train_the_sheltered_cost
	text = {
		trigger = {
			SWE = {
				check_variable = { SWE_sheltered_training_level < 2 }
			}
		}
		localization_key = decision_cost_CP_40_cp
	}
	text = {
		trigger = {
			SWE = {
				check_variable = { 
					var = SWE_sheltered_training_level
					value = 2
					compare = greater_than_or_equals

				}
			}
		}
		localization_key = decision_cost_15_army_xp
	}
}


defined_text = {
	name = SWE_folkhemmet_status_text
	text = {
		trigger = {
			SWE = {
				check_variable = {
					var = folkhemmet_intactness 
					value = 6
					compare = greater_than_or_equals
				}
			}
		}
		localization_key = SWE_folkhemmet_intactness_intact
	}
	text = {
		trigger = {
			SWE = {
				check_variable = {
					var = folkhemmet_intactness 
					value = 4
					compare = greater_than_or_equals
				}

				check_variable = {
					var = folkhemmet_intactness 
					value = 6
					compare = less_than
				}

			}
		}
		localization_key = SWE_folkhemmet_intactness_eroding
	}

	text = {
		trigger = {
			SWE = {

				check_variable = {
					var = folkhemmet_intactness 
					value = 3
					compare = less_than
				}

			}
		}
		localization_key = SWE_folkhemmet_intactness_gone
	}
}

defined_text = {
	name = SWE_rearmament_status_text_army
	text = {
		trigger = {
			SWE = {
				check_variable = { folkhemmet_army_part = 3 }
			}
		}
		localization_key = SWE_rearmament_3_text
	}
	text = {
		trigger = {
			SWE = {
				check_variable = { folkhemmet_army_part = 2 }



			}
		}
		localization_key = SWE_rearmament_2_text
	}

	text = {
		trigger = {
			SWE = {

				check_variable = { folkhemmet_army_part = 1 }

			}
		}
		localization_key = SWE_rearmament_1_text
	}

	text = {
		trigger = {
			SWE = {

				check_variable = { folkhemmet_army_part = 0 }

			}
		}
		localization_key = SWE_rearmament_0_text
	}
}

defined_text = {
	name = SWE_rearmament_status_text_air
	text = {
		trigger = {
			SWE = {
				check_variable = { folkhemmet_air_part = 3 }
			}
		}
		localization_key = SWE_rearmament_3_text
	}
	text = {
		trigger = {
			SWE = {
				check_variable = { folkhemmet_air_part = 2 }



			}
		}
		localization_key = SWE_rearmament_2_text
	}

	text = {
		trigger = {
			SWE = {

				check_variable = { folkhemmet_air_part = 1 }

			}
		}
		localization_key = SWE_rearmament_1_text
	}

	text = {
		trigger = {
			SWE = {

				check_variable = { folkhemmet_air_part = 0 }

			}
		}
		localization_key = SWE_rearmament_0_text
	}
}

defined_text = {
	name = SWE_rearmament_status_text_navy
	text = {
		trigger = {
			SWE = {
				check_variable = { folkhemmet_navy_part = 3 }
			}
		}
		localization_key = SWE_rearmament_3_text
	}
	text = {
		trigger = {
			SWE = {
				check_variable = { folkhemmet_navy_part = 2 }



			}
		}
		localization_key = SWE_rearmament_2_text
	}

	text = {
		trigger = {
			SWE = {

				check_variable = { folkhemmet_navy_part = 1 }

			}
		}
		localization_key = SWE_rearmament_1_text
	}

	text = {
		trigger = {
			SWE = {

				check_variable = { folkhemmet_navy_part = 0 }

			}
		}
		localization_key = SWE_rearmament_0_text
	}
}

defined_text = {
	name = AAT_Sweden_royal_institute_name
	text = {
		trigger = {
			SWE = {
				has_government = communism
			}
		}
		localization_key = SWE_RIT_communist
	}
	text = {
		trigger = {
			SWE = {
				NOT = { has_government = communism }
			}
		}
		localization_key = SWE_RIT_historical
	}
}

defined_text = {
	name = AAT_crusade_against_sov
	text = {
		trigger = {
			SOV = {
				has_government = communism
			}
		}
		localization_key = SWE_crusade_against_bol
	}
	text = {
		trigger = {
			SOV = {
				NOT = { has_government = communism }
			}
		}
		localization_key = SWE_crusade_against_rus
	}
}

defined_text = {
	name = SWE_FinnishVolunteerFocusLoc
	text = {
		trigger = {
			FIN = {
				any_enemy_country = {
					is_major = yes
				}
			}
		}
		localization_key = SWE_swedes_not_sweden_to_finlands_aid_post_fin_war
	}
	text = {
		localization_key = SWE_swedes_not_sweden_to_finlands_aid_pre_fin_war
	}
}

defined_text = {
	name = SWE_civilian_tire_loc
	text = {
		trigger = {
			SWE = {
				NOT = { has_country_flag = SWE_has_seized_civilian_tires }
			}
		}
		localization_key = SWE_seize_civilian_tires_activate
	}

	text = {
		localization_key = SWE_seize_civilian_tires_revoke
	}
}

defined_text = {
	name = SWE_gengas_loc
	text = {
		trigger = {
			SWE = {
				NOT = { has_country_flag = SWE_gengas }
			}
		}
		localization_key = SWE_gengas_activate
	}

	text = {
		localization_key = SWE_gengas_revoke
	}
}

defined_text = {
	name = SWE_gengas_loc
	text = {
		trigger = {
			SWE = {
				NOT = { has_country_flag = SWE_gengas }
			}
		}
		localization_key = SWE_gengas_activate
	}

	text = {
		localization_key = SWE_gengas_revoke
	}
}

defined_text = {
	name = SWE_food_stamps_loc
	text = {
		trigger = {
			SWE = {
				NOT = { has_country_flag = SWE_has_food_stamps }
			}
		}
		localization_key = SWE_food_stamps_activate
	}

	text = {
		localization_key = SWE_food_stamps_revoke
	}
}

defined_text = {
	name = SWE_air_raid_shelters_loc
	text = {
		trigger = {
			SWE = {
				NOT = { has_country_flag = SWE_has_air_raid_shelters }
			}
		}
		localization_key = SWE_air_raid_shelters_activate
	}

	text = {
		localization_key = SWE_air_raid_shelters_revoke
	}
}