# Alert Pop Ups:
defined_text = {
	name = GetIdeasWindowConfirmAlertTitle

	text = {
		trigger = {
			check_variable = { show_ideas_window_confirm_alert = 1 }
		}
		localization_key = string_confirm_select_idea_group_title
	}
	text = {
		trigger = {
			check_variable = { show_ideas_window_confirm_alert = 2 }
		}
		localization_key = string_confirm_select_idea_title
	}
	text = {
		trigger = {
			check_variable = { show_ideas_window_confirm_alert = 3 }
		}
		localization_key = string_confirm_remove_idea_group_title
	}
	text = {
		trigger = {
			check_variable = { show_ideas_window_confirm_alert = 4 }
		}
		localization_key = string_confirm_add_policy_title
	}
	text = {
		trigger = {
			check_variable = { show_ideas_window_confirm_alert = 5 }
		}
		localization_key = string_confirm_remove_policy_title
	}
}

defined_text = {
	name = GetIdeasWindowConfirmAlertDesc

	text = {
		trigger = {
			check_variable = { show_ideas_window_confirm_alert = 1 }
		}
		localization_key = string_confirm_select_idea_group_desc
	}
	text = {
		trigger = {
			check_variable = { show_ideas_window_confirm_alert = 2 }
		}
		localization_key = string_confirm_select_idea_desc
	}
	text = {
		trigger = {
			meta_trigger = {
				text = {
					set_temp_variable = { refund_pp_temp = completed_ideas_of_group_[GROUP] }
				}
				GROUP = "[?confirm_idea_group]"
			}
			set_temp_variable = { halfed_idea_cost_temp = idea_cost_var }
			divide_temp_variable = { halfed_idea_cost_temp = 2 }
			round_temp_variable = halfed_idea_cost_temp
			multiply_temp_variable = { refund_pp_temp = halfed_idea_cost_temp }
			check_variable = { show_ideas_window_confirm_alert = 3 }
		}
		localization_key = string_confirm_remove_idea_group_desc
	}
	text = {
		trigger = {
			check_variable = { show_ideas_window_confirm_alert = 4 }
		}
		localization_key = string_confirm_add_policy_desc
	}
	text = {
		trigger = {
			check_variable = { show_ideas_window_confirm_alert = 5 }
		}
		localization_key = string_confirm_remove_policy_desc
	}
}

defined_text = {
	name = GetConfirmIdeaGroup

	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			always = yes
		}
		localization_key = "[This.GetIdeaGroupName]"
	}
}

defined_text = {
	name = GetConfirmIdeaGroupDLCNotification

	text = {
		trigger = {
			OR = {
				AND = {
					check_variable = { v = 3 }
					OR = {
						NOT = { has_dlc = "Death or Dishonor" }
						NOT = { has_dlc = "La Resistance" }
					}
				}
				AND = {
					check_variable = { v = 8 }
					NOT = { has_dlc = "Death or Dishonor" }
				}
				AND = {
					check_variable = { v = 10 }
					OR = {
						AND = {
							NOT = { has_dlc = "Together for Victory" }
							NOT = { has_dlc = "Death or Dishonor" }
							NOT = { has_dlc = "Waking the Tiger" }
						}
						NOT = { has_dlc = "Man the Guns" }
						NOT = { has_dlc = "La Resistance" }
					}
				}
				AND = {
					check_variable = { v = 11 }
					NOT = { has_dlc = "Man the Guns" }
				}
				AND = {
					check_variable = { v = 23 }
					NOT = { has_dlc = "La Resistance" }
				}
				AND = {
					check_variable = { v = 26 }
					NOT = { has_dlc = "La Resistance" }
				}
				AND = {
					check_variable = { v = 27 }
					NOT = { has_dlc = "La Resistance" }
				}
			}
		}
		localization_key = string_confirm_select_idea_group_dlc_notification
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}

defined_text = {
	name = GetConfirmIdeaGroupDLCNotificationList

	text = {
		trigger = {
			check_variable = { v = 3 }
		}
		localization_key = "[GetConfirmIdeaGroupDLCNotificationDeathOrDishonor][GetConfirmIdeaGroupDLCNotificationLaResistance]"
	}
	text = {
		trigger = {
			check_variable = { v = 8 }
		}
		localization_key = "[GetConfirmIdeaGroupDLCNotificationDeathOrDishonor]"
	}
	text = {
		trigger = {
			check_variable = { v = 10 }
		}
		localization_key = "[GetConfirmIdeaGroupDLCNotificationTogetherForVictory][GetConfirmIdeaGroupDLCNotificationManTheGuns][GetConfirmIdeaGroupDLCNotificationLaResistance]"
	}
	text = {
		trigger = {
			check_variable = { v = 11 }
		}
		localization_key = "[GetConfirmIdeaGroupDLCNotificationManTheGuns]"
	}
	text = {
		trigger = {
			check_variable = { v = 23 }
		}
		localization_key = "[GetConfirmIdeaGroupDLCNotificationLaResistance]"
	}
	text = {
		trigger = {
			check_variable = { v = 26 }
		}
		localization_key = "[GetConfirmIdeaGroupDLCNotificationLaResistance]"
	}
	text = {
		trigger = {
			check_variable = { v = 27 }
		}
		localization_key = "[GetConfirmIdeaGroupDLCNotificationLaResistance]"
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}

defined_text = {
	name = GetConfirmIdea

	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 1 }
		}
		localization_key = "[This.GetIdeaName1]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 2 }
		}
		localization_key = "[This.GetIdeaName2]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 3 }
		}
		localization_key = "[This.GetIdeaName3]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 4 }
		}
		localization_key = "[This.GetIdeaName4]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 5 }
		}
		localization_key = "[This.GetIdeaName5]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 6 }
		}
		localization_key = "[This.GetIdeaName6]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 7 }
		}
		localization_key = "[This.GetIdeaName7]"
	}
}

