using System;
using System.Collections.Generic;
using FinancialChartExplorer.Models;
using Microsoft.AspNet.Mvc;

namespace FinancialChartExplorer.Controllers
{
    public partial class HomeController : Controller
    {
        public ActionResult MovingAverages()
        {
            var model = BoxData.GetDataFromJson();
            ViewBag.DemoSettingsModel = new ClientSettingsModel() { Settings = CreateMovingAveragesSettings() };
            return View(model);
        }

        private static IDictionary<string, object[]> CreateMovingAveragesSettings()
        {
            var settings = new Dictionary<string, object[]>
            {
                {"Period", new object[]{"5","10","15","20","25","30"}},
                {"Type", new object[]{"Exponential","Simple","Triangular","Weighted"}},
            };

            return settings;
        }

    }
}
