define(["Ti/_/declare","Ti/_/lang","Ti/UI/View","Ti/_/dom","Ti/_/css","Ti/_/style","Ti/UI","Ti/_/Layouts/ConstrainingHorizontal"],function(t,e,i,n,a,h,o,s){var r=e.isDef,l="themes/"+require.config.ti.theme+"/UI/TableViewRow/",d=l+"check.png",c=l+"child.png",g=l+"detail.png",_=/(click|singletap|longpress)/;return t("Ti.UI.TableViewRow",i,{_indentionScale:10,constructor:function(){this._layout=new s({element:this}),this._add(this._leftImageView=o.createImageView({width:o.SIZE,height:o.SIZE}));var t=o.createView({width:o.INHERIT,height:o.INHERIT});this._add(t),t._add(this._titleLabel=o.createLabel({width:o.INHERIT,height:o.INHERIT,wordWrap:!1})),t._add(this._contentContainer=o.createView({width:o.INHERIT,height:o.INHERIT})),this._add(this._rightImageView=o.createImageView({right:0,width:o.SIZE,height:o.SIZE}))},_defaultWidth:o.INHERIT,_defaultHeight:o.SIZE,_tableRowHeight:void 0,_tableViewSection:null,fireEvent:function(t){_.test(t)&&this._tableViewSection&&this._tableViewSection._tableView&&(this._tableViewSection._tableView._tableViewRowClicked=this),i.prototype.fireEvent.apply(this,arguments)},_doBackground:function(){this._titleLabel.color=this._touching?this.selectedColor:this.color,i.prototype._doBackground.apply(this,arguments)},_updatePadding:function(){this._contentContainer.borderWidth=this._titleLabel.borderWidth=[this.leftImage?5:0,this.rightImage?5:0,0,0]},add:function(t){this._contentContainer._add(t),this._publish(t)},remove:function(t){this._contentContainer._remove(t),this._unpublish(t)},properties:{className:void 0,color:{set:function(t){return this._titleLabel.color=t,t}},hasCheck:{set:function(t,e){return t===e||r(this.rightImage)||this.hasChild||(this._rightImageView.image=t?d:""),t}},hasChild:{set:function(t,e){return t===e||r(this.rightImage)||(this._rightImageView.image=t?c:""),t}},hasDetail:{set:function(t,e){return t===e||r(this.rightImage)||this.hasChild||this.hasCheck||(this._rightImageView.image=t?g:""),t}},indentionLevel:{set:function(t){return this._leftImageView.left=t*this._indentionScale,t},value:0},layout:{set:function(t){this._contentContainer.layout=t}},leftImage:{set:function(t,e){return t!==e&&(this._leftImageView.image=t),t},post:"_updatePadding"},rightImage:{set:function(t,e){return t!==e&&(this._rightImageView.image=t),t},post:"_updatePadding"},selectedColor:void 0,title:{set:function(t){return this._titleLabel.text=t,t}},font:{set:function(t){return this._titleLabel.font=t,t}}}})});