import { NavLink } from 'react-router-dom'
import { useState } from 'react'
interface NavItem { label: string; path?: string; icon: string; children?: NavItem[] }
const NAV: NavItem[] = [
{ label: 'λμ보λ', icon: 'π', path: '/' },
{ label: 'μΈνλΌ κ΄λ¦¬', icon: 'π₯οΈ', children: [
{ label: 'μλ² λͺ©λ‘', icon: '', path: '/servers' },
{ label: 'CMDB νν©', icon: '', path: '/cmdb' },
]},
{ label: 'λ°°ν¬/CI-CD', icon: 'π', children: [
{ label: 'λ°°ν¬ μ΄λ ₯', icon: '', path: '/deployments' },
{ label: 'μ μ₯μ λͺ©λ‘',icon: '', path: '/repos' },
]},
{ label: 'μ¬μ©μ/ν
λνΈ',icon: 'π₯', children: [
{ label: 'μ¬μ©μ κ΄λ¦¬',icon: '', path: '/users' },
{ label: 'κΈ°κ΄ κ΄λ¦¬', icon: '', path: '/institutions' },
]},
{ label: '보μ', icon: 'π', children: [
{ label: 'API Key', icon: '', path: '/api-keys' },
{ label: 'κ°μ¬ λ‘κ·Έ', icon: '', path: '/audit' },
]},
{ label: 'AI / LLM', icon: 'π€', path: '/llm' },
{ label: 'μμ€ν
μ€μ ', icon: 'βοΈ', children: [
{ label: 'νκ²½λ³μ', icon: '', path: '/config/env' },
{ label: 'Nginx κ΄λ¦¬', icon: '', path: '/config/nginx' },
]},
{ label: 'μλ¦Ό/리ν¬νΈ', icon: 'π', path: '/notifications' },
{ label: 'μ€ν¬λ©ν λ΄', icon: 'π·οΈ', path: '/scraping' },
{ label: 'λΌμ΄μ μ€ κ΄λ¦¬',icon: 'πͺͺ', path: '/licenses' },
{ label: 'λ°μ΄ν° μ°λ', icon: 'π', path: '/export-import' },
{ label: 'μ΄μ κ΄μ ', icon: 'π°οΈ', children: [
{ label: 'DR μ¬ν΄λ³΅κ΅¬', icon: '', path: '/dr' },
{ label: 'λ€νΈμν¬ μ₯λΉ', icon: '', path: '/network' },
{ label: 'CSAP μ κ²', icon: '', path: '/csap' },
]},
// ββ GUARDiA νμ₯ v3 ββ
{ label: 'λΆμ Β· KPI', icon: 'π', children: [
{ label: 'KPI λμ보λ', icon: '', path: '/kpi' },
{ label: 'BI λμ보λ', icon: '', path: '/bi' },
]},
{ label: 'AI νλ«νΌ', icon: 'π§ ', path: '/ai-platform' },
{ label: 'μΈλΆ μ°λ', icon: 'π', path: '/integrations' },
{ label: 'ꡬλ
Β· κ³ΌκΈ', icon: 'π°', path: '/billing' },
]
/* Variant μ€νμΌ μμ μμ */
const V = {
navy: '#003366',
blue: '#005A8C',
cyan: '#00A0C8',
cyanLt: 'rgba(0,160,200,.10)',
cyanAct: 'rgba(0,160,200,.15)',
muted: '#64748B',
text: '#334155',
border: '#E2E8F0',
bg: '#F8FAFC',
}
function NavGroup({ item }: { item: NavItem }) {
const [open, setOpen] = useState(true)
if (!item.children) {
return (