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

<c:if test="${not empty paramList}">
<div class="tile">
<c:forEach var="item" varStatus="status" items="${paramList}">
<c:choose>
	<c:when test="${item.type == -1}"> <%-- SEPARATOR --%>
		<c:if test="${item.customerRead}"><div class="titleFont2" style="padding: 5px 20px; background-color: #eee;">${item.title}</div><div class="line" style="margin-top: 0px;"></div></c:if>
	</c:when>
	<c:otherwise>
		<c:if test="${item.customerRead or item.customerWrite}">
 		<div class="flexRow" style="margin: 10px;">
 			<div style="display: flex; flex-direction: column; align-content: flex-start; ">
				<div class="paramColor paramFont" style="">${item.title}</div>				
				<div style="padding: 5px 20px;" id="param_${item.type}_${item.id}">
				<c:choose>
					<c:when test="${item.customerRead and item.type == 9}"><c:out value="${paramValue[item.id]}"/></c:when>
					<c:when test="${item.customerRead and item.type == 3}"><c:choose><c:when test="${not empty paramValue[item.id] && paramValue[item.id] == 1}">включено</c:when><c:otherwise>выключено</c:otherwise></c:choose></c:when>
					<c:when test="${item.customerRead}">${paramValue[item.id]}</c:when>
					<c:otherwise>&lt; СКРЫТО &gt;</c:otherwise>
				</c:choose>
				</div>
			</div>
			<div>
			<c:choose>
				<c:when test="${item.customerWrite and ( item.type == 1 or item.type == 9 or item.type == 3 or item.type == 5 or item.type == 4 or item.type == 10 )}"><img src="${pageContext.request.contextPath}/img/edit.png" class="iconButton" title="редактирование" onclick="showBlock( 'parametersRoot', 'showEditor', { ...parametersQuery, paramId: ${item.id} } ); return false;"/></c:when>
				<c:otherwise><div param_write="${item.customerWrite}" param_read="${item.customerRead}" param_type="${item.type}" param_id="${item.id}"></div></c:otherwise>
			</c:choose>
			</div>
		</div>
		<c:if test="${not status.last}"><div class="line"></div></c:if>
		</c:if>
	</c:otherwise>
</c:choose>
</c:forEach>
</div>

</c:if>
