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

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 p = "Modules.Exoplanets.DataFolder";
  if (openspace.getPropertyValue(p) == "") then
    openspace.setPropertyValueSingle(p, DataPath)
  end

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

asset.export("DataPath", DataPath)

asset.meta = {
  Name = "Exoplanet Data",
  Version = "3.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"
}
