{ config, pkgs, lib, inputs, ... }:

with lib;

let
  cfg = config.settings.desktop-environments.niri.waybar;
in {
  options = {
    settings.desktop-environments.niri.waybar.enable = lib.mkOption {
      type = lib.types.bool;
      description = ''
        Enable waybar configuration for configuration
      '';
      default = config.settings.desktop-environments.niri.enable;
    };
  };

  config = mkIf cfg.enable {
    stylix.targets.waybar.addCss = false;
  
    programs.waybar = {
      enable = true;
      systemd.enable = true;
    };

    programs.waybar.settings = {
      main = {
        layer = "top";
        position = "top";
        modules-left = [
          "niri/workspaces"
          "niri/window"
        ];
        modules-center = [
          "clock"
        ];
        modules-right = [
          "tray"
          "network"
          "pulseaudio"
        ];
      };
    };

    programs.waybar.style = ''
      
    '';
  };
}
