<!doctype html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head(title)">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="backoffice-can-mutate" th:content="${canMutate}">
  <meta name="backoffice-read-only" th:content="${readOnlyMode}">
  <title th:text="${title == (product?.pageTitle() ?: 'Data & AI Backoffice') ? title : title + ' · ' + (product?.pageTitle() ?: 'Data & AI Backoffice')}">Data &amp; AI Backoffice</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
  <link href="/css/app.css" rel="stylesheet">
  <!-- External UI helpers must not block initial HTML rendering.  In
       particular, schema-metadata is a server-rendered management page and
       remains usable while a client network delays the CDN. -->
  <script defer src="https://unpkg.com/htmx.org@2.0.4"></script>
  <script defer src="https://unpkg.com/alpinejs@3.14.8/dist/cdn.min.js"></script>
  <script defer src="/js/app.js"></script>
</head>
<body>
<nav th:fragment="nav" class="navbar rw-nav navbar-expand-lg" data-product-nav>
  <div class="container rw-nav-top">
    <a class="navbar-brand" href="/" th:text="${product?.displayName() ?: 'Data & AI Backoffice'}">Data &amp; AI Backoffice</a>
    <div class="rw-menu" aria-label="주요 메뉴">
      <button class="rw-menu-trigger" type="button" data-submenu-trigger="access" aria-controls="submenu-access" aria-expanded="false">운영 사용자 관리</button>
      <button class="rw-menu-trigger" type="button" data-submenu-trigger="protection" aria-controls="submenu-protection" aria-expanded="false">보호·검증</button>
      <button class="rw-menu-trigger" type="button" data-submenu-trigger="integration" aria-controls="submenu-integration" aria-expanded="false">연동 도구</button>
      <button class="rw-menu-trigger" type="button" data-submenu-trigger="operations" aria-controls="submenu-operations" aria-expanded="false">운영</button>
    </div>
    <div class="rw-nav-utility ms-auto">
      <a class="rw-quick-link" href="/permissions">행 접근 규칙</a>
      <a class="rw-quick-link" href="/tokens">토큰 발급</a>
      <button class="rw-admin-trigger" type="button" data-submenu-trigger="admin" aria-controls="submenu-admin" aria-expanded="false">관리자</button>
      <form method="post" action="/logout">
        <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
        <button class="btn btn-sm btn-outline-secondary" type="submit">로그아웃</button>
      </form>
    </div>
  </div>
  <div class="rw-submenu-bar" data-submenu-bar hidden>
    <div class="container">
      <div id="submenu-access" class="rw-submenu" data-submenu-panel="access" role="navigation" aria-label="접근 제어 메뉴" hidden>
          <a class="nav-link" href="/users">사용자 관리</a>
          <a class="nav-link" href="/groups">그룹 관리</a>
          <a class="nav-link" href="/roles">역할 관리</a>
          <a class="nav-link" href="/permissions">행 접근 규칙</a>
          <a class="nav-link" href="/user-masking-rules">컬럼 원문 표시 허용</a>
          <a class="nav-link" href="/effective-matrix">권한 현황</a>
      </div>
      <div id="submenu-protection" class="rw-submenu" data-submenu-panel="protection" role="navigation" aria-label="보호 및 검증 메뉴" hidden>
          <a class="nav-link" href="/vpd-policies">보호 상태</a>
          <a class="nav-link" href="/masking-rules">컬럼 마스킹</a>
          <a class="nav-link" href="/tokens">토큰 발급</a>
          <a class="nav-link" href="/probe">접근 검증</a>
      </div>
      <div id="submenu-integration" class="rw-submenu" data-submenu-panel="integration" role="navigation" aria-label="연동 도구 메뉴" hidden>
          <a class="nav-link" href="/objects">조회 대상</a>
          <a class="nav-link" href="/structured-data">정형 데이터 조회</a>
          <a class="nav-link" href="/ords-handlers">조회 연동</a>
          <a class="nav-link" href="/vector-knowledge">지식자료 관리</a>
          <a class="nav-link" href="/mcp-chatbot">대화형 검색</a>
          <a class="nav-link" href="/mcp-reasoning">검색 해석</a>
          <a class="nav-link" href="/mcp-sse">MCP 서비스</a>
          <a class="nav-link" href="/mcp-client-demo">연동 점검</a>
      </div>
      <div id="submenu-operations" class="rw-submenu" data-submenu-panel="operations" role="navigation" aria-label="운영 메뉴" hidden>
          <a class="nav-link" href="/operation-status">운영 현황</a>
      </div>
      <div id="submenu-admin" class="rw-submenu" data-submenu-panel="admin" role="navigation" aria-label="관리자 메뉴" hidden>
          <a class="nav-link" href="/vpd-filter-runtime">행 접근 필터 구조</a>
          <a class="nav-link" href="/schema-metadata">DB 메타데이터</a>
          <a class="nav-link" href="/security-sql-scripts">보안 SQL 스크립트</a>
          <a class="nav-link" href="/vpd-filter-policies">고급 접근 조건</a>
          <a class="nav-link" href="/settings">시스템 설정</a>
          <a class="nav-link" href="/settings/database">DB 준비 상태</a>
      </div>
    </div>
  </div>
</nav>

</body>
</html>
