using UnityEngine;
using UnityEngine.AI;

namespace ftt.Gameplay.AI
{
    public class MinotaurNodeData
    {
        MinotaurEntity entity;

        public MinotaurNodeData(MinotaurEntity entity) { this.entity = entity; }

        NavMeshAgent agent;
        LayerMask occlusionLayers;
        Transform target;
        float moveSpeed;
        Transform[] patrolPoints;
        float idleTimeOnPatrol;
        float refreshTimeAfterChase;
        float pointDistanceOffset;
        int currentWaypointIndex = 0;
        bool targetFound;
        float minimumDistanceToCatch;

        public float GetMovementSpeed => moveSpeed;
        public Transform[] GetPatrolPoints => patrolPoints;
        public NavMeshAgent GetNavMeshAgent => agent;
        public Transform GetTarget => target;
        public float GetIdleTimeOnPatrol => idleTimeOnPatrol;
        public float GetRefreshPatrolTime => refreshTimeAfterChase;
        public float GetPointDistanceOffset => pointDistanceOffset;
        public int GetCurrentWaypointIndex => currentWaypointIndex;
        public bool GetTargetFound => targetFound;
        public LayerMask GetOcclusionLayers => occlusionLayers;
        public float GetMinimumDistanceToCatch => minimumDistanceToCatch;

        public void SetMovementSpeed(float value) => moveSpeed = value;
        public void SetPatrolPoints(Transform[] value) => patrolPoints = value;
        public void SetNavMeshAgent(NavMeshAgent value) => agent = value;
        public void SetIdleTimeOnPatrol(float value) => idleTimeOnPatrol = value;
        public void SetRefreshPatrolTime(float value) => refreshTimeAfterChase = value;
        public void SetPointDistanceOffset(float value) => pointDistanceOffset = value;
        public void SetCurrentWaypointIndex(int value) => currentWaypointIndex = value;
        public void SetTargetFound(bool value) => targetFound = value;
        public void SetTarget(Transform value) => target = value;
        public void SetOcclusionLayers(LayerMask value) => occlusionLayers = value;
        public void SetMinimumDistanceToCatch(float value) => minimumDistanceToCatch = value;
    }
}