import acousticImg from '@/assets/home/acoustic.jpg'
import seismicImg from '@/assets/home/seismic.jpg'
import potentialImg from '@/assets/home/potential.jpg'
import oceanImg from '@/assets/home/ocean.jpg'
import multibeamImg from '@/assets/home/multibeam.jpg'
import submarineImg from '@/assets/home/submarine.jpg'
import sidescanImg from '@/assets/home/sidescan.jpg'
import gravityImg from '@/assets/home/gravity.jpg'
import magneticImg from '@/assets/home/magnetic.jpg'
import ctdImg from '@/assets/home/ctd.jpg'
import adcpImg from '@/assets/home/adcp.jpg'
import heatflowImg from '@/assets/home/heatflow.jpg'

/**
 * 数据资源大类封面图
 */
export const CATEGORY_IMAGES = {
  acoustic: acousticImg,
  seismic: seismicImg,
  potential: potentialImg,
  ocean: oceanImg
}

/**
 * 各数据类型封面图
 */
export const DATA_TYPE_IMAGES = {
  ship_multibeam: multibeamImg,
  submarine_multibeam: submarineImg,
  sidescan: sidescanImg,
  shallow_seismic: seismicImg,
  seismic_2d: seismicImg,
  seismic_3d: seismicImg,
  obn_seismic: seismicImg,
  gravity: gravityImg,
  ship_magnetic: magneticImg,
  submarine_magnetic: magneticImg,
  ctd: ctdImg,
  adcp: adcpImg,
  heat_flow: heatflowImg
}

/**
 * 获取数据类型对应封面图
 * @param {string} typeValue
 * @returns {string}
 */
export function getDataTypeImage(typeValue) {
  return DATA_TYPE_IMAGES[typeValue] || acousticImg
}

/**
 * 获取资源大类封面图
 * @param {string} categoryId
 * @returns {string}
 */
export function getCategoryImage(categoryId) {
  return CATEGORY_IMAGES[categoryId] || acousticImg
}
