/**
 * @author : 최정우
 * @since : 2022.09.20
 * @dscription : Application의 Route 정보를 관리하는 Component 입니다.
 */
import React from "react";
//react router 라이브러리 import
import { Routes, Route } from "react-router-dom";

import HouseIcon from "@mui/icons-material/House";
import PersonIcon from "@mui/icons-material/Person";
import CorporateFareIcon from '@mui/icons-material/CorporateFare';
import Diversity1Icon from "@mui/icons-material/Diversity1";
import SpeakerPhoneIcon from "@mui/icons-material/SpeakerPhone";
import SettingsIcon from "@mui/icons-material/Settings";
import ConstructionIcon from '@mui/icons-material/Construction';
import EqualizerIcon from '@mui/icons-material/Equalizer';
import ApartmentIcon from '@mui/icons-material/Apartment';
import LocalHospitalIcon from '@mui/icons-material/LocalHospital';
import QuestionMarkIcon from '@mui/icons-material/QuestionMark';
import ContactSupportIcon from '@mui/icons-material/ContactSupport';


import Main_government from "./main/Main_government.jsx";
import Main_guardian from "./main/Main_guardian.jsx";
import Main_agency from "./main/Main_agency.jsx";
import Main_agencyAdmin from "./main/Main_agencyAdmin.jsx";
import Main from "./main/Main.jsx";
import SeniorEdit from "./senior_management/SeniorEdit.jsx";
import SeniorSelectOne from "./senior_management/SeniorSelectOne.jsx";
import MedicineCareSelectOne from "./healthcare/medicinecare/MedicineCareSelectOne.jsx";
import TemperatureManagementSelectOne from "./healthcare/temperature/TemperatureManagementSelectOne.jsx";
import MedicineStatistics from "./healthcare/statistics/MedicineStatistics.jsx";
import GuardianStatistics from "./healthcare/statistics/GuardianStatistics.jsx";
import VisitInsert from "./visit/visit/VisitInsert.jsx";
import VisitSelectOne from "./visit/visit/VisitSelectOne.jsx";
import EquipmentRentalInsert from "./equipment/EquipmentRentalInsert.jsx";
import EquipmentSelect from "./equipment/EquipmentSelect.jsx";
import GovernmentEquipmentSelect from "./equipment/GovernmentEquipmentSelect.jsx";
import AgencyEquipmentSelect from "./equipment/AgencyEquipmentSelect.jsx";
import EquipmentManagementSelectOne from "./equipment/EquipmentManagementSelectOne.jsx";
import UserSelect from "./user_management/UserSelect.jsx";
import AgencySeniorSelect from "./user_management/AgencySeniorSelect.jsx";
import AgencyAdminSeniorSelect from "./user_management/AgencyAdminSeniorSelect.jsx";
import QandASelect from "./callcenter/QandASelect.jsx";
import QandASelectOne from "./callcenter/QandASelectOne.jsx";
import QandAInsert from "./callcenter/QandAInsert.jsx";
import QandAUpdate from "./callcenter/QandAUpdate.jsx";

import EquipmentManagementInsert from "./equipment/EquipmentManagementInsert.jsx";
import EquipmentManagementSelectAdd from "./equipment/EquipmentManagementSelectAdd.jsx";
import RiskSet from "./setting/RiskSet.jsx";

import QuestionConfirm from "./callcenter/QuestionConfirm.jsx";
import UserSelectOk from "./user_management/UserSelectOk.jsx";
import AuthorityManagement from "./setting/AuthorityManagement.jsx";
import AgencyInsert from "./user_management/AgencyInsert.jsx";
import AgencySelect from "./user_management/AgencySelect.jsx";
import ProtectorSelect from "./user_management/ProtectorSelect.jsx";
import QuestionSelect from "./callcenter/QuestionSelect.jsx";
import Join from "./join/Join.jsx";
import Healthcare from "./healthcare/Healthcare.jsx"
import HealthcareAdmin from "./healthcare/HealthcareAdmin.jsx"
import Medicalcare from "./healthcare/Medicalcare.jsx"
import MedicalcareAdmin from "./healthcare/MedicalcareAdmin.jsx"
import HealthcareSelectOne from "./healthcare/HealthcareSelectOne.jsx"

