/*!
 * 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 S=R.extend(L);S.renderLIAttributes=function(r,l){r.addClass("sapMSLI");if(l._showSeparators==sap.m.ListSeparators.None&&!l.getIconInset()){r.addClass("sapMSLIShowSeparatorNone");}if(l.getIcon()){r.addClass("sapMSLIIcon");}if(!l.getIconInset()){r.addClass("sapMSLIIconThumb");}if((l.getDescription()||!l.getAdaptTitleSize())&&l.getIcon()&&l.getIconInset()){r.addClass("sapMSLIDescIcon");}if((l.getDescription()||!l.getAdaptTitleSize())&&!l.getIcon()){r.addClass("sapMSLIDescNoIcon");}if(!l.getDescription()&&l.getIcon()){r.addClass("sapMSLINoDescIcon");}if(l.getType()==sap.m.ListType.Detail||l.getType()==sap.m.ListType.DetailAndActive){r.addClass("sapMSLIDetail");}};S.renderLIContent=function(r,l){var t=l.getTitleTextDirection(),i=l.getInfoTextDirection();if(l.getIcon()){if(l.getIconInset()){var o=sap.ui.getCore().byId(l._listId);if(o&&o.getMode()==sap.m.ListMode.None&!o.getShowUnread()){r.renderControl(l._getImage((l.getId()+"-img"),"sapMSLIImgFirst",l.getIcon(),l.getIconDensityAware()));}else{r.renderControl(l._getImage((l.getId()+"-img"),"sapMSLIImg",l.getIcon(),l.getIconDensityAware()));}}else{r.renderControl(l._getImage((l.getId()+"-img"),"sapMSLIImgThumb",l.getIcon(),l.getIconDensityAware()));}}var a=l.getTitle()&&(l.getDescription()||!l.getAdaptTitleSize())||(l._showSeparators==sap.m.ListSeparators.None&&!l.getIconInset());var b=l.getInfo();if(a){r.write("<div");r.addClass("sapMSLIDiv");r.writeClasses();r.write(">");}r.write("<div");if(!a){r.addClass("sapMSLIDiv");}r.addClass("sapMSLITitleDiv");r.writeClasses();r.write(">");if(!a&&l._bNoFlex){r.write('<div class="sapMLIBNoFlex">');}r.write("<div");if(a){r.addClass("sapMSLITitle");}else{r.addClass("sapMSLITitleOnly");}r.writeClasses();if(t!==sap.ui.core.TextDirection.Inherit){r.writeAttribute("dir",t.toLowerCase());}r.write(">");r.writeEscaped(l.getTitle());r.write("</div>");if(b&&(sap.ui.core.theming.Parameters.get("sapUiInfoTop")=="true"||!a)){r.write("<div");r.writeAttribute("id",l.getId()+"-info");r.addClass("sapMSLIInfo");r.addClass("sapMSLIInfo"+l.getInfoState());r.writeClasses();if(i!==sap.ui.core.TextDirection.Inherit){r.writeAttribute("dir",i.toLowerCase());}r.write(">");r.writeEscaped(b);r.write("</div>");}if(!a&&l._bNoFlex){r.write('</div>');}r.write("</div>");r.write("<div");r.addClass("sapMSLIDescriptionDiv");r.writeClasses();r.write(">");if(a){r.write("<div");r.addClass("sapMSLIDescription");r.writeClasses();r.write(">");if(l.getDescription()){r.writeEscaped(l.getDescription());}else{r.write("&nbsp;");}r.write("</div>");}if(b&&sap.ui.core.theming.Parameters.get("sapUiInfoTop")=="false"&&a){r.write("<div");r.writeAttribute("id",l.getId()+"-info");r.addClass("sapMSLIInfo");if(l._showSeparators==sap.m.ListSeparators.None&&l.getInfoState()==sap.ui.core.ValueState.None){r.addClass("sapMSLIInfo"+l.getInfoState()+"ShowSeparatorNone");}else{r.addClass("sapMSLIInfo"+l.getInfoState());}r.writeClasses();if(i!==sap.ui.core.TextDirection.Inherit){r.writeAttribute("dir",i.toLowerCase());}r.write(">");r.writeEscaped(b);r.write("</div>");}r.write("</div>");if(a){r.write("</div>");}};return S;},true);
