{ lib, config, pkgs, ... }:
with lib;
let
  cfg = config.modules.web.webcord;
in
{
  options.modules.web.webcord = {
    enable = mkEnableOption "enable Lutris Gaming preservation platform";
  };
  config = mkIf cfg.enable {
    home.packages = with pkgs; [
      webcord
    ];
    
    xdg.desktopEntries = {
      webcord = {
        name = "Webcord";
        genericName = "Unofficial Discord client";
        exec = "webcord --ozone-platform=wayland";
        icon = "webcord";
        terminal = false;
        categories = [ "Application" "Network" "WebBrowser" ];
      };
    };
  };
}
