<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
	xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
	xmlns:s="http://typo3.org/ns/ApacheSolrForTypo3/Solr/ViewHelpers"
	data-namespace-typo3-fluid="true"
>

	<div class="card">
		<div class="card-header facet-label">
				<span class="bi bi-filter"></span>
			<a data-bs-toggle="collapse" href="#facet{facet.name}">{facet.label}</a>
	</div>

	<div class="card-body facet-type-options fluidfacet collapse show" data-facet-name="{facet.name}" data-facet-label="{facet.label}" id="facet{facet.name}">
		<s:facet.options.group.prefix.labelPrefixes options="{facet.options}" length="1" sortBy="alpha">

			<ul class="nav nav-tabs" id="facet{facet.name}-tabs" role="tablist">
				<f:for each="{prefixes}" iteration="iteration"  as="prefix">
					<li class="nav-item" role="presentation">
						<button
							class="nav-link {f:if(condition: '{iteration.isFirst}', then: 'active')}"
							id="facet{facet.name}-prefix-{prefix}-tab"
							data-bs-toggle="tab"
							data-bs-target="#facet{facet.name}-prefix-{prefix}"
							type="button"
							role="tab"
							aria-controls="facet{facet.name}-prefix-{prefix}" aria-selected="true"
						>{prefix}</button>
					</li>
				</f:for>
			</ul>
			<div class="tab-content" id="facet{facet.name}-tabsContent">
				<f:for each="{prefixes}" iteration="iteration" as="prefix">
					<div class="tab-pane fade {f:if(condition: '{iteration.isFirst}', then: 'show active')}" id="facet{facet.name}-prefix-{prefix}" role="tabpanel" aria-labelledby="facet{facet.name}-{prefix}-tab">
						<s:facet.options.group.prefix.labelFilter options="{facet.options}" prefix="{prefix}">
							<ul class="list-group list-group-flush facet-option-list">
								<f:for each="{filteredOptions}" as="option">
									<li class="list-group-item d-flex justify-content-between">
										<a class="facet solr-ajaxified" href="{s:uri.facet.addFacetItem(facet: facet, facetItem: option)}">{option.label}</a>
										<span class="facet-result-count badge bg-info">{option.documentCount}</span>
									</li>
								</f:for>
							</ul>
						</s:facet.options.group.prefix.labelFilter>
					</div>
				</f:for>
			</div>

		</s:facet.options.group.prefix.labelPrefixes>
	</div>
</div>

</html>
