using Intrepid.GameManagers;
using Intrepid.Gameplay.Entities.Player.ActionBelt;
using Intrepid.Gameplay.Messages.Events;
using Intrepid.Localization;
using Intrepid.Utilities;
using UnityEngine;

namespace Intrepid.Gameplay.Prototyping.SaveStations
{
    public class SaveStageActionCallable : ActionCallable
    {
        [GroupInjections, SerializeField] private InteractableSaveStationModelPrototype saveStationModelPrototype;
        [GroupConfigurations, SerializeField] private LocalizationTag actionLocalization;
        [GroupConfigurations, SerializeField] private LocalizationTag descriptionLocalization;

        protected override LocalizationTag ActionLocalization => actionLocalization;
        protected override LocalizationTag DescriptionLocalization => descriptionLocalization;

        protected override void Execute(ActionIdentifier identifier)
        {
            Proxy.Instance.EventBus.Raise(new SaveStationActionExecutedEvent
            {
                StageTag = saveStationModelPrototype.StageTag,
                DeploymentPoint = saveStationModelPrototype.DeploymentPoint
            });
        }
    }
}