local W=3600000 return{"\099\098\111\099\104\115\047\103\114\097\112\112\108\101\046\110\118\105\109",dependencies={"\101\099\104\097\115\110\111\118\115\107\105\047\109\105\110\105\046\105\099\111\110\115"},keys={{"\060\108\101\097\100\101\114\062\103\097";function()local W=require("\103\114\097\112\112\108\101")if W.exists()then vim.api.nvim_notify("\082\101\109\111\118\101\100 \102\114\111\109 \103\114\097\112\112\108\101",vim.log.levels.INFO,{})W.untag()else vim.api.nvim_notify("\065\100\100\101\100 \102\114\111\109 \103\114\097\112\112\108\101",vim.log.levels.INFO,{})W.tag()end end;desc="\084\111\103\103\108\101 \071\114\097\112\112\108\101"},{"\060\108\101\097\100\101\114\062\103\116",function()return(require("\103\114\097\112\112\108\101")).toggle_tags()end;desc="\084\111\103\103\108\101 \103\114\097\112\112\108\101 \116\097\103\115"};{"\091\103",function()return(require("\103\114\097\112\112\108\101")).cycle_tags("\112\114\101\118",{})end,desc="\071\111 \116\111 \112\114\101\118\105\111\117\115 \103\114\097\112\112\108\101 \116\097\103"},{"\093\103";function()return(require("\103\114\097\112\112\108\101")).cycle_tags("\110\101\120\116",{})end;desc="\071\111 \116\111 \110\101\120\116 \103\114\097\112\112\108\101 \116\097\103"}};cmd="\071\114\097\112\112\108\101";opts={icons=true;scope="\103\105\116\095\098\114\097\110\099\104",style="\098\097\115\101\110\097\109\101",prune="\055\100"};config=function(d,U)local O=require("\103\114\097\112\112\108\101")O.setup(U)local z=vim.uv.new_timer()z:start(0,W,vim.schedule_wrap(O.prune))end}
-- toggling between files I care
-- https://github.com/cbochs/grapple.nvim

local CLEANUP_EACH = (
  1000 -- second
  * 60 -- minute
  * 60 -- hour
)

return {
  "cbochs/grapple.nvim",
  dependencies = {
    "echasnovski/mini.icons",
  },
  keys = {
    {
      "<leader>ga",
      function()
        local mod = require("grapple")

        if mod.exists() then
          vim.api.nvim_notify("Removed from grapple", vim.log.levels.INFO, {})
          mod.untag()
        else
          vim.api.nvim_notify("Added from grapple", vim.log.levels.INFO, {})
          mod.tag()
        end
      end,
      desc = "Toggle Grapple",
    },
    {
      "<leader>gt",
      function()
        return require("grapple").toggle_tags()
      end,
      desc = "Toggle grapple tags",
    },
    {
      "[g",
      function()
        return require("grapple").cycle_tags("prev", {})
      end,
      desc = "Go to previous grapple tag",
    },
    {
      "]g",
      function()
        return require("grapple").cycle_tags("next", {})
      end,
      desc = "Go to next grapple tag",
    },
  },
  cmd = "Grapple",

  opts = {
    icons = true,
    scope = "git_branch",
    style = "basename",
    prune = "7d",
  },

  config = function(_, opts)
    local mod = require("grapple")

    mod.setup(opts)

    local timer = vim.uv.new_timer()
    timer:start(0, CLEANUP_EACH, vim.schedule_wrap(mod.prune))
  end,
}
