<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of the Liferay Enterprise
 * Subscription License ("License"). You may not use this file except in
 * compliance with the License. You can obtain a copy of the License by
 * contacting Liferay, Inc. See the License for the specific language governing
 * permissions and limitations under the License, including but not limited to
 * distribution rights of the Software.
 *
 *
 *
 */
--%>

<%@ include file="/init.jsp" %>

<%
boolean active = GetterUtil.getBoolean(request.getAttribute("liferay-frontend:management-bar-button:active"));
String cssClass = (String)request.getAttribute("liferay-frontend:management-bar-button:cssClass");
Map<String, Object> data = (Map<String, Object>)request.getAttribute("liferay-frontend:management-bar-button:data");
boolean disabled = GetterUtil.getBoolean(request.getAttribute("liferay-frontend:management-bar-button:disabled"));
String href = (String)request.getAttribute("liferay-frontend:management-bar-button:href");
String icon = (String)request.getAttribute("liferay-frontend:management-bar-button:icon");
String iconCssClass = (String)request.getAttribute("liferay-frontend:management-bar-button:iconCssClass");
String id = (String)request.getAttribute("liferay-frontend:management-bar-button:id");
String label = (String)request.getAttribute("liferay-frontend:management-bar-button:label");

cssClass = "btn btn-secondary lfr-portal-tooltip " + cssClass;

if (active) {
	cssClass = "active " + cssClass;
}

if (disabled) {
	cssClass = "disabled " + cssClass;
}

if (Validator.isNotNull(icon)) {
	iconCssClass = StringPool.BLANK;
}

if (Validator.isNull(data.get("title"))) {
	data.put("title", LanguageUtil.get(request, label));
}

String labelCssClass = "sr-only";

if (Validator.isNull(icon) && Validator.isNull(iconCssClass)) {
	labelCssClass = StringPool.BLANK;
}
%>