use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
#[serde(rename_all = "snake_case")]
pub enum RuntimeCargoClass {
    #[default]
    Other,
    Factory,
    FarmMine,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "kind", rename_all = "snake_case")]
pub enum RuntimeCompanyTarget {
    AllActive,
    HumanCompanies,
    AiCompanies,
    SelectedCompany,
    ConditionTrueCompany,
    Ids { ids: Vec<u32> },
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "kind", rename_all = "snake_case")]
pub enum RuntimePlayerTarget {
    AllActive,
    HumanPlayers,
    AiPlayers,
    SelectedPlayer,
    ConditionTruePlayer,
    Ids { ids: Vec<u32> },
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "kind", rename_all = "snake_case")]
pub enum RuntimeChairmanTarget {
    AllActive,
    HumanChairmen,
    AiChairmen,
    SelectedChairman,
    ConditionTrueChairman,
    Ids { ids: Vec<u32> },
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "kind", rename_all = "snake_case")]
pub enum RuntimeCargoPriceTarget {
    All,
    Named { name: String },
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "kind", rename_all = "snake_case")]
pub enum RuntimeCargoProductionTarget {
    All,
    Factory,
    FarmMine,
    Named { name: String },
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "kind", rename_all = "snake_case")]
pub enum RuntimeTerritoryTarget {
    AllTerritories,
    Ids { ids: Vec<u32> },
}
