@*   Xafari Framework version : 17.2.3011.1336   *@

@using Xafari.Mvc
@using Xafari.Mvc.Templates

@{
    MvcWindowTemplate windowTemplate = null;
    
    var isContent = this.ViewData.Model != null;
    if(isContent)
    { 
        windowTemplate = (MvcWindowTemplate)this.Model.Template;
        this.ViewBag.Title = !string.IsNullOrWhiteSpace(windowTemplate.Caption) ? windowTemplate.Caption : "";
    }
}

@if (isContent && windowTemplate != null)
{
<script type="text/javascript" id="@Html.DXScriptId()">
    if (window.xafari && window.xafari.windowInfo) {
        window.xafari.windowInfo.windowId = "@this.ViewData.Window().WindowId()";
    }
</script>

    @Html.Xafari().MvcControl(windowTemplate).GetHtml()

    @Html.Partial(ModelForNotifyWindowCloseControl.NotifyWindowCloseControlTemplate, new ModelForNotifyWindowCloseControl(this.ViewData.Model))
}