import PeopleAltOutlinedIcon from '@mui/icons-material/PeopleAltOutlined';
import { ASSETS_URL } from '../../../consts/common';
import { CustomIcon } from '../../custom-icon';
import type { MainNavItem } from '../../@navigation/breadcrumbs';
import { SIDEBAR_ITEM_TYPES } from '../constants';

const sidebarItemsMap: Record<string, MainNavItem> = {
  dashboard: {
    name: 'Design Atoms',
    Icon: () => <CustomIcon color="inherit" src={`${ASSETS_URL}/icons/icon_customers.svg`} />,
    rootPath: '/dashboard',
    badgeText: 'New'
  },
  charts: {
    name: 'Charts',
    Icon: () => <CustomIcon color="inherit" src={`${ASSETS_URL}/icons/icon_userSettings.svg`} />,
    rootPath: '/charts'
  },
  marketing: {
    name: 'Marketing',
    Icon: PeopleAltOutlinedIcon,
    items: [
      { name: 'Collection Cohort', path: '/marketing/collection-cohort' },
      { name: 'All customers', path: '/marketing/all-customers' }
    ]
  },
  'dashboard-monitoring': {
    name: 'Dashboard',
    Icon: PeopleAltOutlinedIcon,
    items: [
      { name: 'Charts Page', path: '/dashboard-monitoring/charts-page' },
      { name: 'Table Page', path: '/dashboard-monitoring/table-page' }
    ]
  },
  arr: {
    name: 'ARR',
    Icon: PeopleAltOutlinedIcon,
    items: [
      { name: 'User Configuration', path: '/arr/user-configuration' },
      { name: 'ARR Activity', path: '/arr/arr-activty' },
      {
        name: 'ARR Cohort',
        path: '/arr/arr-cohort',
        badgeText: '2nd level badge'
      }
    ],
    badgeText: 'Try it'
  },
  cs: {
    name: 'CS',
    Icon: PeopleAltOutlinedIcon,
    items: [
      { name: 'Chrun Cohort', path: '/cs/chrun-cohort' },
      { name: 'Cancellations', path: '/cs/cancellations' },
      { name: 'Sarisfaction Board', path: '/cs/satisfaction-board' },
      {
        name: 'Agent Rollout',
        subItems: [
          {
            name: 'Rollout Versions',
            path: '/cs/agent-rollout/rollout-versions'
          },
          {
            name: 'Rollout Logs',
            path: '/cs/agent-rollout/rollout-logs'
          }
        ]
      },
      {
        name: 'Agent Rollin',
        subItems: [
          {
            name: 'Rollin Versions',
            path: '/cs/agent-rollout/rollout-versions'
          },
          {
            name: 'Rollin Logs',
            path: '/cs/agent-rollout/rollout-logs'
          }
        ]
      }
    ]
  },
  badge: {
    name: 'Badge Example',
    badgeText: 'hello',
    Icon: PeopleAltOutlinedIcon,
    items: [
      {
        name: 'Some Item',
        badgeText: 'from',
        path: '/badge/some-item',
        subItems: [
          {
            name: 'Another Item',
            badgeText: 'abra',
            path: '/badge/some-item/another-item'
          },
          {
            name: 'Another Item2',
            badgeText: 'some',
            path: '/badge/some-item/another-item2'
          },
          {
            name: 'Another Item3',
            badgeText: 'thing',
            path: '/badge/some-item/another-item3'
          }
        ]
      }
    ]
  }
};

export const sidebarItemsWithDecoratorsMap: Record<string, MainNavItem> = {
  dashboard: {
    name: 'Design Atoms',
    Icon: () => <CustomIcon color="inherit" src={`${ASSETS_URL}/icons/icon_customers.svg`} />,
    rootPath: '/dashboard',
    badgeText: 'New'
  },
  chartsSeparator: { name: 'chartsSeparator', type: SIDEBAR_ITEM_TYPES.SEPARATOR },
  charts: {
    name: 'Charts',
    Icon: () => <CustomIcon color="inherit" src={`${ASSETS_URL}/icons/icon_userSettings.svg`} />,
    rootPath: '/charts'
  },
  marketing: {
    name: 'Marketing',
    Icon: PeopleAltOutlinedIcon,
    items: [
      { name: 'Collection Cohort', path: '/marketing/collection-cohort' },
      { name: 'All customers', path: '/marketing/all-customers' }
    ]
  },
  arrSeparator: { name: 'arrSeparator', type: SIDEBAR_ITEM_TYPES.SEPARATOR },
  arrTitle: { name: 'Products', type: SIDEBAR_ITEM_TYPES.TITLE },
  'dashboard-monitoring': {
    name: 'Dashboard',
    Icon: () => <CustomIcon color="inherit" src={`${ASSETS_URL}/icons/icon_members.svg`} />,
    rootPath: '/dashboardMonitoring'
  },
  arr: {
    name: 'ARR',
    Icon: () => <CustomIcon color="inherit" src={`${ASSETS_URL}/icons/icon_members.svg`} />,
    rootPath: '/arr',
    badgeText: 'Try it'
  },
  csSeparator: { name: 'csSeparator', type: SIDEBAR_ITEM_TYPES.SEPARATOR },
  cs: {
    name: 'CS',
    Icon: () => <CustomIcon color="inherit" src={`${ASSETS_URL}/icons/icon_userSettings.svg`} />,
    rootPath: '/cs'
  },
  badge: {
    name: 'Badge Example',
    badgeText: 'hello',
    Icon: () => <CustomIcon color="inherit" src={`${ASSETS_URL}/icons/icon_members.svg`} />,
    rootPath: '/badge'
  }
};

export const mockClientsData = [
  {
    value: 'someid1',
    name: 'ingrammicro',
    content: {
      src: `${ASSETS_URL}/icons/icon_msp.svg`,
      title: 'Ingram Micro Inc',
      subtitle: 'Partner'
    },
    default: true
  },
  {
    value: 'someid2',
    name: 'hpjewels',
    content: {
      src: 'https://www.google.com/s2/favicons?domain=https://www.hydeparkjewelers.com',
      title: 'Hyde Park Jewelers',
      subtitle: 'Client'
    }
  },
  {
    value: 'someid3',
    name: 'tcgsolutions',
    content: {
      src: 'https://www.google.com/s2/favicons?domain=http://tcgsolutions.pro',
      title: 'TCG Solutions',
      subtitle: 'Client'
    }
  },
  {
    value: 'someid4',
    name: 'rorona',
    content: {
      src: `${ASSETS_URL}/icons/icon_msp.svg`,
      title: '121324324233231312 32423312321321321321312 32132131232132132213',
      subtitle: 'Client'
    }
  }
];

export default sidebarItemsMap;
