using ladaexpress.vn.Infrastructures.Services;
using Microsoft.AspNetCore.Mvc;

namespace ladaexpress.vn.Controllers
{
    public class TagController : Controller
    {
        private readonly ITagService _tagService;

        public TagController(ITagService tagService)
        {
            _tagService = tagService;
        }

        public async Task<IActionResult> Index()
        {
            return View();


            //var model = await _tagService.PrepareTagDetail();
            //if (model.Id > 0)
            //{
            //    return View(model);
            //}
            //else
            //{
            //    return NotFound();
            //}
        }

        public async Task<IActionResult> Detail(int id)
        {
            var model = await _tagService.PrepareTagDetail(id);
            if (model.Id > 0)
            {
                return View(model);
            }
            else
            {
                return NotFound();
            }
        }
    }
}
