<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jspf/taglibs.jsp"%>

<%-- Same show/hide-toggle wrapper as /user/process/queue/filter/item.jsp: emits a checkbox into
     the enclosing "Фильтры" selector's valuesHtml, and separately accumulates the actual control
     markup (hidden by default) into the request-scoped "filters" variable, echoed out once after
     the selector.
     Checkbox "id" is a per-render DOM id, only used to correlate the checkbox with its own
     .filter-item div on THIS page. Checkbox "value" is the filter's own stable ID (from the
     queue's config) - that's what gets persisted across reloads as "selectedFilters", so restoring
     checked state next time has something stable to match against. Caller sets "filterId" and
     "title" before including this. --%>

<c:set var="uiid" value="${u:uiid()}"/>

<li>
	<input id="${uiid}" type="checkbox" ${u:checkedFromCollection(selectedFilters, filterId)} value="${filterId}"/>
	<span>${title}</span>
</li>

<c:set var="filters" scope="request">${filters}<div id="${uiid}" style="display: none;" class="filter-item">${code}</div></c:set>

<c:remove var="uiid"/>
<c:remove var="filterId"/>
