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

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>

<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %><%@
taglib uri="http://liferay.com/tld/react" prefix="react" %>

<%@ page import="com.liferay.portal.kernel.language.LanguageUtil" %><%@
page import="com.liferay.portal.kernel.util.HashMapBuilder" %><%@
page import="com.liferay.portal.search.web.internal.search.bar.portlet.display.context.SearchBarPortletInstanceConfigurationDisplayContext" %>

<portlet:defineObjects />

<%
SearchBarPortletInstanceConfigurationDisplayContext searchBarPortletInstanceConfigurationDisplayContext = (SearchBarPortletInstanceConfigurationDisplayContext)request.getAttribute(SearchBarPortletInstanceConfigurationDisplayContext.class.getName());
%>

<aui:input name="displayStyleGroupId" value="<%= searchBarPortletInstanceConfigurationDisplayContext.getDisplayStyleGroupId() %>" />

<aui:input name="displayStyle" value="<%= searchBarPortletInstanceConfigurationDisplayContext.getDisplayStyle() %>" />

<c:if test="<%= searchBarPortletInstanceConfigurationDisplayContext.isSuggestionsConfigurationVisible() %>">
	<aui:input name="enableSuggestions" type="checkbox" value="<%= searchBarPortletInstanceConfigurationDisplayContext.isEnableSuggestions() %>" />

	<div>
		<span aria-hidden="true" class="loading-animation loading-animation-sm"></span>

		<react:component
			module="js/components/SystemSettingsFieldList"
			props='<%=
				HashMapBuilder.<String, Object>put(
					"fieldLabel", LanguageUtil.get(request, "suggestions-contributor-configuration")
				).put(
					"fieldName", "suggestionsContributorConfigurations"
				).put(
					"initialValue", searchBarPortletInstanceConfigurationDisplayContext.getSuggestionsContributorConfigurations()
				).put(
					"namespace", liferayPortletResponse.getNamespace()
				).build()
			%>'
		/>
	</div>

	<aui:input label="character-threshold-for-displaying-suggestions" name="suggestionsDisplayThreshold" value="<%= searchBarPortletInstanceConfigurationDisplayContext.getSuggestionsDisplayThreshold() %>" />
</c:if>