using Intrepid.Gameplay.Journey;
using Intrepid.Utilities;
using UnityEngine;

namespace Intrepid.Gameplay.Prototyping.Sockets
{
    public class StageSocketDeploymentPoint : MonoBehaviour
    {
        [GroupInjections, SerializeField] private InteractableSocketModelPrototype socket;
        
        public Vector3 DeploymentPoint => transform.position;
        public Vector2 DeploymentDirection => JSocketFaceUtils.DeploymentDirection(socket.SocketFace);
        
#if UNITY_EDITOR
        private void OnDrawGizmos()
        {
            Gizmos.color = Color.yellow;
            Gizmos.DrawWireSphere(DeploymentPoint, .5f);
            Gizmos.DrawLine(DeploymentPoint, DeploymentPoint + 2f * new Vector3(DeploymentDirection.x, 0, DeploymentDirection.y));
        }
#endif
    }
}