/*! grafana - v4.5.1 - 2017-09-19
 * Copyright (c) 2017 Torkel Ödegaard; Licensed Apache-2.0 */

System.register(["./variable"],function(a,b){"use strict";var c,d;b&&b.id;return{setters:[function(a){c=a}],execute:function(){d=function(){function a(a,b){this.model=a,this.variableSrv=b,this.defaults={type:"constant",name:"",hide:2,label:"",query:"",current:{},options:[]},c.assignModelProperties(this,a,this.defaults)}return a.$inject=["model","variableSrv"],a.prototype.getSaveModel=function(){return c.assignModelProperties(this.model,this,this.defaults),this.model},a.prototype.setValue=function(a){this.variableSrv.setOptionAsCurrent(this,a)},a.prototype.updateOptions=function(){return this.options=[{text:this.query.trim(),value:this.query.trim()}],this.setValue(this.options[0]),Promise.resolve()},a.prototype.dependsOn=function(a){return!1},a.prototype.setValueFromUrl=function(a){return this.variableSrv.setOptionFromUrl(this,a)},a.prototype.getValueForUrl=function(){return this.current.value},a}(),a("ConstantVariable",d),c.variableTypes.constant={name:"Constant",ctor:d,description:"Define a hidden constant variable, useful for metric prefixes in dashboards you want to share"}}}});