# Web application desktop entries — Teams, Outlook, Basecamp, and OpenCode launchers.
{
  config,
  pkgs,
  ...
}: let
  icons = {
    teams = pkgs.fetchurl {
      url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-teams.svg";
      sha256 = "sha256-Pr9QS8nnXJq97r4/G3c6JXi34zxHl0ps9gcyI8cN/s8=";
    };
    outlook = pkgs.fetchurl {
      url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-outlook.svg";
      sha256 = "sha256-3u8t5QNHFZvrAegxBiGicO4PjtMWhEaQSCv7MSSfLLc=";
    };
    opencode = pkgs.fetchurl {
      url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/opencode-dark.svg";
      sha256 = "1lms4f8habamvdh2qqqz9psx4py9wx23mmlkkds44pvrbq3bkj3n";
    };
  };
in {
  xdg.desktopEntries = {
    teams = {
      name = "Microsoft Teams";
      exec = "launch-webapp https://teams.microsoft.com";
      comment = "Open Microsoft Teams as a Desktop App";
      categories = ["Application" "Network" "Chat"];
      terminal = false;
      icon = icons.teams;
    };
    outlook = {
      name = "Microsoft Outlook";
      exec = "launch-webapp https://outlook.office.com/mail/";
      comment = "Open Microsoft Outlook as a Desktop App";
      categories = ["Application" "Network"];
      terminal = false;
      icon = icons.outlook;
    };
    basecamp = {
      name = "Basecamp";
      exec = "launch-webapp https://3.basecamp.com/5996442/";
      comment = "Open Basecamp as a Desktop App";
      categories = ["Application" "Network"];
      terminal = false;
      icon = "${config.home.homeDirectory}/.local/share/icons/basecamp-logo.png";
    };
    opencode = {
      name = "Opencode";
      exec = "rofi-project-opener";
      comment = "Open Opencode Terminal App";
      categories = ["Application" "Development"];
      terminal = false;
      icon = icons.opencode;
    };
  };
}
