#[cfg(feature = "assets")]
use crate::ecs::prefab::GltfLoadResult;

#[cfg(all(feature = "fbx", not(target_arch = "wasm32")))]
use crate::ecs::prefab::FbxLoadResult;

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AssetLoadHandle(pub u64);

#[derive(Debug, Clone)]
pub enum AssetLoadStatus<T> {
    Loading,
    Ready(T),
    Failed(String),
}

#[cfg(feature = "assets")]
pub enum LoadedAsset {
    Gltf(Box<GltfLoadResult>),
    #[cfg(all(feature = "fbx", not(target_arch = "wasm32")))]
    Fbx(Box<FbxLoadResult>),
    Texture {
        name: String,
        rgba_data: Vec<u8>,
        width: u32,
        height: u32,
    },
    RawBytes(Vec<u8>),
}

#[cfg(not(feature = "assets"))]
pub enum LoadedAsset {
    RawBytes(Vec<u8>),
}

pub enum AssetLoadResult {
    Success(LoadedAsset),
    Failure(String),
}
