// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
require({cache:{"url:widgets/Geoprocessing/setting/ParamSetting.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"section common-property"\x3e\r\n    \x3cdiv class\x3d"field"\x3e\r\n      \x3clabel class\x3d"jimu-ellipsis" title\x3d"${nls.label}"\x3e${nls.label}:\x3c/label\x3e\r\n      \x3cinput data-dojo-type\x3d"dijit/form/TextBox" data-dojo-attach-point\x3d"label" class\x3d"common-input"\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"field"\x3e\r\n      \x3clabel class\x3d"jimu-ellipsis" title\x3d"${nls.tooltip}"\x3e${nls.tooltip}:\x3c/label\x3e\r\n      \x3cinput data-dojo-type\x3d"dijit/form/TextBox" data-dojo-attach-point\x3d"tooltip" class\x3d"common-input"\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- for input parameter --\x3e\r\n    \x3cdiv class\x3d"field" data-dojo-attach-point\x3d"visibleDiv"\x3e\r\n      \x3cdiv data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"visible" class\x3d"visibleCheck"\x3e\x3c/div\x3e\r\n      \x3clabel class\x3d"visibleLabel"\x3e${nls.visible}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- for output parameter --\x3e\r\n    \x3cdiv class\x3d"field" data-dojo-attach-point\x3d"ignoreDiv"\x3e\r\n      \x3cdiv data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"ignore" class\x3d"visibleCheck"\x3e\x3c/div\x3e\r\n      \x3clabel class\x3d"visibleLabel"\x3e${nls.ignoreOutput}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"field" data-dojo-attach-point\x3d"layerVisibleDiv"\x3e\r\n      \x3cdiv data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"layerInvisible" class\x3d"visibleCheck"\x3e\x3c/div\x3e\r\n      \x3clabel class\x3d"visibleLabel"\x3e${nls.turnOffOutput}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"field" data-dojo-attach-point\x3d"dynamicSchemaDiv"\x3e\r\n      \x3cdiv data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"useDynamicSchema" class\x3d"visibleCheck"\x3e\x3c/div\x3e\r\n      \x3clabel class\x3d"visibleLabel jimu-ellipsis" title\x3d"${nls.useDynamicSchema}"\x3e${nls.useDynamicSchema}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\t\x3cdiv class\x3d"section special-property" data-dojo-attach-point\x3d"specialSectionNode"\x3e\x3c/div\x3e\r\n\x3c/div\x3e\r\n'}});
define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/on dojo/text!./ParamSetting.html dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin jimu/dijit/Popup jimu/utils ../editorManager ../EditorChooser ../utils dijit/form/TextBox jimu/dijit/CheckBox".split(" "),function(g,d,b,f,h,k,l,m,n,p,e,q,r){return g([k,l,m],{baseClass:"jimu-widget-setting-gp-param",templateString:h,postCreate:function(){this.inherited(arguments);e.setMap(this.map);e.setNls(this.nls);this.own(f(this.useDynamicSchema,
"change",d.hitch(this,function(a){this.spart&&this.spart.domNode&&(a?b.setStyle(this.spart.domNode,"display","none"):b.setStyle(this.spart.domNode,"display","block"))})));this.own(f(this.ignore,"change",d.hitch(this,this._updateStatus)))},_updateStatus:function(a){a?(this.layerInvisible.setStatus(!1),this.useDynamicSchema.setStatus(!1),this.spart&&this.spart.domNode&&b.setStyle(this.spart.domNode,"display","none")):(this.layerInvisible.setStatus(!0),this.useDynamicSchema.setStatus(!0),this.spart&&
this.spart.domNode&&(this.useDynamicSchema.getValue()?b.setStyle(this.spart.domNode,"display","none"):b.setStyle(this.spart.domNode,"display","block")))},setParam:function(a,c){this.param=a;this.direction=c;void 0===a.label&&(a.label="");this.label.setValue(a.label);void 0===a.tooltip&&(a.tooltip=void 0===a.label?"":a.label);this.tooltip.setValue(a.tooltip);this.spart&&(this.spart.destroy(),b.destroy(this.spartLabelNode),b.destroy(this.changeEditorNode));this._createSpecialPart();"output"===c?(b.setStyle(this.visibleDiv,
"display","none"),b.setStyle(this.ignoreDiv,"display","block"),this.ignore.setValue(a.ignore),"GPFeatureRecordSetLayer"===this.param.dataType||"MapServiceLayer"===this.param.dataType?(this.layerInvisible.setStatus(!0),b.setStyle(this.layerVisibleDiv,"display","block"),this.layerInvisible.setValue(a.layerInvisible)):b.setStyle(this.layerVisibleDiv,"display","none"),"GPFeatureRecordSetLayer"===this.param.dataType||"GPRecordSet"===this.param.dataType?(this.useDynamicSchema.setStatus(!0),this.useDynamicSchema.setValue(r.useDynamicSchema(this.param,
this.config)),b.setStyle(this.dynamicSchemaDiv,"display","block")):b.setStyle(this.dynamicSchemaDiv,"display","none"),this._updateStatus(!0===a.ignore)):(this.visible.setValue(a.visible),b.setStyle(this.visibleDiv,"display","block"),b.setStyle(this.ignoreDiv,"display","none"),b.setStyle(this.layerVisibleDiv,"display","none"),b.setStyle(this.dynamicSchemaDiv,"display","none"))},acceptValue:function(){if(this.param){this.param.label=this.label.getValue();this.param.tooltip=this.tooltip.getValue();if(this.spart.getValue){var a=
this.spart.getValue();"GPFeatureRecordSetLayer"===this.param.dataType||"GPRecordSet"===this.param.dataType?d.mixin(this.param,a):this.param.defaultValue=a}if("output"===this.direction){if("GPFeatureRecordSetLayer"===this.param.dataType||"GPRecordSet"===this.param.dataType)this.param.useDynamicSchema=this.useDynamicSchema.getValue();this.param.ignore=this.ignore.getValue();this.param.layerInvisible="GPFeatureRecordSetLayer"===this.param.dataType||"MapServiceLayer"===this.param.dataType?this.layerInvisible.getValue():
!0}else this.param.visible=this.visible.getValue()}},setConfig:function(a){this.config=a},_createSpecialPart:function(){if("input"===this.direction&&"GPFeatureRecordSetLayer"===this.param.dataType)var a=this.nls.inputFeatureBy;else"input"===this.direction&&"GPRecordSet"===this.param.dataType?a=this.nls.inputRecordBy:"input"===this.direction?a=this.nls.defaultValue:"output"===this.direction&&"GPFeatureRecordSetLayer"===this.param.dataType?a="":"output"===this.direction&&(a=this.nls.displayType);this.spart=
e.createEditor(this.param,this.direction,"setting",{config:this.config});this.spartLabelNode=b.create("div",{"class":"input-label",innerHTML:p.sanitizeHTML(a),style:{display:""===a?"none":"inline-block"}},this.specialSectionNode);this.spart.placeAt(this.specialSectionNode);this.changeEditorNode&&b.place(this.changeEditorNode,this.spartLabelNode,"after");this.spart.startup()},_createChangeEditorNode:function(){var a=b.create("div",{"class":"change-editor",innerHTML:"Change",style:{display:"inline-block"}});
this.own(f(a,"click",d.hitch(this,function(){var c=new q({inputParams:this.config.inputParams});new n({titleLabel:"Choose Editor",content:c,container:"main-page",buttons:[{label:this.nls.ok,onClick:d.hitch(this,this._onEditorChange,c)},{label:this.nls.cancel,classNames:["jimu-btn-vacation"]}]});c.startup()})));return a},_onEditorChange:function(a){this.param.editorName!==a.selectedEditor.name&&(a.popup.close(),this.param.editorName=a.selectedEditor.name,a.selectedEditor.dependParam&&(this.param.editorDependParamName=
a.selectedEditor.dependParam),this.spart.destroy(),this.spart=e.createEditor(this.param,"input","setting",{config:this.config}),b.place(this.spart.domNode,this.specialSectionNode))}})});