<%@ taglib prefix="c" uri="jakarta.tags.core" %>

<%@ attribute name="title" required="false" rtexprvalue="true" type="java.lang.String" %>
<%@ attribute name="marginTop" required="false" rtexprvalue="true" type="java.lang.Integer" %>
<%@ attribute name="marginBotttom" required="false" rtexprvalue="true" type="java.lang.Integer" %>

<%@ tag pageEncoding="UTF-8"%>
<%@ tag body-content="empty" %>

<c:set var="title"><c:choose><c:when test="${empty title}">Данные не найдены</c:when><c:otherwise>${title}</c:otherwise></c:choose></c:set>
<c:set var="marginTop" value="${empty marginTop ? 2 : marginTop}"></c:set>
<c:set var="marginBotttom" value="${empty marginBotttom ? 1 : marginBotttom}"></c:set>

<div class="alert alert-primary" role="alert" style="margin-top: ${marginTop}rem; margin-bottom: ${marginBotttom}rem;">${title}</div>
