import { KeywordType } from '../../../../../../../libs/common/domain/src/lib/model/thesaurus'

export function getKeywordTypeFromKeywordTypeCode(
  typeCode: string
): KeywordType {
  if (!typeCode) return 'other'
  switch (typeCode) {
    case 'theme':
    case 'place':
    case 'temporal':
    case 'other':
      return typeCode
    default:
      return 'other'
  }
}
