define(["Ti/_/css","Ti/_/declare","Ti/_/lang","Ti/_/Evented","Ti/Locale","Ti/UI","Ti/_/style"],function(t,e,i,o,n,a,d){return e("Ti.UI.AlertDialog",o,{show:function(){var e=this._alertWindow=a.createWindow(),o=a.createView({backgroundColor:"black",opacity:0,left:0,top:0,right:0,bottom:0}),l=a.createView({backgroundColor:"white",borderRadius:3,height:a.SIZE,layout:a._LAYOUT_CONSTRAINING_VERTICAL,opacity:0,width:"50%"}),s=this.buttonNames||[];e._add(o),e._add(l),d.set(e.domNode,"zIndex",2147483647),l._add(a.createLabel({text:n._getString(this.titleid,this.title),font:{fontWeight:"bold"},left:5,right:5,top:5,height:a.SIZE,textAlign:a.TEXT_ALIGNMENT_CENTER})),l._add(a.createLabel({text:n._getString(this.messageid,this.message),left:5,right:5,top:5,height:a.SIZE,textAlign:a.TEXT_ALIGNMENT_CENTER})),s.length||s.push(n._getString(this.okid,this.ok||"OK")),s.forEach(function(o,n){var d=a.createButton({left:5,right:5,top:5,bottom:n===s.length-1?5:0,height:a.SIZE,title:o,index:n});n===this.cancel&&t.add(d.domNode,"TiUIElementGradientCancel"),l._add(d),d.addEventListener("singletap",i.hitch(this,function(){e.close(),this._alertWindow=void 0,this.fireEvent("click",{index:n,cancel:this.cancel===n})}))},this),o.addEventListener("postlayout",function(){setTimeout(function(){o.animate({opacity:.5,duration:200},function(){l.animate({opacity:1,duration:200})})},0)}),e.open()},hide:function(){this._alertWindow&&this._alertWindow.close()},properties:{buttonNames:void 0,cancel:-1,message:void 0,messageid:void 0,ok:void 0,okid:void 0,title:void 0,titleid:void 0}})});