using System;
using UnityEngine.UIElements;
namespace Alchemy.Editor
{
///
/// Base class for implementing Alchemy group attribute drawing process.
///
public abstract class AlchemyGroupDrawer
{
///
/// Create a visual element that will be the root of the group.
///
/// Label text
public abstract VisualElement CreateRootElement(string label);
///
/// Returns the corresponding visual element when the root visual element differs depending on the attribute value.
///
/// Target attribute
public virtual VisualElement GetGroupElement(Attribute attribute) => null;
///
/// ID used to identify the group.
///
public string UniqueId => uniqueId;
string uniqueId;
internal void SetUniqueId(string id)
{
this.uniqueId = id;
}
}
}