# This decision is only for AI, since it's still stupid and doesn't always activate health laws
# Since demographic mechanics are pretty strong, it might be worth to help advanced AI to activate healthcare laws in certain conditions
ztr_population_measure_decision = {
	is_shown = {
		# The country should be a bit advanced technologically and economically
		has_technology_researched = central_planning
		OR = {
			has_modifier = dev_5_country
			has_modifier = dev_6_country
			has_modifier = dev_7_country
			has_modifier = dev_8_country
		}
		# The country should have a poor healthcare system
		OR = {
			has_law_or_variant = law_type:law_no_health_system
			has_law_or_variant = law_type:law_charitable_health_system
		}
		# The country should not be Russia (to avoid population boom issues)
		NOT = {
			c:RUS = this
		}
	}
	possible = {
		# The country should be in an advanced demographic stage
		OR = {
			has_modifier = demographic_stage_6
			has_modifier = demographic_stage_7
			has_modifier = demographic_stage_8
		}
		# The country should not have a strong devout influence
		NOT = {
			ig:ig_devout = {
				is_powerful = yes
			}
		}
	}
	when_taken = {
		# Public choice
		if = {
			limit = {
				AND = {
					ig:ig_intelligentsia = {
						is_powerful = yes
					}
					ig:ig_trade_unions = {
						is_powerful = yes
					}
				}
			}
			activate_law = law_type:law_public_health_insurance
		}
		# Private choice
		else_if = {
			limit = {
				AND = {
					ig:ig_petty_bourgeoisie = {
						is_powerful = yes
					}
					ig:ig_industrialists = {
						is_powerful = yes
					}
				}
			}
			activate_law = law_type:law_private_health_insurance
		}
		# Mixed choice
		else_if = {
			limit = {
				AND = {
					ig:ig_intelligentsia = {
						is_powerful = yes
					}
					ig:ig_industrialists = {
						is_powerful = yes
					}
				}
			}
			activate_law = law_type:law_private_health_insurance
		}
		else_if = {
			limit = {
				AND = {
					ig:ig_intelligentsia = {
						is_powerful = yes
					}
					ig:ig_petty_bourgeoisie = {
						is_powerful = yes
					}
				}
			}
			activate_law = law_type:law_private_health_insurance
		}
		# Single choice
		else_if = {
			limit = {
				OR = {
					ig:ig_trade_unions = {
						is_powerful = yes
					}
					ig:ig_intelligentsia = {
						is_powerful = yes
					}
				}
			}
			activate_law = law_type:law_public_health_insurance
		}
		else_if = {
			limit = {
				OR = {
					ig:ig_industrialists = {
						is_powerful = yes
					}
					ig:ig_petty_bourgeoisie = {
						is_powerful = yes
					}
				}
			}
			activate_law = law_type:law_private_health_insurance
		}
		else = {
			activate_law = law_type:law_public_health_insurance
		}
	}
	ai_chance = {
		value = 100
	}
}
