/*!
 * 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/theming/Parameters'],function(q,P){"use strict";var R={};R.render=function(r,c){var f=c._roundValueToVisualMode(c.getValue()),s=c.getMaxValue(),I=c._iPxIconSize,a=c._iPxPaddingSize,b='px',S=f*I+(Math.round(f)-1)*a,w=s*(I+a)-a,o,d,e,i=0,t=c.getTooltip_AsString(),u=sap.ui.Device.browser.chrome||sap.ui.Device.browser.safari,l;if(S<0){S=0;}r.write("<div");r.writeControlData(c);r.writeAttribute("style","width: "+w+b);if(!c.getEnabled()){r.writeAttribute("tabindex","-1");}else{r.writeAttribute("tabindex","0");}r.addClass("sapMRI");if(c.getEnabled()){r.addClass("sapMPointer");}else{r.addClass("sapMRIDisabled");}r.writeClasses();if(t){r.writeAttributeEscaped("title",t);}l=c.getId()+"-ariaLabel";r.writeAccessibilityState(c,{"role":"slider","orientation":"horizontal","live":"assertive","valuemin":0,"disabled":!c.getEnabled(),"labelledby":{value:l,append:true}});r.write(">");r.write("<label id='"+l+"' style='display:none;' aria-hidden='true'>"+c._oResourceBundle.getText("RATING_ARIA_NAME")+"</label>");r.write("<div class='sapMRISel");if(u){r.write(" sapMRIGrd");}r.write("'");r.writeAttribute("id",c.getId()+"-sel");r.writeAttribute("style","width: "+S+b);r.write(">");for(i=0;i<s;i++){o=c._getIcon(0);if(o instanceof sap.ui.core.Icon){o.setSize(I+b);}o.setWidth(I+b);o.setHeight(I+b);o.addStyleClass("sapMRIIconSel");r.renderControl(o);}r.write("</div>");r.write("<div class='sapMRIUnselWrapper'");r.writeAttribute("id",c.getId()+"-unsel-wrapper");r.writeAttribute("style","width: "+(w-S)+b);r.write(">");r.write("<div class='sapMRIUnsel");if(u&&c.getEnabled()){r.write(" sapMRIGrd");}r.write("' id='"+c.getId()+"-unsel'>");for(i=0;i<s;i++){d=c._getIcon(1);if(d instanceof sap.ui.core.Icon){d.setSize(I+b);}d.setWidth(I+b);d.setHeight(I+b);d.addStyleClass("sapMRIIconUnsel");if(I<=1){d.addStyleClass("sapMRIIconUnselSmall");}r.renderControl(d);}r.write("</div>");r.write("</div>");if(c.getEnabled()){r.write("<div class='sapMRIHov' id='"+c.getId()+"-hov'>");for(i=0;i<s;i++){e=c._getIcon(2);if(e instanceof sap.ui.core.Icon){e.setSize(I+b);}e.setWidth(I+b);e.setHeight(I+b);e.addStyleClass("sapMRIIconHov");r.renderControl(e);}r.write("</div>");r.write("<div class='sapMRISelector' id='"+c.getId()+"-selector'>");r.write("</div>");}r.write("</div>");};return R;},true);