import UserEdit from "./user_management/UserEdit.jsx";
import AgentSelectOne from "./user_management/AgentSelectOne.jsx";

import OrgSelect from "./org/OrgSelect.jsx";


const AdminAppMenuItems = [
  {
    title: "Home",
    path: "/",
    icon: <HouseIcon sx={{ fontSize: 20, marginRight: 1 }} />,
  },
  {
    title: "기관 관리",
    path: "/OrgSelect",
    icon: (
      <CorporateFareIcon
        sx={{ fontSize: 20, marginRight: 1 }}
      />
    ),
  },
  {
    title: "사용자 관리",
    path: "/UserSelect",
    icon: (
      <PersonIcon
        sx={{ fontSize: 20, marginRight: 1 }}
      />
    ),
  },
  {
    title: "장비 관리",
    path: "/EquipmentSelect",
    icon: (
      <SpeakerPhoneIcon
        sx={{ fontSize: 20, marginRight: 1 }}
      />
    ),
  },
  {
    title: "문의 관리",
    path: "/QandASelect",
    icon: (
      <ContactSupportIcon
        sx={{ fontSize: 20, marginRight: 1 }}
      />
    ),
  },
  /* {
    title: "대상자 관리",
    icon: (
      <Diversity1Icon
        sx={{ fontSize: 20, marginRight: 1 }}
      />
    ),
    childrens: [
      {
        title: "생활 복지 관리",
        path: "/Healthcare",
      },
      {
        title: "건강 관리",
        path:"/Medicalcare",
      },
    ],
  }, */


];
function AdminAppRoute() {
  return (
    <Routes>

      <Route path="/Medicalcare" element={<Medicalcare />}></Route>
      <Route path="/Healthcare" element={<Healthcare />}></Route>
      <Route path="/" element={<Main />}></Route>
      <Route path="/EquipmentRentalInsert" element={<EquipmentRentalInsert />}></Route>
      <Route path="/EquipmentManagementInsert" element={<EquipmentManagementInsert />}></Route>
      <Route path="/EquipmentSelect" element={<EquipmentSelect />}></Route>
      <Route path="/EquipmentManagementSelectOne" element={<EquipmentManagementSelectOne />}></Route>
      <Route path="/MedicineCareSelectOne" element={<MedicineCareSelectOne />}></Route>
      <Route path="/TemperatureManagementSelectOne" element={<TemperatureManagementSelectOne />}></Route>
      <Route path="/VisitSelectOne" element={<VisitSelectOne />}></Route>
      <Route path="/QandAInsert" element={<QandAInsert />}></Route>
      <Route path="/QandAUpdate" element={<QandAUpdate />}></Route>
      <Route path="/QandASelect" element={<QandASelect />}></Route>
      <Route path="/EquipmentManagementSelectAdd" element={<EquipmentManagementSelectAdd />}></Route>
      <Route path="/UserSelect" element={<UserSelect />}></Route>
      <Route path="/QandASelectOne" element={<QandASelectOne />}></Route>
      <Route path="/Join" element={<Join />}></Route>
      <Route path="/SeniorEdit" element={<SeniorEdit />}></Route>
      <Route path="/SeniorSelectOne" element={<SeniorSelectOne />}></Route>
      <Route path="/UserEdit" element={<UserEdit />}></Route>
      <Route path="/AgentSelectOne" element={<AgentSelectOne />}></Route>
      <Route path="/OrgSelect" element={<OrgSelect />}></Route>
      <Route path="/MedicineStatistics" element={<MedicineStatistics />}></Route>

    </Routes>
  );
}


