import type { KeepAliveEntry } from '../types/keepAlive.types';
import { AdminLanguagesPage } from '../pages/admin/AdminLanguagesPage';
import { CommcoachSessionView } from '../pages/views/commcoach';
import { GraphicalEditorPage } from '../pages/views/graphicalEditor/GraphicalEditorPage';
import { WorkspacePage } from '../pages/views/workspace/WorkspacePage';
export const KEEP_ALIVE_ROUTES: KeepAliveEntry[] = [
{
id: 'workspace-dashboard',
pathRegex: /\/mandates\/[^/]+\/workspace\/[^/]+\/dashboard/,
scopeRegex: /\/mandates\/([^/]+)\/workspace\/([^/]+)/,
requireMandateForMount: false,
render: ({ instanceId, scopeKey }) => (
),
},
{
id: 'commcoach-session',
pathRegex: /\/mandates\/[^/]+\/commcoach\/[^/]+\/session/,
scopeRegex: /\/mandates\/([^/]+)\/commcoach\/([^/]+)\/session/,
shellOverflowHidden: false,
render: ({ scopeKey }) => ,
},
{
id: 'graphical-editor',
pathRegex: /\/mandates\/[^/]+\/graphicalEditor\/[^/]+\/editor/,
scopeRegex: /\/mandates\/([^/]+)\/graphicalEditor\/([^/]+)\/editor/,
render: ({ mandateId, instanceId, scopeKey }) => (
),
},
{
id: 'admin-languages',
pathRegex: /\/admin\/languages(?:$|\/)/,
render: () => ,
},
];
export function hideFeatureOutlet(pathname: string): boolean {
return KEEP_ALIVE_ROUTES.some((e) => e.pathRegex.test(pathname));
}