using System.Web.Optimization;

namespace StubAP
{
    public class BundleConfig
    {
        /// <summary>
        /// Bundle Config settings file
        /// </summary>
        /// <param name="bundles">Set of bundles</param>
        public BundleConfig(BundleCollection bundles)
        {
            CreateCSSBundle(bundles);
            //CreateJSBundle(bundles);

            BundleTable.EnableOptimizations = true;
        }

        /// <summary>
        /// Create CSS Bundles
        /// </summary>
        /// <param name="bundles">Set of bundles</param>
        public void CreateCSSBundle(BundleCollection bundles)
        {
            bundles.Add(new StyleBundle("~/style").Include("~/Content/css/style.css"));
            //bundles.Add(new StyleBundle("~/jquery-ui").Include(
            //    "~/Content/themes/stub/css/jquery-ui.css",
            //    "~/Content/themes/stub/css/jquery-ui.structure.css",
            //    "~/Content/themes/stub/css/jquery-ui.theme.css"));
        }

        /// <summary>
        /// Create JS Bundles
        /// </summary>
        /// <param name="bundles">Set of bundles</param>
        public void CreateJSBundle(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Content/themes/stub/js/jquery-{version}.js"));
            bundles.Add(new ScriptBundle("~/bundles/jquery-ui").Include(
                        "~/Content/themes/stub/js/jquery-ui.js"));
            bundles.Add(new ScriptBundle("~/bundles/platform").Include(
                        "~/Content/themes/stub/js/platform.js"));
        }
    }
}