use bevy::prelude::*;
use std::path::PathBuf;
#[derive(Component, Reflect, Default, Clone, Debug)]
#[type_path = "jackdaw::prefab::components"]
#[reflect(Component, Default)]
pub struct Prefab;
#[derive(Component, Reflect, Clone, Copy, Debug, Eq, PartialEq, Hash)]
#[type_path = "jackdaw::prefab::components"]
#[reflect(Component)]
pub struct PrefabEntityId(
pub u32,
);
#[derive(Component, Reflect, Clone, Debug, Default)]
#[type_path = "jackdaw::prefab::components"]
#[reflect(Component, Default)]
pub struct IsA {
pub source: PathBuf,
pub deleted: Vec<u32>,
}
pub use jackdaw_bsn::PREFAB_TYPE;
pub const PREFAB_ENTITY_ID_TYPE: &str = "jackdaw::prefab::components::PrefabEntityId";
pub const ISA_TYPE: &str = "jackdaw::prefab::components::IsA";
#[cfg(test)]
mod tests {
use super::*;
use bevy::reflect::TypePath;
#[test]
fn the_components_keep_the_names_saved_scenes_spell() {
assert_eq!(<Prefab as TypePath>::type_path(), PREFAB_TYPE);
assert_eq!(
<PrefabEntityId as TypePath>::type_path(),
PREFAB_ENTITY_ID_TYPE
);
assert_eq!(<IsA as TypePath>::type_path(), ISA_TYPE);
}
}