//>>built
define("esriviewer/ui/query/model/QueryBuilderViewModel",["dojo/_base/declare","dojo/Evented"],function(_1,_2){return _1([_2],{QUERY_FIELD_DOUBLE_CLICK:"queryFieldDblClick",constructor:function(){var _3=this;this.showQueryBuilderResultsTab=ko.observable(true);this.showQueryBuilderSymbologyTab=ko.observable(false);this.queryBuilderInputVisible=ko.observable(true);this.queryBuilderResultsVisible=ko.observable(false);this.queryBuilderSymbologyVisible=ko.observable(false);this.showHowToQueryContent=ko.observable(true);this.showQueryLayerName=ko.observable(true);this.queryBuilderFields=ko.observableArray();this.selectedQueryBuilderField=ko.observable("");this.showTabs=ko.computed(function(){return _3.showQueryBuilderResultsTab()||_3.showQueryBuilderSymbologyTab();});},queryFieldDoubleClick:function(_4){this.emit(this.QUERY_FIELD_DOUBLE_CLICK);},sortFieldNames:function(){this.queryBuilderFields.sort(function(_5,_6){var _7=_5.label.toLowerCase();var _8=_6.label.toLowerCase();return _7==_8?0:(_7<_8?-1:1);});},showQueryBuilderInput:function(){this.queryBuilderInputVisible(true);this.queryBuilderResultsVisible(false);this.queryBuilderSymbologyVisible(false);},showQueryBuilderResults:function(){this.queryBuilderInputVisible(false);this.queryBuilderResultsVisible(true);this.queryBuilderSymbologyVisible(false);},showQueryBuilderSymbology:function(){this.queryBuilderSymbologyVisible(true);this.queryBuilderInputVisible(false);this.queryBuilderResultsVisible(false);}});});