// 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'),
};

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: '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' },
          { title: 'Obat', path: '/master/drugs' },
          { title: 'Diagnosis Library (ICD-X)', 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: 'Request', path: '/case-request' },
        // ],
      },
      {
        title: 'CUSTOMER SERVICES',
        children: [{ title: 'Request', path: '/cs-request' }],
      },
      {
        title: 'REPORT',
        children: [
          { title: 'Appointment', path: '/report/appointments' },
          { title: 'Live Chat', path: '/report/live-chat' },
          { title: 'Linksehat Payment', path: '/report/linksehat-payments' },
        ],
      },
      {
        title: 'USER MANAGEMENT',
        path: '/users',
      },
      {
        title: 'LINKING TOOLS',
        path: '/linking',
      },
    ],
  },
];

export default navConfig;
