define(["Ti/_/declare","Ti/_/UI/Widget","Ti/_/UI/FontWidget","Ti/_/lang","Ti/_/dom","Ti/_/style","Ti/UI"],function(t,e,i,n,o,s,a){var r=s.set,h=t(e,{constructor:function(){this._contentContainer=o.create("div",{className:"TiUIProgressBarContainer",style:{pointerEvents:"none",left:0,right:0,top:0,bottom:0,position:"absolute",overflow:"hidden"}},this.domNode),this._indicator=o.create("div",{className:"TiUIProgressBarIndicator",style:{pointerEvents:"none",width:"0%",height:"100%"}},this._contentContainer)},_getContentSize:function(){return{width:200,height:25}},_setPosition:function(t){r(this._indicator,"width",Math.round(100*t)+"%")}});return t("Ti.UI.ProgressBar",e,{constructor:function(){this._add(this._contentContainer=a.createView({width:a.INHERIT,height:a.INHERIT,left:0,top:0,layout:a._LAYOUT_CONSTRAINING_VERTICAL})),this._contentContainer._layout._defaultHorizontalLayout="start",this._contentContainer._add(this._message=a.createLabel()),this._contentContainer._add(this._progressBar=new h({width:a.INHERIT,height:a.INHERIT}))},_updateSize:function(){this._progressBar._setPosition((this.value-this.min)/(this.max-this.min))},_defaultWidth:a.SIZE,_defaultHeight:a.SIZE,properties:{color:{set:function(t){return this._message.color=t,t}},font:{set:function(t){return this._message.font=t,t}},message:{set:function(t){return this._message.text=t,t}},min:{set:function(t){return Math.min(t,this.max)},post:"_updateSize",value:0},max:{set:function(t){return Math.max(t,this.min)},post:"_updateSize",value:100},value:{set:function(t){return Math.min(Math.max(t,this.min),this.max)},post:"_updateSize",value:0}}})});