<html th:lang="${#locale.country != '' ? #locale.language + '-' + #locale.country : #locale.language}"
    th:with="isAuth=${#authorization.expression('isAuthenticated()')}"
    th:attrappend="data-layout=${isAuth} ? 'semibox' : 'horizontal'" data-sidebar-visibility="show" data-topbar="light"
    data-sidebar="light" data-sidebar-size="lg" data-sidebar-image="none" data-preloader="disable"
    xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
    xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">

<head>
    <meta name="_csrf" th:content="${_csrf.token}" />
    <meta name="_csrf_header" th:content="${_csrf.headerName}" />

    <th:block layout:fragment="pagetitle" />
    <th:block th:replace="~{imprimelibros/partials/head-css :: head-css}" />
    <link href="/assets/libs/sweetalert2/sweetalert2.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/libs/select2/select2.min.css" rel="stylesheet" />
    <th:block layout:fragment="pagecss" />
</head>

<body>
    <div th:replace="~{imprimelibros/partials/topbar   :: topbar}" />
    <div th:if="${#authorization.expression('isAuthenticated()')}">
        <div th:replace="~{imprimelibros/partials/sidebar :: sidebar}" />
    </div>

    <section class="main-content">
        <div class="page-content">
            <div class="container-fluid">
                <section layout:fragment="content" th:remove="tag"></section>
            </div>
        </div>
        <div th:replace="~{imprimelibros/partials/footer :: footer}" />
    </section>

    <th:block layout:fragment="modal" />
    <th:block th:replace="~{theme/partials/vendor-scripts :: scripts}" />
    <script src="/assets/libs/jquery/jquery-3.6.0.min.js"></script>
    <script src="/assets/libs/sweetalert2/sweetalert2.min.js"></script>
    <script src="/assets/libs/select2/select2.min.js"></script>
    <th:block layout:fragment="pagejs" />
    <script th:src="@{/assets/js/app.js}"></script>
    <script th:src="@{/assets/js/pages/imprimelibros/languageBundle.js}"></script>
</body>

</html>