using Microsoft.AspNetCore.Mvc;

// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

namespace BHServer.Controllers
{
    public class AssaultTroopController : ControllerBase
    {
        List<string> MockData = [
            "{\"id\": 1, \"name\": \"First Infantry Division\", \"faction\": 2, \"type\": 1, \"province\": 0, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 1}",
            "{\"id\": 2, \"name\": \"First Infantry Division\", \"faction\": 1, \"type\": 1, \"province\": 0, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 2}",
            "{\"id\": 3, \"name\": \"Second Infantry Division\", \"faction\": 1, \"type\": 1, \"province\": 0, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 2}",
            "{\"id\": 4, \"name\": \"Third Infantry Division\", \"faction\": 1, \"type\": 1, \"province\": 0, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 2}",
            "{\"id\": 5, \"name\": \"Cheeki Breeki Boys\", \"faction\": 2, \"type\": 1, \"province\": 0, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 3}",
            "{\"id\": 6, \"name\": \"Hitler\\'s Men\", \"faction\": 2, \"type\": 1, \"province\": 1, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 4}",
            "{\"id\": 7, \"name\": \"Hitler\\'s Men\", \"faction\": 2, \"type\": 1, \"province\": 1, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 4}",
            "{\"id\": 8, \"name\": \"Hitler\\'s Men\", \"faction\": 2, \"type\": 1, \"province\": 1, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 4}",
            "{\"id\": 9, \"name\": \"Cheeki Breeki Boys\", \"faction\": 2, \"type\": 1, \"province\": 1, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 3}",
            "{\"id\": 10, \"name\": \"Hitler\\'s Men\", \"faction\": 2, \"type\": 1, \"province\": 0, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 4}",
            "{\"id\": 11, \"name\": \"Fifth Infantry Division\", \"faction\": 1, \"type\": 1, \"province\": -1, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 5}",
            "{\"id\": 12, \"name\": \"Fifth Infantry Division\", \"faction\": 1, \"type\": 1, \"province\": -1, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 5}",
            "{\"id\": 13, \"name\": \"First Armor Division\", \"faction\": 1, \"type\": 4, \"province\": 2, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 2}",
            "{\"id\": 14, \"name\": \"Second Armor Division\", \"faction\": 1, \"type\": 4, \"province\": 2, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 2}",
            "{\"id\": 15, \"name\": \"Cheeki Breeki Tonks\", \"faction\": 2, \"type\": 4, \"province\": 2, \"orders\": {\"Dep\": [], \"Mov\": []}, \"owner\": 3}"
        ];

        // GET: /<APIController>
        [HttpGet]
        public IEnumerable<string> Get()
        {
            return MockData;
        }

        // GET /<APIController>/5
        [HttpGet("{id}")]
        public string Get(int id)
        {
            var entry = MockData.ElementAt(id);
            return entry;
        }

        // POST /<APIController>
        [HttpPost]
        public void Post([FromBody] string value)
        {
        }

        // PUT /<APIController>/5
        [HttpPut("{id}")]
        public void Put(int id, [FromBody] string value)
        {
        }

        // DELETE /<APIController>/5
        [HttpDelete("{id}")]
        public void Delete(int id)
        {
        }
    }
}
