{ lib, config, inputs, ... }:
let
  cfg = config.my.desktop;
in
{
  imports = [
    inputs.dms.nixosModules.dankMaterialShell
  ];

  programs.dankMaterialShell = lib.mkIf (cfg.enable && cfg.hyprland.enable) {
    enable = true;

    systemd = {
      enable = true;             # Systemd service for auto-start
      restartIfChanged = false;   # Auto-restart dms.service when dankMaterialShell changes
    };
    
    # Core features
    enableSystemMonitoring = true;     # System monitoring widgets (dgop)
    enableClipboard = true;            # Clipboard history manager
    enableVPN = true;                  # VPN management widget
    enableDynamicTheming = true;       # Wallpaper-based theming (matugen)
    enableAudioWavelength = true;      # Audio visualizer (cava)
    enableCalendarEvents = true;       # Calendar integration (khal)
  };
}
