// MIT License - Copyright (c) 2025 wallstop
// Full license text: https://github.com/wallstop/unity-helpers/blob/main/LICENSE
namespace WallstopStudios.UnityHelpers.Core.Attributes
{
using System;
using System.Collections.Generic;
using UnityEngine;
///
/// Contract for services that assign relational components (parent/child/sibling) to
/// decorated fields.
///
public interface IRelationalComponentAssigner
{
///
/// Returns true when the supplied component type has at least one field decorated with a
/// relational attribute.
///
bool HasRelationalAssignments(Type componentType);
///
/// Assigns relational component references for a single component instance if any decorated
/// fields are present.
///
void Assign(Component component);
///
/// Assigns relational component references for a collection of component instances.
///
void Assign(IEnumerable components);
///
/// Recursively assigns relational component references for all components found beneath the
/// supplied root GameObject.
///
void AssignHierarchy(GameObject root, bool includeInactiveChildren = true);
}
}