using Microsoft.AspNetCore.Mvc;
using kehati.Models.View;

namespace kehati.Controllers
{
    public class MapController : Controller
    {
        public IActionResult Index()
        {
            var model = new HomeViewModel
            {
            FeaturedLocations = new List<LokasiModel>
                {
                    new()
                    {
                        Slug = "tebet-eco-park",
                        Name = "Tebet Eco Park",
                        Region = "Jakarta Selatan",
                        Area = "15.3 Ha",
                        Latitude = "-6.236993826064424",
                        Longitude = "106.85290802883573",
                        FloraCount = 45,
                        FaunaCount = 20,
                        Image = "loc-tebet.jpg"
                    },
                    new()
                    {
                        Slug = "hutan-kota-srengseng",
                        Name = "Hutan Kota Srengseng",
                        Image = "loc-srengseng.jpg",
                        Region = "Jakarta Barat",
                        Area = "15.3 Ha",
                        Latitude = "",
                        Longitude = "",
                        FloraCount = 45,
                        FaunaCount = 20
                    },

                    new()
                    {
                        Slug = "mangrove-angke",
                        Name = "Hutan Mangrove Angke",
                        Region = "Jakarta Barat",
                        Area = "15.3 Ha",
                        Latitude = "",
                        Longitude = "",
                        FloraCount = 45,
                        FaunaCount = 20,
                        Image = "loc-mangrove-pik.jpg"
                    }
                }
            };
            return View(model);
        }

        public IActionResult Detail(string slug)
        {
            ViewBag.Slug = slug;
            return View();
        }
    }
}