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

<liferay-portlet:renderURL portletName="<%= CPPortletKeys.CP_DEFINITIONS %>" varImpl="viewProductDefinitionsCatalogURL">
	<portlet:param name="catalogNavigationItem" value="view-all-product-definitions" />
</liferay-portlet:renderURL>

<liferay-portlet:renderURL portletName="<%= CPPortletKeys.CP_DEFINITIONS %>" varImpl="viewProductInstancesCatalogURL">
	<portlet:param name="mvcRenderCommandName" value="/cp_definitions/view_cp_instances" />
	<portlet:param name="catalogNavigationItem" value="view-all-instances" />
</liferay-portlet:renderURL>

<%
List<NavigationItem> catalogNavigationItems = new ArrayList<>();

NavigationItem cpDefinitionsCatalogNavigationItem = new NavigationItem();
NavigationItem cpInstancesCatalogNavigationItem = new NavigationItem();

cpDefinitionsCatalogNavigationItem.setActive(catalogNavigationItem.equals("view-all-product-definitions"));
cpDefinitionsCatalogNavigationItem.setHref(viewProductDefinitionsCatalogURL.toString());
cpDefinitionsCatalogNavigationItem.setLabel(LanguageUtil.get(request, "all"));

cpInstancesCatalogNavigationItem.setActive(catalogNavigationItem.equals("view-all-instances"));
cpInstancesCatalogNavigationItem.setHref(viewProductInstancesCatalogURL.toString());
cpInstancesCatalogNavigationItem.setLabel(LanguageUtil.get(request, "skus"));

catalogNavigationItems.add(cpDefinitionsCatalogNavigationItem);
catalogNavigationItems.add(cpInstancesCatalogNavigationItem);
%>

<clay:navigation-bar
	inverted="<%= false %>"
	navigationItems="<%= catalogNavigationItems %>"
/>