use std::path::PathBuf;
use lighty_loaders::types::{version_metadata::Mods, VersionInfo};
use crate::errors::InstallerResult;
#[cfg(feature = "events")]
use lighty_event::EventBus;
use super::asset_partition;
pub async fn collect_mod_tasks(
version: &impl VersionInfo,
mods: &[Mods],
) -> (Vec<(String, PathBuf)>, u64) {
asset_partition::collect(version, mods, "mods", true).await
}
pub async fn download_mods(
tasks: Vec<(String, PathBuf)>,
#[cfg(feature = "events")] event_bus: Option<&EventBus>,
) -> InstallerResult<()> {
asset_partition::download(
tasks,
"mods",
#[cfg(feature = "events")]
event_bus,
)
.await
}