use std::path::Path;

use crate::inspect::smp::services::{
    SmpInfrastructureAssetTraceReport, build_infrastructure_asset_trace_report,
};
use crate::inspect::smp::world::inspect_save_company_and_chairman_analysis_file;

pub fn inspect_save_infrastructure_asset_trace_file(
    path: &Path,
) -> Result<SmpInfrastructureAssetTraceReport, Box<dyn std::error::Error>> {
    let analysis = inspect_save_company_and_chairman_analysis_file(path)?;
    Ok(build_infrastructure_asset_trace_report(&analysis))
}
