@using Zap.BI.Portal
@using Zap.BI.Portal.Models
@model HomeViewModel

<script>
    if (!Object.create) {
        location.href = '@Url.Action("UnsupportedDocumentMode", "Error", new { originalUrl = Request.RawUrl }, Request.Url.Scheme)';
    }
    window.pageKey = '@PageKey.Current';
</script>

@section Css
{
    <style>@Model.SplashCss</style>
    <link href="@Url.Action("Consumer", "Css", new { hash = Model.AllCssHash, linkId = Model.LinkId, pageKey = PageKey.Current })" rel="stylesheet" type="text/css" />
}

@section Scripts
{
    <script defer src="@Url.Action("Consumer", "ClientObjects", new { hash = Model.ClientObjectsScriptsHash, linkId = Model.LinkId, pageKey = PageKey.Current })" type="text/javascript"></script>
    <script defer src="@Url.Action("File", "Content", new { path = "BI/Portal/dist/consumer.js" })" type="text/javascript"></script>
}

@Html.AntiForgeryToken()

<div id="consumerRoot" consumer-root fullscreen-root navigation-classes ng-class="::'is-consumerScriptsLoaded'"></div>

@*Note: The splash is outside the angular application so that it appears as soon as possible*@
@Model.SplashHtml

@*Needs to come after splash HTML*@
<script> @Model.SplashScript </script>