// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/dijit/geoenrichment/ReportPlayer/dataProviders/commands/PrintReportCommand","dojo/_base/declare dojo/Deferred dojo/when dojo/dom-construct ./CreateHTMLCommand esri/dijit/geoenrichment/utils/DomUtil esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/DocumentOptions ./supportClasses/PlayerCommands dojo/i18n!../../../../../nls/jsapi".split(" "),function(f,k,l,g,m,h,r,n,a){a=a.geoenrichment.dijit.ReportPlayer.ReportPlayer;var q=f(null,{_layoutNode:null,_originalChildren:null,_printNode:null,
_html:null,_propMemo:null,setUpDocument:function(d,a){var b=document.body,e=b.children,c;for(c in e)h.hide(e[c]);c=document.getElementsByTagName("html")[0];var p=[c.style.overflow,b.style.overflow,b.style.margin];c.style.overflow="visible";b.style.overflow="visible";b.style.margin="0px";this._propMemo=p;this._html=c;this._layoutNode=b;this._originalChildren=e;this._printNode=g.create("div",{style:"display: inline-block;",innerHTML:d},b);this._setUpPageSize(a)},_setUpPageSize:function(d){},unSetDocument:function(){g.destroy(this._printNode);
this._html.style.overflow=this._propMemo[0];this._layoutNode.style.overflow=this._propMemo[1];this._layoutNode.style.margin=this._propMemo[2];for(var d in this._originalChildren)h.show(this._originalChildren[d])}});return f(m,{id:n.PRINT,label:a.printCommandLabel,errorMessage:a.printError,_saveFiles:!1,_mode:"svg",execute:function(d,a,b){return l(this.inherited(arguments),function(b){if(b.svgStrings){var c=new q;c.setUpDocument(b.svgStrings.join(""),b.documentOptions);var a=new k;setTimeout(function(){window.print();
c.unSetDocument();a.resolve()});return a.promise}})},_handleError:function(a){console.log(a);alert("Can't print the report. Please try again later.")}})});