{ pkgs, ... }:

{
  catppuccin.freetube.enable = true;

  programs.freetube = {
    enable = true;
    package = pkgs.unstable.freetube;
    settings = {
      allowDashAv1Formats = true;
      checkForUpdates = false;
      currentLocale = "en-GB";
      defaultTheatreMode = true;
      defaultQuality = "1080";
      displayVideoPlayButton = false;
      region = "NO";
      useSponsorBlock = true;

      sponsorBlockSponsor = {
        color = "CatppuccinMochaGreen";
        skip = "autoSkip";
      };
      sponsorBlockSelfPromo = {
        color = "CatppuccinMochaYellow";
        skip = "showInSeekBar";
      };
      sponsorBlockInteraction = {
        color = "CatppuccinMochaPink";
        skip = "showInSeekBar";
      };
      sponsorBlockIntro = {
        color = "CatppuccinMochaSapphire";
        skip = "doNothing";
      };
      sponsorBlockOutro = {
        color = "CatppuccinMochaBlue";
        skip = "doNothing";
      };
      sponsorBlockRecap = {
        color = "CatppuccinMochaMauve";
        skip = "doNothing";
      };
      sponsorBlockMusicOffTopic = {
        color = "CatppuccinMochaFlamingo";
        skip = "doNothing";
      };
      sponsorBlockFiller = {
        color = "CatppuccinMochaMauve";
        skip = "doNothing";
      };
    };
  };
}
