local ToggleMinorMoonTrails = {
  Identifier = "os.ToggleMinorMoonTrails",
  Name = "Toggle minor moon trails",
  Command = [[
    local list = openspace.getProperty("{moonTrail_minor}.Renderable.Enabled")
    for _,v in pairs(list) do
      openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v))
    end
  ]],
  Documentation = "Toggle on/off minor moon trails for all planets in the solar system",
  GuiPath = "/Trails",
  IsLocal = true
}


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

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

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



asset.meta = {
  Name = "Actions - Toggle Minor Moon Trails",
  Version = "1.0",
  Description = "Asset providing actions to toggle all minor moon trails on and off",
  Author = "OpenSpace Team",
  URL = "http://openspaceproject.com",
  License = "MIT license"
}
