local dataPath = asset.syncedResource({
  Name = "Exoplanet Data Files",
  Type = "HttpSynchronization",
  Identifier = "exoplanets_data",
  Version = 5
})

local colormaps = asset.syncedResource({
  Name = "Stars Color Table",
  Type = "HttpSynchronization",
  Identifier = "stars_colormap",
  Version = 3
})


asset.onInitialize(function()
  -- Set the default data files used for the exoplanet system creation
  -- (Check if already set, to not override value set in another file)
  local p1 = "Modules.Exoplanets.DataFolder"
  if (openspace.getPropertyValue(p1) == "") then
    openspace.setPropertyValueSingle(p1, dataPath)
  end

  local p2 = "Modules.Exoplanets.BvColormap"
  if (openspace.getPropertyValue(p2) == "") then
    openspace.setPropertyValueSingle(p2, colormaps .. "colorbv.cmap")
  end
end)

asset.export("DataPath", dataPath)



asset.meta = {
  Name = "Exoplanet Data",
  Version = "5.0",
  Description = [[The data that is used for the exoplanet systems. The data has been
    derived from the 'Planetary Systems Composite Data' dataset from the NASA Exoplanet
    Archive]],
  Author = "OpenSpace Team",
  URL = "https://exoplanetarchive.ipac.caltech.edu/docs/data.html",
  License = "MIT license"
}
