<!DOCTYPE html>
<html lang="ko"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
  <header th:fragment="headerFragment" class="d-flex flex-wrap justify-content-between py-1 px-3 border-bottom">
    <div sec:authorize="isAnonymous()">
      <a href="/" class="d-flex">
        <img id="logo" th:src="@{/img/logo.png}" alt="logo" title="logo">
        <!--<span class="fs-4">해양경찰청 파일관리 시스템</span>-->
      </a>
    </div>
    <div>
      <ul class="nav nav-pills">
        <th:block sec:authorize="hasRole('ROLE_ADMIN')">
        <li class="nav-item"><a href="/codeMgt/codeMgtPage" class="nav-link p-1 link-dark">코드관리</a></li>
        <li class="nav-item"><a href="/organMgt/organMgtPage" class="nav-link p-1 link-dark">관서설정</a></li>
        <li class="nav-item"><a href="/menuMgt/menuMgtPage" class="nav-link p-1 link-dark">메뉴관리</a></li>
        </th:block>
        <th:block sec:authorize="hasRole('ROLE_SUB_ADMIN')">
          <li class="nav-item"><a href="/userMgt/userMgtPage" class="nav-link p-1 link-dark">외사경찰관리</a></li>
          <li class="nav-item"><a href="/authMgt/authMgtPage" class="nav-link p-1 link-dark">권한설정</a></li>
          <li class="nav-item"><a href="#" class="nav-link p-1 link-dark">사용자로그</a></li>
          <li class="nav-item"><a href="#" class="nav-link p-1 link-dark">접속설정</a></li>
        </th:block>
      </ul>
    </div>
    <div sec:authorize="isAuthenticated()">
      <ul class="nav nav-pills">
        <li class="nav-item"><a href="#" class="nav-link p-1 link-dark"><i class="bi bi-bell-fill"></i></a></li>
        <li class="nav-item"><a href="/publicBoard/noticePage" class="nav-link p-1 link-dark">공지사항</a></li>
        <li class="nav-item"><a href="/publicBoard/boardPage" class="nav-link p-1 link-dark">게시판</a></li>
        <li class="nav-item"><a href="/publicBoard/referencePage" class="nav-link p-1 link-dark">자료실</a></li>
        <li class="nav-item"><a href="/publicBoard/qnaPage" class="nav-link p-1 link-dark">Q&A</a></li>
        <li class="nav-item"><a href="/user/myInfo" class="nav-link p-1 link-dark">마이페이지</a></li>
        <li class="nav-item"><a href="/logout" class="nav-link p-1 link-dark">로그아웃</a></li>
      </ul>
    </div>
  </header>
</html>