text: /*!
   * OpenUI5
   * (c) Copyright 2009-2020 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(["./library","sap/ui/core/Control","./TileContentRenderer"],function(t,e,r){"use strict";var o=e.extend("sap.m.TileContent",{metadata:{library:"sap.m",properties:{footer:{type:"string",group:"Appearance",defaultValue:null},footerColor:{type:"sap.m.ValueColor",group:"Appearance",defaultValue:"Neutral"},size:{type:"sap.m.Size",group:"Appearance",defaultValue:"Auto"},unit:{type:"string",group:"Data",defaultValue:null},disabled:{type:"boolean",group:"Behavior",defaultValue:false},frameType:{type:"sap.m.FrameType",group:"Appearance",defaultValue:"Auto"}},defaultAggregation:"content",aggregations:{content:{type:"sap.ui.core.Control",multiple:false,bindable:"bindable"}}}});o.prototype.init=function(){this._bRenderFooter=true;this._bRenderContent=true};o.prototype.onBeforeRendering=function(){if(this.getContent()&&this._oDelegate){if(this.getDisabled()){this.getContent().addDelegate(this._oDelegate)}else{this.getContent().removeDelegate(this._oDelegate)}}};o.prototype.onAfterRendering=function(){var t=this.getContent();if(t){var e=this.$();if(!e.attr("title")){var r=t.getTooltip_AsString();var o=e.find("*");o.removeAttr("title");if(r&&r.trim().length!==0){if(this._getFooterText().trim()!==0){r=r+"\n"+this._getFooterText()}e.attr("title",r)}}}};o.prototype._getContentType=function(){if(this.getContent()){var t=this.getContent().getMetadata().getName();if(t==="sap.m.NewsContent"||t==="sap.suite.ui.commons.NewsContent"){return"News"}}};o.prototype._getFooterText=function(){var t=sap.ui.getCore().getLibraryResourceBundle("sap.m");var e=this.getFooter();var r=this.getUnit();if(r){if(e){if(sap.ui.getCore().getConfiguration().getRTL()){return t.getText("TILECONTENT_FOOTER_TEXT",[e,r])}else{return t.getText("TILECONTENT_FOOTER_TEXT",[r,e])}}else{return r}}else{return e}};o.prototype.getAltText=function(){var t="";var e=true;var r=this.getContent();if(r){if(r.getAltText){t+=r.getAltText();e=false}else if(r.getTooltip_AsString()){t+=r.getTooltip_AsString();e=false}}if(this.getUnit()){t+=(e?"":"\n")+this.getUnit();e=false}if(this.getFooter()){t+=(e?"":"\n")+this.getFooter()}return t};o.prototype.getTooltip_AsString=function(){var t=this.getTooltip();var e="";if(typeof t==="string"||t instanceof String){return t}e=this.getAltText();return e?e:""};o.prototype.setRenderFooter=function(t){this._bRenderFooter=t;return this};o.prototype.setRenderContent=function(t){this._bRenderContent=t;return this};return o});