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

<%
ViewObjectDefinitionsDisplayContext viewObjectDefinitionsDisplayContext = (ViewObjectDefinitionsDisplayContext)request.getAttribute(WebKeys.PORTLET_DISPLAY_CONTEXT);
%>

<frontend-data-set:headless-display
	apiURL="<%= viewObjectDefinitionsDisplayContext.getAPIURL() %>"
	creationMenu="<%= viewObjectDefinitionsDisplayContext.getCreationMenu() %>"
	fdsActionDropdownItems="<%= viewObjectDefinitionsDisplayContext.getFDSActionDropdownItems() %>"
	formName="fm"
	id="<%= ObjectDefinitionsFDSNames.OBJECT_DEFINITIONS %>"
	propsTransformer="js/ObjectDefinitionsFDSPropsTransformer"
	style="fluid"
/>

<div id="<portlet:namespace />addObjectDefinition">
	<react:component
		module="js/components/ModalAddObjectDefinition"
		props='<%=
			HashMapBuilder.<String, Object>put(
				"apiURL", viewObjectDefinitionsDisplayContext.getAPIURL()
			).put(
				"storageTypes", viewObjectDefinitionsDisplayContext.getStorageTypes()
			).build()
		%>'
	/>
</div>

<liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="baseResourceURL" />

<div id="<portlet:namespace />deleteObjectDefinition">
	<react:component
		module="js/components/ModalDeleteObjectDefinition"
		props='<%=
			HashMapBuilder.<String, Object>put(
				"baseResourceURL", String.valueOf(baseResourceURL)
			).build()
		%>'
	/>
</div>