cask "nordlayer" do
  version "3.2.1"
  sha256 "d65e68a8b56b309d16ce2f98ea6a80240497c0547c9af5179cff0b88fba4fb69"

  url "https://downloads.nordlayer.com/mac/latest/NordLayer_v#{version}.zip"
  name "NordLayer"
  desc "Security software for business"
  homepage "https://nordlayer.com/"

  livecheck do
    url "https://downloads.nordlayer.com/mac/update.xml"
    strategy :sparkle, &:short_version
  end

  auto_updates true
  depends_on macos: ">= :big_sur"

  app "NordLayer.app"

  uninstall launchctl: "com.nordvpn.macos.teams",
            quit:      "com.nordvpn.macos.teams"

  zap trash: [
    "~/Library/Application Support/com.nordvpn.macos.teams",
    "~/Library/Caches/com.nordvpn.macos.teams",
    "~/Library/HTTPStorages/com.nordvpn.macos.teams",
    "~/Library/Preferences/com.nordvpn.macos.teams.plist",
  ]
end