defined_text = {
	name = GetConfirmIdeaBonus

	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 1 }
		}
		localization_key = "[This.GetIdeaBonus1]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 2 }
		}
		localization_key = "[This.GetIdeaBonus2]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 3 }
		}
		localization_key = "[This.GetIdeaBonus3]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 4 }
		}
		localization_key = "[This.GetIdeaBonus4]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 5 }
		}
		localization_key = "[This.GetIdeaBonus5]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 6 }
		}
		localization_key = "[This.GetIdeaBonus6]"
	}
	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 7 }
		}
		localization_key = "[This.GetIdeaBonus7]"
	}
}

defined_text = {
	name = GetConfirmIdeaBonusGroupCompleted

	text = {
		trigger = {
			set_temp_variable = { v = confirm_idea_group }
			check_variable = { confirm_idea = 7 }
		}
		localization_key = string_alert_complete_idea_also_gets_idea_bonus
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}

# National Ideas
defined_text = {
	name = GetUnlockedNationalIdeaName

	text = {
		trigger = {
			check_variable = { completed_national_ideas = 1 }
		}
		localization_key = "[This.GetNationalIdeaName1]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 2 }
		}
		localization_key = "[This.GetNationalIdeaName2]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 3 }
		}
		localization_key = "[This.GetNationalIdeaName3]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 4 }
		}
		localization_key = "[This.GetNationalIdeaName4]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 5 }
		}
		localization_key = "[This.GetNationalIdeaName5]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 6 }
		}
		localization_key = "[This.GetNationalIdeaName6]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 7 }
		}
		localization_key = "[This.GetNationalIdeaName7]"
	}
}

defined_text = {
	name = GetUnlockedNationalIdeaBonus

	text = {
		trigger = {
			check_variable = { completed_national_ideas = 1 }
		}
		localization_key = "[This.GetNationalIdeaBonus1]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 2 }
		}
		localization_key = "[This.GetNationalIdeaBonus2]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 3 }
		}
		localization_key = "[This.GetNationalIdeaBonus3]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 4 }
		}
		localization_key = "[This.GetNationalIdeaBonus4]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 5 }
		}
		localization_key = "[This.GetNationalIdeaBonus5]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 6 }
		}
		localization_key = "[This.GetNationalIdeaBonus6]"
	}
	text = {
		trigger = {
			check_variable = { completed_national_ideas = 7 }
		}
		localization_key = "[This.GetNationalIdeaBonus7]"
	}
}

