import React from 'react';

import { NavLink } from 'react-router-dom';
import URL from 'constants/url';
import {Accordion} from "react-bootstrap";

function EgovLeftNavAdmin({activeKey}) {
    return (
        <div className="nav">
            <div className="inner">
                <h2 className={"nav_title"}>사이트관리</h2>
                <Accordion defaultActiveKey={activeKey}>
                    <Accordion.Item eventKey={"0"}>
                        <Accordion.Header>환경설정</Accordion.Header>
                        <Accordion.Body>
                            <ul className="menu4">
                                <li><NavLink to={URL.ADMIN_BASE_CODE} className={({ isActive }) => (isActive ? "cur" : "")}>기본코드 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN_STANDARD_CODE} className={({ isActive }) => (isActive ? "cur" : "")}>건설기준코드 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN_COMMITTEE_CODE} className={({ isActive }) => (isActive ? "cur" : "")}>위원회코드 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN_MENU} className={({ isActive }) => (isActive ? "cur" : "")}>메뉴 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN_MENU_AUTH} className={({ isActive }) => (isActive ? "cur" : "")}>메뉴권한 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN_ABOUT_SITE} className={({ isActive }) => (isActive ? "cur" : "")}>관련사이트 관리</NavLink></li>
                            </ul>
                        </Accordion.Body>
                    </Accordion.Item>
                    
                    <Accordion.Item eventKey={"1"}>
                        <Accordion.Header>사용자현황</Accordion.Header>
                        <Accordion.Body>
                            <ul className="menu4">
                                <li><NavLink to={URL.ADMIN__USERS__LIST} className={({ isActive }) => (isActive ? "cur" : "")}>사용자 현황</NavLink></li>
                            </ul>
                        </Accordion.Body>
                    </Accordion.Item>
                    
                    <Accordion.Item eventKey={"2"}>
                        <Accordion.Header>게시판현황</Accordion.Header>
                        <Accordion.Body>
                            <ul className="menu4">
                                <li><NavLink to={URL.ADMIN__BOARDS__LIST} className={({ isActive }) => (isActive ? "cur" : "")}>게시판 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN__BOARDS__POSTS} className={({ isActive }) => (isActive ? "cur" : "")}>게시물 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN__BOARDS__KEYWORDS} className={({ isActive }) => (isActive ? "cur" : "")}>키워드 관리</NavLink></li>
                            </ul>
                        </Accordion.Body>
                    </Accordion.Item>
                    
                    <Accordion.Item eventKey={"3"}>
                        <Accordion.Header>건설기준관리</Accordion.Header>
                        <Accordion.Body>
                            <ul className="menu4">
                                <li><NavLink to={URL.ADMIN__STANDARDS__REFERENCE_CODES} className={({ isActive }) => (isActive ? "cur" : "")}>참조코드 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN__STANDARDS__API_KYES} className={({ isActive }) => (isActive ? "cur" : "")}>API KEY 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN__STANDARDS__SIMILARITY_CHECK} className={({ isActive }) => (isActive ? "cur" : "")}>유사성 검사</NavLink></li>
                                <li><NavLink to={URL.ADMIN__STANDARDS__INFO_DISCLOSURE} className={({ isActive }) => (isActive ? "cur" : "")}>건설기준 내용 관리</NavLink></li>
                            </ul>
                        </Accordion.Body>
                    </Accordion.Item>                    

                    <Accordion.Item eventKey={"4"}>
                        <Accordion.Header>컨텐츠관리</Accordion.Header>
                        <Accordion.Body>
                            <ul className="menu4">
                                <li><NavLink to={URL.ADMIN__CONTENTS__SURVEY} className={({ isActive }) => (isActive ? "cur" : "")}>설문 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN__CONTENTS__POP_UP} className={({ isActive }) => (isActive ? "cur" : "")}>팝업 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN__CONTENTS__STANDARDS_RESEARCH} className={({ isActive }) => (isActive ? "cur" : "")}>건설기준연구 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN__CONTENTS__TEXT_MESSAGES} className={({ isActive }) => (isActive ? "cur" : "")}>문자 발송</NavLink></li>
                            </ul>
                        </Accordion.Body>
                    </Accordion.Item>
                    
                    <Accordion.Item eventKey={"5"}>
                        <Accordion.Header>위원회관리</Accordion.Header>
                        <Accordion.Body>
                            <ul className="menu4">
                                <li><NavLink to={URL.ADMIN__COMMITTEE__PROGRESS_STATUS} className={({ isActive }) => (isActive ? "cur" : "")}>진행현황 관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN__COMMITTEE__SCHEDULES} className={({ isActive }) => (isActive ? "cur" : "")}>위원회 일정 관리</NavLink></li>
                            </ul>
                        </Accordion.Body>
                    </Accordion.Item>
                    
                    <Accordion.Item eventKey={"6"}>
                        <Accordion.Header>로그현황</Accordion.Header>
                        <Accordion.Body>
                            <ul className="menu4">
                                <li><NavLink to={URL.ADMIN__LOGS__MENU_ACCESS_INFO} className={({ isActive }) => (isActive ? "cur" : "")}>메뉴별 접속 현황</NavLink></li>
                                <li><NavLink to={URL.ADMIN__LOGS__USER_CONNECTIONS} className={({ isActive }) => (isActive ? "cur" : "")}>사용자 접속 현황</NavLink></li>
                                <li><NavLink to={URL.ADMIN__LOGS__PRIVACY_LOGS} className={({ isActive }) => (isActive ? "cur" : "")}>개인정보 로그</NavLink></li>
                                <li><NavLink to={URL.ADMIN__LOGS__FILE_DOWNLOAD_STATUS} className={({ isActive }) => (isActive ? "cur" : "")}>파일 다운 현황</NavLink></li>
                            </ul>
                        </Accordion.Body>
                    </Accordion.Item>
                    <Accordion.Item eventKey={"7"}>
                        <Accordion.Header>전자정부 기본 메뉴</Accordion.Header>
                        <Accordion.Body>
                            <ul className="menu4">
                                <li><NavLink to={URL.ADMIN_SCHEDULE} className={({ isActive }) => (isActive ? "cur" : "")}>일정관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN_BOARD} className={({ isActive }) => (isActive ? "cur" : "")}>게시판생성관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN_USAGE} className={({ isActive }) => (isActive ? "cur" : "")}>게시판사용관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN_NOTICE} className={({ isActive }) => (isActive ? "cur" : "")}>공지사항관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트갤러리관리</NavLink></li>
                                <li><NavLink to={URL.ADMIN_MANAGER} className={({ isActive }) => (isActive ? "cur" : "")}>사이트관리자 암호변경</NavLink></li>
                            </ul>
                        </Accordion.Body>
                    </Accordion.Item>
                </Accordion>

            </div>
        </div>
    );
}

export default React.memo(EgovLeftNavAdmin);