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


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

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

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



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