use super::model::WorldSummaryFields;
use crate::RuntimeState;

pub(super) fn fill_world_economy_fields(fields: &mut WorldSummaryFields, state: &RuntimeState) {
    fields.world_restore_issue_37_value = state.world_restore.issue_37_value;
    fields.world_restore_issue_38_value = state.world_restore.issue_38_value;
    fields.world_restore_issue_39_value = state.world_restore.issue_39_value;
    fields.world_restore_issue_3a_value = state.world_restore.issue_3a_value;
    fields.world_restore_issue_37_multiplier_raw_u32 =
        state.world_restore.issue_37_multiplier_raw_u32;
    fields.world_restore_issue_37_multiplier_value_f32_text = state
        .world_restore
        .issue_37_multiplier_value_f32_text
        .clone();
    fields.world_restore_finance_neighborhood_count =
        state.world_restore.finance_neighborhood_candidates.len();
    fields.world_restore_finance_neighborhood_labels = state
        .world_restore
        .finance_neighborhood_candidates
        .iter()
        .map(|candidate| candidate.label.clone())
        .collect();
    fields.world_restore_economic_tuning_mirror_raw_u32 =
        state.world_restore.economic_tuning_mirror_raw_u32;
    fields.world_restore_economic_tuning_mirror_value_f32_text = state
        .world_restore
        .economic_tuning_mirror_value_f32_text
        .clone();
    fields.world_restore_economic_tuning_lane_count =
        state.world_restore.economic_tuning_lane_raw_u32.len();
    fields.world_restore_economic_tuning_lane_value_f32_text = state
        .world_restore
        .economic_tuning_lane_value_f32_text
        .clone();
}
