<%--
/**
 * 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="/empty_result_message/init.jsp" %>

<div class="taglib-empty-result-message <%= Validator.isNotNull(animationTypeCssClass) ? "c-empty-state-animation" : StringPool.BLANK %>">
	<div class="c-empty-state-image <%= animationTypeCssClass %>"></div>

	<h1 class="taglib-empty-result-message-title">
		<c:choose>
			<c:when test="<%= Validator.isNull(title) %>">
				<liferay-ui:message arguments="<%= elementType %>" key="no-x-yet" translateArguments="<%= false %>" />
			</c:when>
			<c:otherwise>
				<%= title %>
			</c:otherwise>
		</c:choose>
	</h1>

	<c:if test="<%= Validator.isNotNull(description) %>">
		<p class="taglib-empty-result-message-description">
			<%= description %>
		</p>
	</c:if>

	<c:if test="<%= Validator.isNotNull(actionDropdownItems) %>">
		<c:choose>
			<c:when test="<%= actionDropdownItems.size() > 1 %>">
				<clay:dropdown-menu
					additionalProps="<%= additionalProps %>"
					displayType="<%= buttonCssClass %>"
					dropdownItems="<%= actionDropdownItems %>"
					label="new"
					propsTransformer="<%= propsTransformer %>"
					propsTransformerServletContext="<%= propsTransformerServletContext %>"
				/>
			</c:when>
			<c:otherwise>

				<%
				DropdownItem actionDropdownItem = actionDropdownItems.get(0);
				%>

				<c:choose>
					<c:when test='<%= Validator.isNotNull(actionDropdownItem.get("href")) %>'>
						<clay:link
							displayType="<%= buttonCssClass %>"
							href='<%= String.valueOf(actionDropdownItem.get("href")) %>'
							label='<%= String.valueOf(actionDropdownItem.get("label")) %>'
							type="button"
						/>
					</c:when>
					<c:otherwise>
						<clay:button
							additionalProps='<%= (HashMap)actionDropdownItem.get("data") %>'
							displayType="<%= buttonCssClass %>"
							label='<%= String.valueOf(actionDropdownItem.get("label")) %>'
							propsTransformer="<%= buttonPropsTransformer %>"
							propsTransformerServletContext="<%= propsTransformerServletContext %>"
						/>
					</c:otherwise>
				</c:choose>
			</c:otherwise>
		</c:choose>
	</c:if>
</div>