local ToggleOuterPlanetaryTrails = {
  Identifier = "os.rosetta.ToggleOuterPlanetaryTrails",
  Name = "Toggle outer planetary trails",
  Command = [[
    local list = openspace.getProperty("{planetTrail_giants}.Renderable.Enabled")
    for _,v in pairs(list) do
      openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v))
    end
  ]],
  Documentation = "Toggles the visibility of all trails further from the Sun than 67P",
  GuiPath = "/Missions/Rosetta",
  isLocal = false
}


asset.onInitialize(function()
  openspace.action.registerAction(ToggleOuterPlanetaryTrails)
end)

asset.onDeinitialize(function()
  openspace.action.removeAction(ToggleOuterPlanetaryTrails)
end)

asset.export("ToggleOuterPlanetaryTrails", ToggleOuterPlanetaryTrails.Identifier)



asset.meta = {
  Name = "Rosetta actions",
  Version = "1.0",
  Description = "Actions related to the Rosetta mission",
  Author = "OpenSpace Team",
  URL = "http://openspaceproject.com",
  License = "MIT license"
}
