import { TBreadCrumbMap, TBreadcrumbNameMap } from './types';
import { paths, Page } from 'pages/AppRoutes/constants';

// TODO: есть константы с URL'ами, но они не используются здесь
export const breadcrumbNameMap = (
  {
    correlation_rules,
    assets,
    events,
    ncircc,
    security_systems,
    accounts,
    profile,
    rotation,
    settings,
    license,
  }: TBreadcrumbNameMap,
  id?: number | string,
): TBreadCrumbMap => {
  return {
    '/assets': assets.dashboard,
    '/assets/groups': assets.groups,
    [`/assets/${id}`]: `${assets.details}: ${id}`,
    '/correlation_rules': correlation_rules.dashboard,
    '/correlation_rules/create': correlation_rules.create,
    '/correlation_rules/edit': correlation_rules.edit,
    '/events': events.dashboard,
    '/events/elk': events.elk,
    '/ncircc': ncircc.title,
    '/ncircc/information_exchange_message': ncircc.message,
    '/ncircc/information_exchange_bulletin': ncircc.bulletin,
    '/ncircc/api': ncircc.api,
    '/ncircc/organization_card': ncircc.organization_card,
    '/accounts': accounts.accounts,
    '/accounts/list': accounts.list,
    '/accounts/group': accounts.group,
    '/accounts/profile': profile.card,
    '/accounts/profile/groups': profile.groups,
    '/security_systems': security_systems.systems,
    '/security_systems/group': security_systems.groups,
    [`/security_systems/${id}`]: `${security_systems.details}: ${id}`,
    '/rotation': rotation.dashboard,
    '/rotation/incidents': rotation.incidents,
    '/rotation/events': rotation.events,
    '/settings': settings.dashboard,
    '/settings/tsl_certificate': settings.tls,
    '/settings/authentication': settings.authentication,
    '/license': license.dashboard,
    '/license/current': license.current,
    '/license/activation': license.activation,
  };
};
