
import { inject } from 'vue'
export const assets: Record<string, string> = {}
const requireAsset = require.context('@/assets', true, /\.(png|jpe?g|gif|svg)$/)
const regex = /(?<=\.\/).*(?=\.)/
requireAsset.keys().forEach(key => {
  const name = key.match(regex)![0]
  assets[name] = requireAsset(key)
})

interface UseStaticImgExport {
  productIntroduction: string
  loginBg: string
}

export const useStaticImg = (): UseStaticImgExport => inject('useStaticImg')!
