// components
import SvgIconStyle from '../../../components/SvgIconStyle';

// ----------------------------------------------------------------------

const getIcon = (name: string) => (
  <SvgIconStyle src={`/icons/${name}.svg`} sx={{ width: 1, height: 1 }} />
);

const ICONS = {
  user: getIcon('ic_user'),
  ecommerce: getIcon('ic_ecommerce'),
  analytics: getIcon('ic_analytics'),
  dashboard: getIcon('ic_dashboard'),
  hospital: getIcon('ic_banking'),
};

export const accessGroup = {
  admin: ["/report/logs"]
}

const navConfig = [
  // GENERAL
  // ----------------------------------------------------------------------
  {
    items: [{ title: 'Dashboard', path: '/dashboard', icon: ICONS.dashboard }],
  },

  // Membership
  // ----------------------------------------------------------------------
  {
    // subheader: 'DOCTORS & HOSPITALS',
    items: [
      // {
      //   title: 'Doctors',
      //   path: '/doctors',
      //   icon: ICONS.user,
      // },
      {
        title: 'DOCTORS & HOSPITALS',
        children: [
          { title: 'Doctors', path: '/master/doctors' },
          { title: 'Hospitals', path: '/master/hospitals' },
        ],
      },
      {
        title: 'PHARMACY & DELIVERY MANAGEMENT',
        children: [
          { title: 'Drug', path: '/master/drugs'},
          { title: 'Inventory', path: '/inventory' },
          { title: 'Delivery Services', path: '/delivery' },
        ],
      },
      {
        title: 'STATION BENEFIT & MEMBERSHIP',
        openWhen: ['/corporates', '/formularium', '/diagnosis', '/hospitals'],
        children: [
          { title: 'Corporate', path: '/corporates' },
          // { title: 'Corporate Create', path: '/corporates/create' },
          { title: 'Formularium', path: '/master/formularium-template-v2' },
          { title: 'Master ICD-10 Diagnosis', path: '/master/diagnosis' },
          { title: 'Hospitals', path: '/hospitals' },
        ],
      },
      {
        title: 'CLAIM REQUEST',
        path: '/claim-requests',
        // children: [
        //   { title: 'Request', path: '/case-request' },
        // ],
      },
      {
        title: 'CLAIM MANAGEMENT',
        path: '/claims',
        // children: [
        //   { title: 'Report', path: '/case-report' },
        // ],
      },
      {
        title: 'CASE MANAGEMENT',
        children: [
          { title: 'Daily Monitoring', path: '/case_management/daily_monitoring' },
          { title: 'Laboratorium Result', path: '/case_management/laboratorium_result' },
          { title: 'Inpatient Monitoring', path: '/case_management/inpatient_monitoring' },
        ],
      },
      {
        title: 'CUSTOMER SERVICES',
        children: [
          { title: 'Request', path: '/custormer-service/request' },
          // { title: 'Membership', path: '/cs-membership' },
          { title: 'Final LOG', path: '/custormer-service/final-log' },
        ],
      },
      {
        title: 'REPORT',
        children: [
          { title: 'Letter of Guarantee', path: '/report/logs' },
          { title: 'Appointment', path: '/report/appointments' },
          { title: 'Live Chat', path: '/report/live-chat' },
          { title: 'Linksehat Payment', path: '/report/linksehat-payments' },
          { title: 'Prescription', path: '/report/prescription' },
          { title: 'Doctor Rating', path: '/report/doctorrating' },

        ],
      },
      {
        title: 'MASTER',
        children: [
          { title: 'Diagnosis', path: '/master/diagnosis' },

        ],
      },
      {
        title: 'USER MANAGEMENT',
        children: [
          { title: 'User Access', path: '/master/diagnosis' },
          { title: 'User Role', path: '/master/diagnosis' },
        ],
      },
      {
        title: 'LINKING TOOLS',
        path: '/linking',
      },
    ],
  },
];

export default navConfig;
