/*!
 * 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','sap/ui/core/Renderer'],function(q,R){"use strict";var L={};L.render=function(r,c){var t=c.getTextDirection();var T=R.getTextAlign(c.getTextAlign(),t);r.write("<a");r.writeControlData(c);r.writeAccessibilityState(c,{role:'link',haspopup:!c.getHref()});r.addClass("sapMLnk");if(c.getSubtle()){r.addClass("sapMLnkSubtle");}if(c.getEmphasized()){r.addClass("sapMLnkEmphasized");}if(!c.getEnabled()){r.addClass("sapMLnkDsbl");r.writeAttribute("disabled","true");r.writeAttribute("tabIndex","-1");}else{r.writeAttribute("tabIndex","0");}if(c.getWrapping()){r.addClass("sapMLnkWrapping");}if(c.getTooltip_AsString()){r.writeAttributeEscaped("title",c.getTooltip_AsString());}if(c.getHref()&&c.getEnabled()){r.writeAttributeEscaped("href",c.getHref());}else{r.writeAttribute("href","javascript:void(0);");}if(c.getTarget()){r.writeAttributeEscaped("target",c.getTarget());}if(c.getWidth()){r.addStyle("width",c.getWidth());}else{r.addClass("sapMLnkMaxWidth");}if(T){r.addStyle("text-align",T);}if(t!==sap.ui.core.TextDirection.Inherit){r.writeAttribute("dir",t.toLowerCase());}r.writeClasses();r.writeStyles();r.write(">");if(c.getText()){r.writeEscaped(c.getText());}if(c.getEmphasized()){r.write("<label id='"+c.getId()+"-linkEmphasized"+"' class='sapUiHidden'>"+c._getLinkDescription("LINK_EMPHASIZED")+"</label>");}if(c.getSubtle()){r.write("<label id='"+c.getId()+"-linkSubtle"+"' class='sapUiHidden'>"+c._getLinkDescription("LINK_SUBTLE")+"</label>");}r.write("</a>");};return L;},true);
