using Cysharp.Threading.Tasks;
using YachtDice.Modifiers.Core;
using YachtDice.Modifiers.Pipeline;

namespace YachtDice.Events
{
    public class GameEventBus
    {
        private readonly ModifierPipeline pipeline;

        public GameEventBus(ModifierPipeline pipeline)
        {
            this.pipeline = pipeline;
        }

        public UniTask<ModifierContext> Fire(TriggerType trigger, ModifierContext context)
        {
            return pipeline.Execute(trigger, context);
        }
    }
}
