$govNavItems */ /** @var int $govActiveParentIdx */ /** @var string $govActiveChildHref */ $activeParent = $govNavItems[$govActiveParentIdx] ?? $govNavItems[0] ?? null; $sidebarTitle = $activeParent['name'] ?? 'MY MENU'; $activeChildHref = strtolower(ltrim((string) ($govActiveChildHref ?? ''), '/')); // 모든 상위메뉴의 소메뉴에 어울리는 아이콘(Font Awesome solid) 매핑 — 이름 키워드 기준(구체적인 것 먼저). $showSidebarIcons = true; $sidebarIconFor = static function (string $name): string { $rules = [ '바코드' => 'fa-barcode', '스캐너' => 'fa-barcode', '번호' => 'fa-hashtag', '판매대장' => 'fa-book', '대장' => 'fa-book', '집계표' => 'fa-table-list', '일계표' => 'fa-table-list', '수불' => 'fa-right-left', '입출고' => 'fa-right-left', '무료' => 'fa-gift', '반품' => 'fa-rotate-left', '파기' => 'fa-trash-can', '신규' => 'fa-chart-column', '취소' => 'fa-ban', '발주파일' => 'fa-file-arrow-down', '발주' => 'fa-cart-shopping', '입고' => 'fa-dolly', '재고' => 'fa-warehouse', '불출' => 'fa-truck-ramp-box', '전화' => 'fa-phone', '접수' => 'fa-clipboard-list', '판매현황' => 'fa-chart-column', '판매소' => 'fa-store', '대행소' => 'fa-handshake', '담당자' => 'fa-user-tie', '대상자' => 'fa-user-check', '업체' => 'fa-building', '단가' => 'fa-won-sign', '코드' => 'fa-list-ol', '포장' => 'fa-box', '계획' => 'fa-clipboard-check', '실사' => 'fa-clipboard-check', '분석' => 'fa-chart-line', '추이' => 'fa-chart-line', '통계' => 'fa-chart-line', '홈텍스' => 'fa-file-invoice-dollar', '판매' => 'fa-cash-register', '현황' => 'fa-chart-column', '조회' => 'fa-magnifying-glass', '대시보드' => 'fa-gauge-high', '회원' => 'fa-users', '승인' => 'fa-user-check', '로그' => 'fa-clock-rotate-left', '이력' => 'fa-clock-rotate-left', '메뉴' => 'fa-bars', '지자체' => 'fa-city', '문의' => 'fa-comment-dots', '비밀번호' => 'fa-key', '설정' => 'fa-gear', '관리' => 'fa-folder-open', ]; foreach ($rules as $kw => $icon) { if (mb_stripos($name, $kw) !== false) { return $icon; } } if (stripos($name, 'password') !== false) { return 'fa-key'; } return 'fa-angle-right'; }; ?>