use freecs::Entity;

/// Establishes a parent-child hierarchy relationship.
///
/// When an entity has a [`Parent`], its [`super::LocalTransform`] is relative to
/// the parent's world-space transform. The transform propagation system computes
/// [`super::GlobalTransform`] by multiplying transforms up the hierarchy.
///
/// Use `Parent(None)` to explicitly mark an entity as a root (equivalent to no Parent component).
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, serde::Serialize, serde::Deserialize)]
pub struct Parent(pub Option<Entity>);
