const modules = import.meta.glob('@/assets/icons/*.svg', { eager: true })

export const iconRegistry = Object.fromEntries(
  Object.entries(modules).map(([path, mod]) => {
    const name = path.split('/').pop().replace('.svg', '')
    return [name, mod.default]
  })
)

export const iconNames = Object.keys(iconRegistry)
