include ./material_symbol.pug

mixin faq_search-marketing(headerText, headerClass)
	if typeof settings.algolia != 'undefined' && typeof settings.algolia.indexes != 'undefined' && typeof settings.algolia.indexes.wiki != 'undefined'
		if headerText
			div(class=headerClass) #{headerText}
		search.wiki
			form.project-search.form-horizontal(role='search' data-ol-faq-search)
				.form-group.has-feedback.has-feedback-left
					.col-sm-12
						label.visually-hidden(for='search-help-library') Search help library…
						input.form-control(
							id='search-help-library'
							type='search'
							placeholder='Search help library…'
						)
						+material-symbol('search').form-control-feedback-left(
							aria-hidden='true'
						)
						+material-symbol('clear').form-control-feedback(
							data-ol-clear-search
							hidden
						)
						button.visually-hidden(
							type='button'
							hidden
							data-ol-clear-search
							aria-label=translate('clear_search')
						)

				.row(role='region' aria-label='search results')
					.col-md-12
						div(data-ol-search-results-wrapper)
							span.visually-hidden(aria-live='polite' data-ol-search-sr-help-message)
							div(data-ol-search-results)
						.row-spaced-small.search-result.card.card-thin(
							hidden
							data-ol-search-no-results
						)
							p #{translate("no_search_results")}