const GovernmentAppMenuItems = [
  {
    title: "Home",
    path: "/",
    icon: <HouseIcon sx={{ fontSize: 20, marginRight: 1 }} />,
  },
  {
    title: "기관 관리",
    path: "/OrgSelect",
    icon: (
      <CorporateFareIcon
        sx={{ fontSize: 20, marginRight: 1 }}
      />
    ),
  },
  {
    title: "사용자 관리",
    path: "/UserSelect",
    icon: (
      <PersonIcon
        sx={{ fontSize: 20, marginRight: 1 }}
      />
    ),
  },
  {
    title: "장비 관리",
    path: "/GovernmentEquipmentSelect",
    icon: (
      <SpeakerPhoneIcon
        sx={{ fontSize: 20, marginRight: 1 }}
      />
    ),
  },
  /* {
    title: "대상자 관리",
    icon: (
      <Diversity1Icon
        sx={{ fontSize: 20, marginRight: 1 }}
      />
    ),
    childrens: [
      {
        title: "생활 복지 관리",
        path: "/Healthcare",
      },
      {
        title: "건강 관리",
        path:"/Medicalcare",
      },
    ],
  }, */
  /* {
    title: "설정 관리",
    icon: (
      <SettingsIcon sx={{ fontSize: 20, marginRight: 1 }} />
    ),
    childrens: [
      {
        title: "위험 기준 관리",
        path: "/RiskSet",
      },
      {
        title: "사용자 권한 관리",
        path: "/AuthorityManagement",
      },
    ],
  }, */
  {
    title: "문의 현황 조회",
    path: "/QandASelect",
    icon: (
      <ContactSupportIcon
        sx={{ fontSize: 20, marginRight: 1 }}
      />
    )
  },
  {
    title: "위험 기준 관리",
    path: "/RiskSet",
    icon: (
      <SettingsIcon sx={{ fontSize: 20, marginRight: 1 }} />
    )
  }
];
function GovernmentAppRoute() {
  return (
    <Routes>

      <Route path="/Medicalcare" element={<Medicalcare />}></Route>
      <Route path="/Healthcare" element={<Healthcare />}></Route>
      <Route path="/" element={<Main_government />}></Route>
      <Route path="/AgencySelect" element={<AgencySelect />}></Route>
      <Route path="/UserSelectOk" element={<UserSelectOk />}></Route>
      <Route path="/MedicineCareSelectOne" element={<MedicineCareSelectOne />}></Route>
      <Route path="/TemperatureManagementSelectOne" element={<TemperatureManagementSelectOne />}></Route>
      <Route path="/MedicineStatistics" element={<MedicineStatistics />} ></Route>
      <Route path="/VisitInsert" element={<VisitInsert />}></Route>
      <Route path="/VisitSelectOne" element={<VisitSelectOne />}></Route>
      <Route path="/UserSelect" element={<UserSelect />}></Route>
      <Route path="/RiskSet" element={<RiskSet />}></Route>
      {/* <Route path="/AuthorityManagement" element={<AuthorityManagement />}></Route> */}
      <Route path="/QandASelect" element={<QandASelect />}></Route>
      <Route path="/QandASelectOne" element={<QandASelectOne />}></Route>
      <Route path="/QandAInsert" element={<QandAInsert />}></Route>
      <Route path="/QandAUpdate" element={<QandAUpdate />}></Route>
      <Route path="/ProtectorSelect" element={<ProtectorSelect />}></Route>
      <Route path="/AgencyInsert" element={<AgencyInsert />}></Route>
      <Route path="/Join" element={<Join />}></Route>
      <Route path="/SeniorEdit" element={<SeniorEdit />}></Route>
      <Route path="/SeniorSelectOne" element={<SeniorSelectOne />}></Route>
      <Route path="/UserEdit" element={<UserEdit />}></Route>
      <Route path="/AgentSelectOne" element={<AgentSelectOne />}></Route>
      <Route path="/OrgSelect" element={<OrgSelect />}></Route>
      <Route path="/GovernmentEquipmentSelect" element={<GovernmentEquipmentSelect />}></Route>
    </Routes>
  );
}
const AgencyAdminAppMenuItems = [
  {
    title: "Home",
    path: "/",
    icon: <HouseIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />,
  },
  {
    title: "대상자 관리",
    path: "/AgencyAdminSeniorSelect",
    icon: (
      <PersonIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
    ),
  },
  {
    title: "장비 사용 현황",
    path: "/AgencyEquipmentSelect",
    icon: (
      <SpeakerPhoneIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
    ),
  },
  {
    title: "생활 복지 관리",
    path: "/HealthcareAdmin",
    icon: (
      <Diversity1Icon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
    ),
  },
  {
    title: "건강 관리",
    path: "/MedicalcareAdmin",
    icon: (
      <LocalHospitalIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
    ),
  },
  {
    title: "문의하기",
    path: "/QandASelect",
    icon: (
      <ContactSupportIcon
        sx={{ fontSize: 20, color: "#333333", marginRight: 1 }}
      />
    ),
  },
];
function AgencyAdminAppRoute() {
  return (
    <Routes>

      <Route path="/MedicalcareAdmin" element={<MedicalcareAdmin />}></Route>
      <Route path="/HealthcareAdmin" element={<HealthcareAdmin />}></Route>
      <Route path="/Join" element={<Join />}></Route>
      <Route path="/QuestionSelect" element={<QuestionSelect />}></Route>

      <Route path="/" element={<Main_agencyAdmin />}></Route>
      <Route path="/AgencyAdminSeniorSelect" element={<AgencyAdminSeniorSelect />}></Route>
      <Route path="/SeniorEdit" element={<SeniorEdit />}></Route>
      <Route path="/SeniorSelectOne" element={<SeniorSelectOne />}></Route>
      <Route path="/UserEdit" element={<UserEdit />}></Route>
      <Route path="/AgentSelectOne" element={<AgentSelectOne />}></Route>
      <Route
        path="/HealthcareSelectOne"
        element={<HealthcareSelectOne />}
      ></Route>
      <Route
        path="/MedicineCareSelectOne"
        element={<MedicineCareSelectOne />}
      ></Route>
      <Route
        path="/TemperatureManagementSelectOne"
        element={<TemperatureManagementSelectOne />}
      ></Route>
      <Route path="/VisitInsert" element={<VisitInsert />}></Route>
      <Route path="/VisitSelectOne" element={<VisitSelectOne />}></Route>
      <Route
        path="/EquipmentRentalInsert"
        element={<EquipmentRentalInsert />}
      ></Route>
      <Route
        path="/AgencyEquipmentSelect"
        element={<AgencyEquipmentSelect />}
      ></Route>
      <Route
        path="/QandASelect"
        element={<QandASelect />}
      ></Route>
      <Route path="/QandAInsert" element={<QandAInsert />}></Route>
      <Route path="/QandAUpdate" element={<QandAUpdate />}></Route>
      <Route path="/QandASelectOne" element={<QandASelectOne />}></Route>
    </Routes>
  );
}
const AgencyAppMenuItems = [
  {
    title: "Home",
    path: "/",
    icon: <HouseIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />,
  },
  {
    title: "대상자 관리",
    path: "/AgencySeniorSelect",
    icon: (
      <PersonIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
    ),
  },
  /* {
    title: "장비 사용 현황",
    path: "/GovernmentEquipmentSelect",
    icon: (
      <SpeakerPhoneIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
    ),
  }, */
  {
    title: "생활 복지 관리",
    path: "/Healthcare",
    icon: (
      <Diversity1Icon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
    ),
  },
  {
    title: "건강 관리",
    path: "/Medicalcare",
    icon: (
      <LocalHospitalIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
    ),
  },
  {
    title: "문의하기",
    path: "/QandASelect",
    icon: (
      <ContactSupportIcon
        sx={{ fontSize: 20, color: "#333333", marginRight: 1 }}
      />
    ),
  },
];
function AgencyAppRoute() {
  return (
    <Routes>

      <Route path="/Medicalcare" element={<Medicalcare />}></Route>
      <Route path="/Healthcare" element={<Healthcare />}></Route>
      <Route path="/Join" element={<Join />}></Route>
      <Route path="/QuestionSelect" element={<QuestionSelect />}></Route>

      <Route path="/" element={<Main_agency />}></Route>
      <Route path="/AgencySeniorSelect" element={<AgencySeniorSelect />}></Route>
      <Route path="/SeniorEdit" element={<SeniorEdit />}></Route>
      <Route path="/SeniorSelectOne" element={<SeniorSelectOne />}></Route>
      <Route path="/UserEdit" element={<UserEdit />}></Route>
      <Route path="/AgentSelectOne" element={<AgentSelectOne />}></Route>
      <Route
        path="/HealthcareSelectOne"
        element={<HealthcareSelectOne />}
      ></Route>
      <Route
        path="/MedicineCareSelectOne"
        element={<MedicineCareSelectOne />}
      ></Route>
      <Route
        path="/TemperatureManagementSelectOne"
        element={<TemperatureManagementSelectOne />}
      ></Route>
      <Route path="/VisitInsert" element={<VisitInsert />}></Route>
      <Route path="/VisitSelectOne" element={<VisitSelectOne />}></Route>
      <Route
        path="/EquipmentRentalInsert"
        element={<EquipmentRentalInsert />}
      ></Route>
      <Route
        path="/GovernmentEquipmentSelect"
        element={<GovernmentEquipmentSelect />}
      ></Route>
      <Route
        path="/QandASelect"
        element={<QandASelect />}
      ></Route>
      <Route path="/QandAInsert" element={<QandAInsert />}></Route>
      <Route path="/QandAUpdate" element={<QandAUpdate />}></Route>
      <Route path="/QandASelectOne" element={<QandASelectOne />}></Route>
    </Routes>
  );
}
const GuardianAppMenuItems = [
  {
    title: "Home",
    path: "/",
    icon: <HouseIcon sx={{ fontSize: 20, marginRight: 1 }} />,
  },
  // {
  //   title: "그래프로 보기",
  //   path: "/GuardianStatistics",
  //   icon: <EqualizerIcon sx={{ fontSize: 20, marginRight: 1 }} />,
  // },
  // {
  //   title: "문의하기",
  //   path: "/QandASelect",
  //   icon: (
  //     <ContactSupportIcon
  //       sx={{ fontSize: 20, marginRight: 1 }}
  //     />
  //   ),
  // },
];
function GuardianAppRoute() {
  return (
    <Routes>
      <Route path="/GuardianStatistics" element={<GuardianStatistics />}></Route>
      <Route path="/" element={<Main_guardian />}></Route>
      <Route path="/QandAInsert" element={<QandAInsert />}></Route>
      <Route path="/QandASelect" element={<QandASelect />}></Route>
      <Route path="/QandASelectOne" element={<QandASelectOne />}></Route>
      <Route path="/QandAUpdate" element={<QandAUpdate />}></Route>
    </Routes>
  );
}

const AdminApp = { 'menuItems': AdminAppMenuItems, 'AppRoute': AdminAppRoute };
const GovernmentApp = { 'menuItems': GovernmentAppMenuItems, 'AppRoute': GovernmentAppRoute };
const AgencyAdminApp = { 'menuItems': AgencyAdminAppMenuItems, 'AppRoute': AgencyAdminAppRoute };
const AgencyApp = { 'menuItems': AgencyAppMenuItems, 'AppRoute': AgencyAppRoute };
const GuardianApp = { 'menuItems': GuardianAppMenuItems, 'AppRoute': GuardianAppRoute };

export default AdminApp;
export { AdminApp, GovernmentApp, GuardianApp, AgencyApp, AgencyAdminApp };
