{namespace vh=Newland\NeosViewHelpers\ViewHelpers}

<f:if condition="{options}">
    <div class="tb-results-filter__list-item-content">
        <h2 class="tb-results-filter__heading text-xl">{title}</h2>
        <ul class="tb-results-filter__facet-list">

            <f:for each="{options}" as="option">
                <li>
                    <label for="{option.id}">
                        <input
                            type="checkbox"
                            name="{queryString}[]"
                            id="{option.id}"
                            class="mt-0"
                            value="{f:if(condition: option.queryString, then: option.queryString, else: option.value)}"
                            {f:if(condition: '{vh:collection.includesValue(collection: stateValues, value: option.value)}', then: 'checked="checked" aria-checked="true"', else: 'aria-checked="false"')} />
                        {option.label}
                    </label>
                </li>
            </f:for>
        </ul>
    </div>
</f:if>
