/** * Shared routing helpers for tree/session navigation. * Centralizes the logic for determining the correct navigation path * based on tree type (troubleshooting vs procedural). */ /** * Get the navigation path for starting or resuming a tree/session. */ export function getTreeNavigatePath( treeId: string, treeType?: string ): string { if (treeType === 'procedural') { return `/flows/${treeId}/navigate` } return `/trees/${treeId}/navigate` } /** * Get the editor path for a tree. */ export function getTreeEditorPath( treeId: string, treeType?: string ): string { if (treeType === 'procedural') { return `/flows/${treeId}/edit` } return `/trees/${treeId}/edit` }