#nullable enable


namespace TagFighter.Effects.Steps
{
    using System.Collections.Generic;

    [StepType(StepTypeAttribute.GetterStep)]
    public class CircleAreaGet : OutputStep<IAreaOfEffect>
    {
        [UnityEngine.SerializeField]
        SinglePort<double> _radius = new() {
            DisplayName = "Radius"
        };

        public override IEnumerable<IPort> Inputs {
            get {
                yield return _radius;
            }
        }
        public override string ToString() => "Circle AOE";

        public override IAreaOfEffect Run(EffectInput blackBoard) => new CircleArea() {
            Radius = (float)(_radius.Node != null ? _radius.Node.Run(blackBoard) : default),
        };

        public override bool IsValid => true;
    }
}