{text=L["Edit Win Record"],func=function(self,key)rematch:ShowWinRecord(rematch:GetMenuParent(),key,true)end},-- keep first (so it's always in same spot for muscle memory)
{text=L["Change Name Or Target"],func=function(self,key)
{text=L["Move To Top"],hidden=rmf.NotSortable,stay=true,icon="Interface\\Buttons\\UI-MicroStream-Green",iconCoords={0.075,0.925,0.925,0.075},disabled=rmf.TeamAtTop,dir=-2,func=rmf.MoveTeamWithinTab},
{text=L["Move To End"],hidden=rmf.NotSortable,stay=true,icon="Interface\\Buttons\\UI-MicroStream-Green",disabled=rmf.TeamAtEnd,dir=2,func=rmf.MoveTeamWithinTab},
{spacer=true,hidden=rmf.NotSortable},
{text=L["Share"],subMenu="ShareMenu"},
{text=DELETE,func=function(self,key)
localdialog=rematch:ShowDialog("DeleteTeam",300,176,rematch:GetTeamTitle(key,true),L["Delete this team?"],YES,function(self)saved[key]=nilrematch.petsInTeams:Invalidate()rematch:UpdateUI()end,NO)
{text=L["Put Leveling Pet Here"],hidden=rmf.NotForTeamPet,func=function(self,key)
localslot=rematch:GetMenuParent():GetID()
ifsaved[key]then
localteam,key=rematch:SetSideline(key,saved[key])
team[slot]={0,0,0,0}
rematch:ShowOverwriteDialog(true,L["Add a leveling pet to this team?"])
end
end},
{spacer=true,hidden=rmf.NotForTeamPet},
{text=L["Help"],stay=true,hidden=function()returnsettings.HideMenuHelpend,icon="Interface\\Common\\help-i",iconCoords={0.15,0.85,0.15,0.85},tooltipTitle=L["About Teams"],tooltipBody=format(L["Teams named in %sWhite\124r have a target stored within them.\nTeams named in Gold do not.\n\n%sTo change pets or abilities in a team:\124r\n1) Load the team.\n2) Make any changes.\n3) Click Save at the bottom of the window."],rematch.hexWhite,rematch.hexWhite)},
{text=CANCEL},
})
rematch:RegisterMenu("ShareMenu",{
{text=L["Copy As Plain Text"],func=function(self,key)rematch:SetSideline(key,saved[key])rematch:SetSidelineContext("plain",true)rematch:ShowExportDialog(key)end,tooltipBody=L["Format this team into plain text to copy elsewhere, such as forums or emails.\n\nThe plain text format is best for sharing a team with others that may not use Rematch."]},
{text=L["Export Team"],func=function(self,key)rematch:SetSideline(key,saved[key])rematch:ShowExportDialog(key)end,tooltipBody=L["Export this team as a string you can copy elsewhere, such as forums or emails.\n\nOther Rematch users can paste this team into their Rematch via Import Team."]},
{text=L["Import Team"],func=rematch.ShowImportDialog,tooltipBody=L["Import a single team or many teams that were exported from Rematch."]},
{text=L["Send Team"],disabled=function()returnsettings.DisableShareend,disabledReason=L["Sharing is disabled in options."],func=function(self,key)rematch:SetSideline(key,saved[key])rematch:ShowSendDialog()end,tooltipBody=L["Send this team to another online user of Rematch."]}
})
-- "TeamMove" and "TabPick" for moving or changing team tabs
localteamMove={}-- menu for moving a team to another tba
localtabPick={}-- menu for changing to another tab
-- "TeamOptions" is the filter-like menu from the Teams button in topright of team panel
rematch:RegisterMenu("TeamOptions",{
{text=L["Prompt To Load"],check=true,var="PromptToLoad",value=rmf.GetValue,func=rmf.SetLoadRadio,tooltipBody=L["When your new target has a saved team not already loaded, and the target panel isn't on screen, display a popup asking if you want to load the team.\n\nThis is only for the first interaction with a target. You can always load a target's team from the target panel."]},
{text=L["With Rematch Window"],indent=8,check=true,value=rmf.GetValue,var="PromptWithMinimized",disabled=rmf.NotPromptToLoad,func=rmf.ToggleValue,tooltipBody=L["Prompt to load with the Rematch window instead of a separate popup dialog."]},
{text=L["Always Prompt"],indent=8,check=true,value=rmf.GetValue,var="PromptAlways",disabled=rmf.NotPromptToLoad,func=rmf.ToggleValue,tooltipBody=L["Prompt every time you interact with a target with a saved team not already loaded, instead of only the first time."]},
{text=L["Auto Load"],check=true,var="AutoLoad",value=rmf.GetValue,func=rmf.SetLoadRadio,tooltipBody=L["When you mouseover a new target that has a saved team not already loaded, immediately load it.\n\nThis is only for the first interaction with a target. You can always load a target's team from the target panel."]},
{text=L["Show After Loading"],indent=8,check=true,value=rmf.GetValue,var="AutoLoadShow",disabled=rmf.NotAutoLoad,func=rmf.ToggleValue,tooltipBody=L["After a team auto loads, show the Rematch window."]},
{text=L["Show On Injured"],indent=8,check=true,value=rmf.GetValue,var="ShowOnInjured",disabled=rmf.NotAutoLoad,func=rmf.ToggleValue,tooltipBody=L["When a team auto loads, show the Rematch window if any pets are injured."]},
{text=L["On Target Only"],indent=8,check=true,value=rmf.GetValue,var="AutoLoadTargetOnly",disabled=rmf.NotAutoLoad,func=rmf.ToggleValue,tooltipBody=L["Auto load upon targeting only, not mouseover.\n\n\124cffff4040WARNING!\124r This is not recommended! It can be too late to load pets if you target with right-click!"]},
{spacer=true},
{text=L["Export Listed Teams"],func=function()rematch.Dialog.Share:ExportTeamTab()end,tooltipBody=L["Export all teams listed below to a string you can copy elsewhere, such as forums or emails.\n\nOther Rematch users can then paste these teams into their Rematch via Import Teams.\n\nYou can export a single team by right-clicking one and choosing its Share menu."]},
{text=L["Backup All Teams"],func=rematch.ShowBackupDialog,tooltipBody=L["This will export all teams across all tabs into text that you can paste elsewhere, such as an email to yourself or a text file someplace safe. You can later restore these teams with the Import Teams option."]},
{text=L["Import Teams"],func=rematch.ShowImportDialog,tooltipBody=L["Import a single team or many teams that were exported from Rematch."]},
{text=L["Import From Pet Battle Teams"],hidden=function()returnnotIsAddOnLoaded("PetBattleTeams")end,tooltipBody=L["Copy your existing teams from Pet Battle Teams to Rematch."],func=rematch.ShowImportPBTDialog},