#####################

###  ##  #  # # #  ## 
 #  #  # ## # # # #   
 #  #### # ## ##   #  
 #  #  # #  # # #   # 
 #  #  # #  # # # ## 

 #################### 

 BRA_bernadini_organization = {
 	include = generic_medium_tank_organization
 	icon = GFX_idea_BRA_bernardini
 	allowed = {	
 		has_dlc = "Trial of Allegiance"
 		tag = BRA 
 	}

 	available = {
 		IF = {
 			limit = {
 				FROM = { NOT = { original_tag = BRA } }
 			}
 			FROM = { NOT = { has_war_with = BRA } }
 		}
 		ELSE = { #original_tag = BRA
 			FROM = {
 				OR = {
 					has_completed_focus = SMB_domestic_production
 					has_completed_focus = SMB_foreign_designs
 				}
 			}
 		} 
 	}
 }


#####################

 ## #  # ### ###   ## 
#   #  #  #  #  # #   
 #  ####  #  ###   #  
  # #  #  #  #      # 
##  #  # ### #    ##  
 
#####################



BRA_amrj_organization = {
	include = generic_escort_ship_organization
	icon = GFX_idea_BRA_arsenal_de_marinha
	allowed = {
		has_dlc = "Trial of Allegiance"
		# TODO_JUNO: Add correct DLC check!
		tag = BRA 
	}

	available = {
		IF = {
			limit = {
				FROM = { NOT = { original_tag = BRA } }
			}
			FROM = { NOT = { has_war_with = BRA } }
		}
		ELSE = { #original_tag = BRA
			FROM = {
				controls_state = 500 #Rio de Janeiro
			}
		} 
	}
}




###########################

###  #    ##  #  # ###  ## 
#  # #   #  # ## # #   #   
###  #   #### # ## ##   #  
#    #   #  # #  # #     # 
#    ### #  # #  # ### ##  

###########################

BRA_embraer_organization = {
	include = generic_general_aircraft_organization
	icon = GFX_idea_BRA_embraer
	allowed = {	
		has_dlc = "Trial of Allegiance"
		# TODO_JUNO: Add correct DLC check!
		tag = BRA 
	}

	available = {
		IF = {
			limit = {
				FROM = { NOT = { original_tag = BRA } }
			}
			FROM = { NOT = { has_war_with = BRA } }
		}
		ELSE = {
			FROM = {
				OR = {
					has_completed_focus = SMB_establish_aircraft_industry
				}
			}
		}
	}
}




################################### 

#   #  ##  ### ### ###  ### ### #   
## ## #  #  #  #   #  #  #  #   #   
# # # ####  #  ##  ###   #  ##  #   
#   # #  #  #  #   #  #  #  #   #   
#   # #  #  #  ### #  # ### ### ### 


###################################

BRA_rossi_organization = {
	include = generic_infantry_equipment_organization
	icon = GFX_idea_BRA_rossi
	allowed = { 

		has_dlc = "Trial of Allegiance"
		tag = BRA
	}
}

BRA_cbc_organization = {
	include = generic_support_equipment_organization
	#icon = GFX_idea_generic_infantry_equipment_manufacturer_1
	allowed = { 

		has_dlc = "Trial of Allegiance"
		tag = BRA
	}
}

BRA_ddam_organization = {
	include = generic_artillery_organization
	#icon = GFX_idea_generic_infantry_equipment_manufacturer_1
	allowed = { 
		has_dlc = "Trial of Allegiance"
		tag = BRA
	}
}

BRA_fnm_organization = {
	include = generic_motorized_mechanized_organization
	icon = GFX_idea_BRA_fnm
	allowed = { 

		has_dlc = "Trial of Allegiance"
		tag = BRA
	}
	available = { 
		IF = {
			limit = {
				FROM = { NOT = { original_tag = BRA } }
			}
			FROM = { NOT = { has_war_with = BRA } }
		}
		ELSE = {
			FROM = { 
				OR = { 
					has_completed_focus = SMB_motorized 
					has_completed_focus = BRA_fabrica_nacional_de_motores
				}
		}
	}
}

