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

<c:if test="<%= (themeDisplay.getURLPublishToLive() != null) || layout.isTypeControlPanel() %>">

	<%
	String tabs3 = ParamUtil.getString(request, "tabs3", "new-publish-process");

	PortletURL portletURL = PortletURLBuilder.createRenderURL(
		renderResponse
	).setMVCRenderCommandName(
		"/export_import/publish_portlet"
	).setPortletResource(
		portletResource
	).buildPortletURL();
	%>

	<clay:navigation-bar
		navigationItems='<%=
			new JSPNavigationItemList(pageContext) {
				{
					portletURL.setParameter("tabs3", "new-publish-process");

					add(
						navigationItem -> {
							navigationItem.setActive(tabs3.equals("new-publish-process"));
							navigationItem.setHref(portletURL.toString());
							navigationItem.setLabel(LanguageUtil.get(httpServletRequest, "new-publish-process"));
						});

					Group scopeGroup = themeDisplay.getScopeGroup();

					if (!scopeGroup.isStagedRemotely()) {
						portletURL.setParameter("tabs3", "copy-from-live");

						add(
							navigationItem -> {
								navigationItem.setActive(tabs3.equals("copy-from-live"));
								navigationItem.setHref(portletURL.toString());
								navigationItem.setLabel(LanguageUtil.get(httpServletRequest, "copy-from-live"));
							});
					}

					portletURL.setParameter("tabs3", "current-and-previous");

					add(
						navigationItem -> {
							navigationItem.setActive(tabs3.equals("current-and-previous"));
							navigationItem.setHref(portletURL.toString());
							navigationItem.setLabel(LanguageUtil.get(httpServletRequest, "current-and-previous"));
						});
				}
			}
		%>'
	/>
</c:if>