<%--
/**
 * 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" %>

<%
String navigation = ParamUtil.getString(request, "navigation", "redirects");
%>

<clay:navigation-bar
	inverted="<%= true %>"
	navigationItems='<%=
		new JSPNavigationItemList(pageContext) {
			{
				add(
					navigationItem -> {
						navigationItem.setActive(!navigation.equals("404-urls"));
						navigationItem.setHref(renderResponse.createRenderURL());
						navigationItem.setLabel(LanguageUtil.get(request, "redirects"));
					});

				add(
					navigationItem -> {
						navigationItem.setActive(navigation.equals("404-urls"));
						navigationItem.setHref(renderResponse.createRenderURL(), "navigation", "404-urls");
						navigationItem.setLabel(LanguageUtil.format(request, "x-urls", HttpServletResponse.SC_NOT_FOUND, false));
					});
			}
		}
	%>'
/>

<c:choose>
	<c:when test='<%= navigation.equals("404-urls") %>'>
		<liferay-util:include page="/view_redirect_not_found_entries.jsp" servletContext="<%= application %>" />
	</c:when>
	<c:otherwise>
		<liferay-util:include page="/view_redirect_entries.jsp" servletContext="<%= application %>" />
	</c:otherwise>
</c:choose>