@*   Xafari Framework version : 17.2.3011.1336   *@

@using PopupWindow = Xafari.Mvc.PopupWindow

@model Xafari.ReportsV2.Mvc.MVCx.ReportWebViewerDetailItem

@Html.DevExpress().WebDocumentViewer(settings =>
{
	settings.Name = "xafReportViewer";

	if (this.Model.PopupMode)
	{
		settings.Height = PopupWindow.WindowHeight;
	}
	settings.ClientSideEvents.Init = "function(s, e) { s.previewModel.reportPreview.zoom(1); }";
	settings.ControlStyle.CssClass = "dx-viewport";
	settings.Init += (sender, args) =>
	{
		var mvcxWebDocumentViewer = sender as MVCxWebDocumentViewer;
		if(mvcxWebDocumentViewer == null) return;

		this.Model.ApplyCurrentTheme(mvcxWebDocumentViewer);
	};
}).Bind(this.Model.report).GetHtml()