// 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/SituationAwareness/setting/FieldOptions.html":'\x3cdiv\x3e\r\n\r\n  \x3cdiv class\x3d"jimu-r-row esriCTPaddingBtm5" title\x3d"${nls.show1KSeparatorLabel}"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"chk1KSeparatorDIV"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\r\n  \x3cdiv class\x3d"jimu-r-row" title\x3d"${nls.modifyValues}"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"chkModifyDIV"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\r\n  \x3ctable class\x3d"field-option-table"\x3e\r\n    \x3ctbody\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv\x3e\r\n            \x3cinput data-dojo-attach-point\x3d"rdo_round" type\x3d"radio" class\x3d"jimu-radio-btn" id\x3d"rdo-round" name\x3d"modifyOptions"\r\n              data-dojo-type\x3d"dijit/form/RadioButton"/\x3e\r\n            \x3clabel data-dojo-attach-point\x3d"roundLabel" for\x3d"rdo-round"\x3e${nls.roundValue}\x3c/label\x3e\r\n          \x3c/div\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"roundPlaces"\x3e\x3c/div\x3e\r\n          \x3c/div\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"roundSignificantFigures"\x3e\r\n            \x3clabel\x3e${nls.significantFigures}\x3c/label\x3e\r\n          \x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n  \r\n      \x3ctr\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv\x3e\r\n            \x3cinput data-dojo-attach-point\x3d"rdo_truncate" type\x3d"radio" class\x3d"jimu-radio-btn" id\x3d"rdo-truncate" name\x3d"modifyOptions"\r\n              data-dojo-type\x3d"dijit/form/RadioButton"/\x3e\r\n            \x3clabel data-dojo-attach-point\x3d"truncateLabel" for\x3d"rdo-truncate"\x3e${nls.truncateValue}\x3c/label\x3e\r\n          \x3c/div\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"truncatePlaces"\x3e\x3c/div\x3e\r\n          \x3c/div\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"truncateSignificantFigures"\x3e\r\n            \x3clabel\x3e${nls.significantFigures}\x3c/label\x3e\r\n          \x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n    \x3c/tbody\x3e\r\n  \x3c/table\x3e\r\n\r\n  \x3cdiv class\x3d"field-options-footer"\x3e\r\n    \x3cdiv class\x3d"jimu-btn ok" data-dojo-attach-point\x3d"btnOk"\x3e${nls.common.ok}\x3c/div\x3e\r\n    \x3cdiv class\x3d"jimu-btn cancel" data-dojo-attach-point\x3d"btnCancel"\x3e${nls.common.cancel}\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\r\n\x3c/div\x3e\r\n'}});
define("dojo/_base/declare dijit/_WidgetsInTemplateMixin dijit/form/ValidationTextBox dojo/_base/lang dojo/dom-class dojo/on jimu/BaseWidget dojo/text!./FieldOptions.html dojo/Evented jimu/dijit/CheckBox".split(" "),function(h,k,l,e,d,f,m,n,p,g){return h([m,k,p],{templateString:n,baseClass:"jimu-widget-SAT-setting",_modify:!1,row:void 0,_show1KSeparator:!1,_firstTime:!0,constructor:function(a){this.row=a.tr},postCreate:function(){this.inherited(arguments);this.startup()},startup:function(){this.own(f(this.btnCancel,
"click",e.hitch(this,function(){this.emit("cancel")})));this.own(f(this.btnOk,"click",e.hitch(this,function(){d.contains(this.btnOk,"jimu-state-disabled")||this.emit("ok",{modify:this._modify,round:this.rdo_round.get("checked"),truncate:this.rdo_truncate.get("checked"),roundPlaces:this.roundPlaces.textBox.value,truncatePlaces:this.truncatePlaces.textBox.value,show1KSeparator:this._show1KSeparator})})));this._initPopup()},_initPopup:function(){this._initRadio();this._initValidationTextBox(this.roundPlaces,
"undefined"!==typeof this.row.roundPlaces?this.row.roundPlaces:2);this._initValidationTextBox(this.truncatePlaces,"undefined"!==typeof this.row.truncatePlaces?this.row.truncatePlaces:2);this._init1KSeparatorCheckBox("undefined"!==typeof this.row.show1KSeparator?this.row.show1KSeparator:!0);this._initCheckBox("undefined"!==typeof this.row.modify?this.row.modify:!1)},_initValidationTextBox:function(a,b){var c=new l({style:{width:"60px",height:"30px"}});c.invalidMessage=this.nls.validatePlaces;c.placeAt(a);
c.startup();c.validator=e.hitch(this,this._validatePlaces);c.set("value",b);a.textBox=c},_validatePlaces:function(a){(a=/^\d+$/.test(a))?this._enableOk():this._disableOk();return a},_initRadio:function(){this.own(f(this.rdo_round,"change",e.hitch(this,this.rdoChanged)));this.own(f(this.rdo_truncate,"change",e.hitch(this,this.rdoChanged)));this.rdo_round.set("checked","undefined"!==typeof this.row.round?this.row.round:!0);this.rdo_truncate.set("checked","undefined"!==typeof this.row.truncate?this.row.truncate:
!1)},_initCheckBox:function(a){this.chkModify=new g({label:this.nls.modifyValues});this.chkModify.placeAt(this.chkModifyDIV);this.own(f(this.chkModify,"change",e.hitch(this,this.chkModifyChanged)));this.chkModify.setValue(a)},chkModifyChanged:function(a){this._modify=a;this._toggleEnabled(this.rdo_round,a);this._toggleEnabled(this.rdo_truncate,a);a?this.rdoChanged():this._toggleNodes(a,a)},rdoChanged:function(){this._firstTime||this._toggleNodes(this.rdo_round.get("checked"),this.rdo_truncate.get("checked"));
this._firstTime=!1},_toggleNodes:function(a,b){this._toggleEnabled(this.roundPlaces.textBox,a);this._toggleEnabled(this.roundSignificantFigures,a);this._toggleEnabled(this.roundLabel,a);this._toggleEnabled(this.truncatePlaces.textBox,b);this._toggleEnabled(this.truncateSignificantFigures,b);this._toggleEnabled(this.truncateLabel,b)},_toggleEnabled:function(a,b){a.setDisabled&&a.setDisabled(!b);a.disabled=!b;a.set&&a.set("disabled",!b);var c=b?"content-disabled":"content-enabled";d.contains(a,c)&&
d.remove(a,c);d.add(a,b?"content-enabled":"content-disabled")},_disableOk:function(){d.contains(this.btnOk,"jimu-state-disabled")||d.add(this.btnOk,"jimu-state-disabled")},_enableOk:function(){d.contains(this.btnOk,"jimu-state-disabled")&&d.remove(this.btnOk,"jimu-state-disabled")},_init1KSeparatorCheckBox:function(a){this.chk1kSeparator=new g({label:this.nls.show1KSeparatorLabel});this.chk1kSeparator.placeAt(this.chk1KSeparatorDIV);this.own(f(this.chk1kSeparator,"change",e.hitch(this,this.chk1kSeparatorChanged)));
this.chk1kSeparator.setValue(a)},chk1kSeparatorChanged:function(a){this._show1KSeparator=a}})});