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

<%
AssetRenderer<?> assetRenderer = (AssetRenderer<?>)request.getAttribute(WebKeys.ASSET_RENDERER);

AssetRendererFactory<?> assetRendererFactory = (AssetRendererFactory)request.getAttribute(WebKeys.ASSET_RENDERER_FACTORY);
%>

<div class="card">
	<c:choose>
		<c:when test="<%= Validator.isNotNull(assetRenderer.getThumbnailPath(renderRequest)) %>">
			<div class="aspect-ratio aspect-ratio-bg-center aspect-ratio-bg-cover" style="background-image: url('<%= assetRenderer.getThumbnailPath(renderRequest) %>');">
				<img alt="" class="sr-only" src="<%= assetRenderer.getThumbnailPath(renderRequest) %>" />
			</div>
		</c:when>
		<c:otherwise>
			<div class="aspect-ratio aspect-ratio-bg-center aspect-ratio-bg-cover vertical-card-container">
				<aui:icon cssClass="icon-vertical-card-image" image="<%= assetRendererFactory.getIconCssClass() %>" markupView="lexicon" />
			</div>
		</c:otherwise>
	</c:choose>

	<div class="card-row card-row-layout-fixed card-row-padded card-row-valign-top">
		<div class="card-col-content lfr-card-details-column">
			<span class="font-weight-bold lfr-card-title-text small text-truncate">
				<%= HtmlUtil.escape(assetRenderer.getTitle(locale)) %>
			</span>
			<span class="font-weight-normal lfr-card-subtitle-text small text-truncate">
				<%= HtmlUtil.escape(assetRendererFactory.getTypeName(locale)) %>
			</span>
		</div>
	</div>
</div>