defined_text = {
	name = GetUnlockedNationalIdeaAmbitionIfCompleted

	text = {
		trigger = {
			check_variable = { completed_national_ideas = 7 }
		}
		localization_key = string_completed_national_ideas_alert_ambition
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}

# Top Bar Alerts:
defined_text = {
	name = GetEu4LikeAlertTooltip

	text = {
		trigger = {
			check_variable = { v = 1 }
		}
		localization_key = string_alert_can_take_ideas
	}
	text = {
		trigger = {
			check_variable = { v = 2 }
		}
		localization_key = string_alert_can_take_idea_group
	}
	text = {
		trigger = {
			check_variable = { v = 3 }
		}
		localization_key = string_alert_can_take_policy
	}
}

defined_text = {
	name = GetEu4LikeAlertTooltipDelayed

	text = {
		trigger = {
			check_variable = { v = 1 }
		}
		localization_key = string_alert_can_take_ideas_desc
	}
	text = {
		trigger = {
			check_variable = { v = 2 }
		}
		localization_key = string_alert_can_take_idea_group_desc
	}
	text = {
		trigger = {
			check_variable = { v = 3 }
		}
		localization_key = string_alert_can_take_policy_desc
	}
}

defined_text = {
	name = GetEu4LikeAlertTooltipAdditionalOption

	text = {
		trigger = {
			check_variable = { v = 3 }
		}
		localization_key = string_alert_additional_option
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}

# Dismissed Alerts:
defined_text = {
	name = GetIfEu4LikeAlertIsAddedBack1

	text = {
		trigger = {
			NOT = { has_country_flag = disabled_eu4_like_ideas_alerts_1 }
			has_country_flag = temporarily_disabled_eu4_like_ideas_alerts_1
			NOT = { is_in_array = { eu4_like_ideas_alerts = 1 } }
			can_select_any_idea = yes
			set_temp_variable = { v = 1 }
		}
		localization_key = string_eu4_like_ideas_dismissed_alert
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}

defined_text = {
	name = GetIfEu4LikeAlertIsAddedBack2

	text = {
		trigger = {
			NOT = { has_country_flag = disabled_eu4_like_ideas_alerts_2 }
			has_country_flag = temporarily_disabled_eu4_like_ideas_alerts_2
			NOT = { is_in_array = { eu4_like_ideas_alerts = 2 } }
			can_select_any_idea_group = yes
			set_temp_variable = { v = 2 }
		}
		localization_key = string_eu4_like_ideas_dismissed_alert
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}

defined_text = {
	name = GetIfEu4LikeAlertIsAddedBack3

	text = {
		trigger = {
			NOT = { has_country_flag = disabled_eu4_like_ideas_alerts_3 }
			has_country_flag = temporarily_disabled_eu4_like_ideas_alerts_3
			NOT = { is_in_array = { eu4_like_ideas_alerts = 3 } }
			can_select_any_policy = yes
			set_temp_variable = { v = 3 }
		}
		localization_key = string_eu4_like_ideas_dismissed_alert
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}

# DLCs
defined_text = {
	name = GetConfirmIdeaGroupDLCNotificationManTheGuns

	text = {
		trigger = {
			NOT = { has_dlc = "Man the Guns" }
		}
		localization_key = string_confirm_select_idea_group_dlc_notification_dlc_man_the_guns
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}

defined_text = {
	name = GetConfirmIdeaGroupDLCNotificationLaResistance

	text = {
		trigger = {
			NOT = { has_dlc = "La Resistance" }
		}
		localization_key = string_confirm_select_idea_group_dlc_notification_dlc_la_resistance
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}

defined_text = {
	name = GetConfirmIdeaGroupDLCNotificationTogetherForVictory

	text = {
		trigger = {
			NOT = { has_dlc = "Together for Victory" }
			NOT = { has_dlc = "Death or Dishonor" }
			NOT = { has_dlc = "Waking the Tiger" }
		}
		localization_key = string_confirm_select_idea_group_dlc_notification_dlc_together_for_victory
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}

defined_text = {
	name = GetConfirmIdeaGroupDLCNotificationDeathOrDishonor

	text = {
		trigger = {
			NOT = { has_dlc = "Death or Dishonor" }
		}
		localization_key = string_confirm_select_idea_group_dlc_notification_dlc_death_or_dishonor
	}
	text = {
		trigger = {
			always = yes
		}
		localization_key = ""
	}
}