/*
 * 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'],function(q){"use strict";var C={};C.render=function(r,l){var a=sap.ui.getCore().getLibraryResourceBundle("sap.ui.unified");var c=["Today","Selected","NormalDay","NonWorkingDay"];var s=["TODAY","SELECTED","NORMAL_DAY","NON_WORKING_DAY"];var b=l.getItems();r.write("<div");r.writeControlData(l);r.addClass("sapUiUnifiedLegend");r.writeClasses();var d=l.getColumnWidth();r.writeAttribute("style","column-width:"+d+";-moz-column-width:"+d+";-webkit-column-width:"+d+";");r.writeStyles();r.write(">");for(var i=0;i<s.length;i++){this.renderLegendItem(r,"sapUiUnifiedLegend"+c[i],a.getText("LEGEND_"+s[i]));}if(b&&b.length>0){for(var j=0;j<b.length;j++){var t=j+1;this.renderLegendItem(r,"sapUiCalLegDayType"+((t<10)?"0"+t:t),b[j].getText());}}r.write("</div>");};C.renderLegendItem=function(r,c,t){r.write("<div");r.addClass("sapUiUnifiedLegendItem");r.writeClasses();r.writeStyles();r.write(">");r.write("<div");r.addClass("sapUiUnifiedLegendSquare");r.writeClasses();r.writeStyles();r.write(">");r.write("<div");r.addClass("sapUiUnifiedLegendSquareColor");r.addClass(c);r.writeClasses();r.writeStyles();r.write("></div></div>");r.write("<div");r.addClass("sapUiUnifiedLegendDescription");r.writeClasses();r.writeStyles();r.write(">");r.writeEscaped(t);r.write("</div></div>");};return C;},true);
