// 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:jimu/dijit/_filter/PredefinedValueProvider.html":'\x3cdiv\x3e\r\n    \x3c!-- \x3cdiv data-dojo-attach-point\x3d"valueproviderStore" style\x3d"height:1px;visibility:hidden;overflow:hidden;"\x3e\x3c/div\x3e --\x3e\r\n    \x3cdiv class\x3d"jimu-filter-popup-btn jimu-not-selectable"\x3e\r\n      \x3cdiv class\x3d"predefined-btn"  data-dojo-attach-point\x3d\'indexBtn\'\x3e\r\n        \x3cdiv class\x3d"tip jimu-ellipsis" title\x3d"predefined" data-dojo-attach-point\x3d\'indexBtnTips\'\x3epredefined\x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d\'valueProviderPopupNode\'\x3e\x3c/div\x3e\r\n\x3c/div\x3e'}});
define("dojo/_base/html dojo/_base/declare dojo/text!./PredefinedValueProvider.html dojo/_base/lang dojo/on jimu/dijit/Popup ./PredefinedValuePopup ./ValueProvider".split(" "),function(c,d,e,b,f,g,h,k){return d([k],{templateString:e,nls:null,url:"",layerDefinition:null,partObj:null,fieldInfo:null,codedValues:null,staticValues:null,layerInfo:null,popupInfo:null,operatorInfo:null,filterCodedValueIfPossible:!1,runtime:!1,providerType:null,valueProvider:null,postCreate:function(){this.inherited(arguments);
this.jimuNls=window.jimuNls;c.addClass(this.domNode,"jimu-filter-indexBtn-value-provider");c.addClass(this.valueProviderPopupNode,"value-type-popup");c.setStyle(this.valueProviderPopupNode,"display","none");var a="";"UNIQUE_PREDEFINED_VALUE_PROVIDER"===this.providerType?a=this.nls.predefinedUniqueTips:"MULTIPLE_PREDEFINED_VALUE_PROVIDER"===this.providerType&&(a=this.nls.predefinedMultipleTips);this.indexBtnTips.title=a;this.indexBtnTips.innerText=a+" ...";this._initProvider();this._bindEvent()},_initProvider:function(){var a=
{preDefinedTips:this.indexBtnTips,nls:this.nls,url:this.url,layerDefinition:this.layerDefinition,partObj:this.partObj,fieldInfo:this.fieldInfo,codedValues:this.codedValues,staticValues:this.staticValues,layerInfo:this.layerInfo,popupInfo:this.popupInfo,operatorInfo:this.operatorInfo,filterCodedValueIfPossible:this.filterCodedValueIfPossible,runtime:this.runtime,selectUI:this.selectUI,providerType:this.providerType};if("UNIQUE_PREDEFINED_VALUE_PROVIDER"===this.providerType||"MULTIPLE_PREDEFINED_VALUE_PROVIDER"===
this.providerType)this.valueProvider=new h(a);this.valueProvider.on("predefinedValuePopup_setApplyBtnState",b.hitch(this,function(l){this.popup&&(l?this.popup.enableButton(0):this.popup.disableButton(0))}))},_bindEvent:function(){this.own(f(this.indexBtn,"click",b.hitch(this,function(){this.valueProvider&&this.destroyProvider();this._initProvider();this.setValueObject(this.valueObjEnd,this.valueObjEnd.type);this.popup=new g({width:800,height:600,content:this.valueProvider,titleLabel:this.indexBtnTips.title,
useFocusLogic:!1,onClose:b.hitch(this,function(){this.getValueObject(!1);this._closeCBXPopup();this.destroyProvider()}),buttons:[{label:this.nls.apply,disable:!0,onClick:b.hitch(this,function(){this.getValueObject(!0)?this.popup.close():alert("please configurate some items")})},{label:this.jimuNls.common.cancel,classNames:["jimu-btn-vacation"],onClick:b.hitch(this,function(){this.popup.close()})}]});c.addClass(this.popup.domNode,"widget-at-filter-popup");setTimeout(b.hitch(this,function(){this.valueProvider._setApplyState(this.getValueObject(!0));
this.valueProvider._setDisplayTypeStyle()}),100)})))},_closeCBXPopup:function(){this.valueProvider.cbxPopup&&this.valueProvider.cbxPopup.domNode&&(this.valueProvider.cbxPopup.onClose=b.hitch(this,function(){return!0}),this.valueProvider.cbxPopup.close())},_saveData:function(){this.valueProvider.saveData()},reset:function(){},getDijits:function(){return[]},getStatus:function(){return 1},setValueObject:function(a){a&&(this.valueObjEnd=a);this.valueProvider.setValueObject(a,!0)},valueObj:null,getValueObject:function(a){if(a)return this.valueObjEnd=
a=this.valueProvider.getValueObject(),a.value.length;delete this.valueObjEnd.valueList;return 0===this.valueObjEnd.value.length?0:this.valueObjEnd},destroyProvider:function(){this.valueProvider&&this.valueProvider.destroyProvider();this.valueProvider=null}})});