/*!
 * SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
 * (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
 * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
 */
sap.ui.define(['jquery.sap.global','./ListItemBaseRenderer','sap/ui/core/Renderer'],function(q,L,R){"use strict";var O=R.extend(L);O.renderAttributeStatus=function(r,l,a,s){if(!a&&!s||(a&&a._isEmpty()&&s&&s._isEmpty())){return;}r.write("<div");r.addClass("sapMObjLAttrRow");r.writeClasses();r.write(">");if(a&&!a._isEmpty()){r.write("<div");r.addClass("sapMObjLAttrDiv");if(s&&(!s._isEmpty())){if(s instanceof Array){r.addClass("sapMObjAttrWithMarker");}}r.writeClasses();if(!s||s._isEmpty()){r.addStyle("width","100%");r.writeStyles();}r.write(">");r.renderControl(a);r.write("</div>");}if(s&&(!s._isEmpty())){r.write("<div");r.addClass("sapMObjLStatusDiv");if(s instanceof Array){r.addClass("sapMObjStatusMarker");}r.writeClasses();if(!a||a._isEmpty()){r.addStyle("width","100%");r.writeStyles();}r.write(">");if(s instanceof Array){while(s.length>0){r.renderControl(s.shift());}}else{r.renderControl(s);}r.write("</div>");}r.write("</div>");};O.renderLIAttributes=function(r,l){r.addClass("sapMObjLItem");r.addClass("sapMObjLListModeDiv");};O.renderLIContent=function(r,l){var t=l.getTitleTextDirection(),i=l.getIntroTextDirection(),n=l.getNumberTextDirection();r.write("<div");r.writeControlData(l);r.write(">");if(l.getIntro()){r.write("<div");r.addClass("sapMObjLIntro");r.writeClasses();r.writeAttribute("id",l.getId()+"-intro");r.write(">");r.write("<span");if(i!==sap.ui.core.TextDirection.Inherit){r.writeAttribute("dir",i.toLowerCase());}r.write(">");r.writeEscaped(l.getIntro());r.write("</span>");r.write("</div>");}r.write("<div");r.addClass("sapMObjLTopRow");r.writeClasses();r.write(">");if(!!l.getIcon()){r.write("<div");r.addClass("sapMObjLIconDiv");r.writeClasses();r.write(">");r.renderControl(l._getImageControl());r.write("</div>");}r.write("<div");r.addClass("sapMObjLNumberDiv");r.writeClasses();r.write(">");if(l.getNumber()){r.write("<div");r.writeAttribute("id",l.getId()+"-number");r.addClass("sapMObjLNumber");r.addClass("sapMObjLNumberState"+l.getNumberState());r.writeClasses();if(n!==sap.ui.core.TextDirection.Inherit){r.writeAttribute("dir",n.toLowerCase());}r.write(">");r.writeEscaped(l.getNumber());r.write("</div>");if(l.getNumberUnit()){r.write("<div");r.writeAttribute("id",l.getId()+"-numberUnit");r.addClass("sapMObjLNumberUnit");r.addClass("sapMObjLNumberState"+l.getNumberState());r.writeClasses();r.write(">");r.writeEscaped(l.getNumberUnit());r.write("</div>");}}r.write("</div>");r.write("<div");r.addStyle("display","-webkit-box");r.addStyle("overflow","hidden");r.writeStyles();r.write(">");var T=l._getTitleText();if(T){T.setTextDirection(t);T.setText(l.getTitle());T.addStyleClass("sapMObjLTitle");r.renderControl(T);}r.write("</div>");r.write("</div>");r.write('<div style="clear:both"/>');if(l._hasBottomContent()){r.write("<div");r.addClass("sapMObjLBottomRow");r.writeClasses();r.write(">");var a=l._getVisibleAttributes();var s=[];var m=null;if(l.getShowMarkers()||l.getMarkLocked()){var p=l._getPlaceholderIcon();m=[p];m._isEmpty=function(){return false;};if(l.getMarkLocked()){var b=l._getLockIcon();b.setVisible(l.getMarkLocked());m.push(b);}if(l.getShowMarkers()){var f=l._getFavoriteIcon();var c=l._getFlagIcon();f.setVisible(l.getMarkFavorite());c.setVisible(l.getMarkFlagged());m.push(f);m.push(c);}s.push(m);}s.push(l.getFirstStatus());s.push(l.getSecondStatus());while(a.length>0){this.renderAttributeStatus(r,l,a.shift(),s.shift());}while(s.length>0){this.renderAttributeStatus(r,l,null,s.shift());}r.write("</div>");}r.write("</div>");};return O;},true);
