using Microsoft.AspNetCore.Mvc;
using Nop.Services.Catalog;
using Nop.Web.Framework.Components;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Nop.Web.Components
{
    public class HomepageVideoB2CViewComponent : NopViewComponent
    {
        private readonly IProductServiceB2C _productServiceB2C;

        public HomepageVideoB2CViewComponent(IProductServiceB2C productServiceB2C)
        {
            _productServiceB2C = productServiceB2C;
        }

        public IViewComponentResult Invoke()
        {
            var models = _productServiceB2C.GetProductVideos();

            return View(models);
        }
    }
}
