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

<c:if test="<%= cIWarehouseQualifiersDisplayContext.hasPermission(ActionKeys.UPDATE) %>">
	<div id="item-finder-root-channel"></div>

	<liferay-frontend:component
		context='<%=
			HashMapBuilder.<String, Object>put(
				"commerceInventoryWarehouseId", commerceInventoryWarehouseId
			).put(
				"datasetId", CommerceInventoryWarehouseFDSNames.COMMERCE_INVENTORY_WAREHOUSE_QUALIFIER_CHANNELS
			).put(
				"rootPortletId", portletDisplay.getRootPortletId()
			).put(
				"spritemap", themeDisplay.getPathThemeImages() + "/clay/icons.svg"
			).put(
				"warehouseExternalReferenceCode", HtmlUtil.escapeJS(commerceInventoryWarehouse.getExternalReferenceCode())
			).build()
		%>'
		module="js/channels"
	/>

	<commerce-ui:panel
		bodyClasses="p-0"
		title='<%= LanguageUtil.get(request, "channels") %>'
	>
		<frontend-data-set:headless-display
			apiURL="<%= cIWarehouseQualifiersDisplayContext.getWarehouseChannelsAPIURL() %>"
			fdsActionDropdownItems="<%= cIWarehouseQualifiersDisplayContext.getWarehouseChannelFDSActionDropdownItems() %>"
			formName="fm"
			id="<%= CommerceInventoryWarehouseFDSNames.COMMERCE_INVENTORY_WAREHOUSE_QUALIFIER_CHANNELS %>"
			itemsPerPage="<%= 10 %>"
			namespace="<%= liferayPortletResponse.getNamespace() %>"
			pageNumber="<%= 1 %>"
			portletURL="<%= portletCommerceInventoryWarehouseURL %>"
		/>
	</commerce-ui:panel>
</c:if>