import type { ResearchReference } from '@/types/document'

export function getReferenceTargetPath(reference: ResearchReference): string {
  if (reference.source_group === 'guide') {
    if (reference.profile_id) {
      return `/guides/${reference.profile_id}`
    }
    return `/guides/by-doc/${reference.doc_id}`
  }
  return `/doc/${reference.doc_id}`
}