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

<%
long countryId = ParamUtil.getLong(request, "countryId");

Country country = CountryLocalServiceUtil.fetchCountry(countryId);

String backURL = ParamUtil.getString(request, "backURL", String.valueOf(renderResponse.createRenderURL()));

portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(backURL);

renderResponse.setTitle((country == null) ? LanguageUtil.get(request, "add-country") : LanguageUtil.format(request, "edit-x", country.getTitle(locale), false));
%>

<liferay-frontend:screen-navigation
	context="<%= CountryServiceUtil.fetchCountry(countryId) %>"
	key="<%= CountryScreenNavigationConstants.SCREEN_NAVIGATION_KEY_COUNTRY %>"
	portletURL='<%=
		PortletURLBuilder.createRenderURL(
			renderResponse
		).setMVCRenderCommandName(
			"/address/edit_country"
		).setParameter(
			"countryId", countryId
		).buildPortletURL()
	%>'
/>