use crate::inspect::smp::*;

pub(in crate::inspect::smp) fn real_grouped_company_target(
    ordinal: u8,
) -> Option<RuntimeCompanyTarget> {
    match ordinal {
        0 => Some(RuntimeCompanyTarget::ConditionTrueCompany),
        1 => Some(RuntimeCompanyTarget::SelectedCompany),
        2 => Some(RuntimeCompanyTarget::HumanCompanies),
        3 => Some(RuntimeCompanyTarget::AiCompanies),
        _ => None,
    }
}

pub(in crate::inspect::smp) fn real_grouped_player_target(
    ordinal: u8,
) -> Option<RuntimePlayerTarget> {
    match ordinal {
        0 => Some(RuntimePlayerTarget::ConditionTruePlayer),
        1 => Some(RuntimePlayerTarget::SelectedPlayer),
        2 => Some(RuntimePlayerTarget::HumanPlayers),
        3 => Some(RuntimePlayerTarget::AiPlayers),
        _ => None,
    }
}

pub(in crate::inspect::smp) fn real_grouped_chairman_target(
    ordinal: u8,
) -> Option<RuntimeChairmanTarget> {
    match ordinal {
        0 => Some(RuntimeChairmanTarget::ConditionTrueChairman),
        1 => Some(RuntimeChairmanTarget::SelectedChairman),
        2 => Some(RuntimeChairmanTarget::HumanChairmen),
        3 => Some(RuntimeChairmanTarget::AiChairmen),
        _ => None,
    }
}

pub(in crate::inspect::smp) fn real_grouped_chairman_target_supported_in_runtime(
    ordinal: u8,
) -> bool {
    real_grouped_chairman_target(ordinal).is_some()
}
