module Mischief.ECS.Relationships.ChildOf where

import Mischief.ECS.Components
import Mischief.ECS.Entities
import Mischief.ECS.Relationships.Graph
import Mischief.ECS.World
import Mischief.ECS.World.Query
import Mischief.ECS.World.Query.Queryable

data ChildOf = ChildOf deriving (Int -> ChildOf -> ShowS
[ChildOf] -> ShowS
ChildOf -> String
(Int -> ChildOf -> ShowS)
-> (ChildOf -> String) -> ([ChildOf] -> ShowS) -> Show ChildOf
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChildOf -> ShowS
showsPrec :: Int -> ChildOf -> ShowS
$cshow :: ChildOf -> String
show :: ChildOf -> String
$cshowList :: [ChildOf] -> ShowS
showList :: [ChildOf] -> ShowS
Show)

instance Component ChildOf where
  type RelExclusivity ChildOf = Exclusive

-- parent :: forall m w. (MonadSystem w m) => Entity -> m (Maybe Entity)
-- parent entity = do
--   p <- outgoing @ChildOf entity
--   return $ case p of
--     [p] -> Just p
--     _ -> Nothing

-- children :: forall m w. (MonadSystem w m) => Entity -> m [Entity]
-- children = outgoing @ChildOf