{ lib, ... }:

{
  programs.hyprlock = {
    enable = true;
    settings = {
      "$base" = "rgb(1e1e2e)";
      "$text" = "rgb(cdd6f4)";
      "$textAlpha" = "cdd6f4";
      "$mauve" = "rgb(cba6f7)";
      "$mauveAlpha" = "cba6f7";
      "$red" = "rgb(f38ba8)";
      "$yellow" = "rgb(f9e2af)";
      "$accent" = "$mauve";
      "$accentAlpha" = "$mauveAlpha";
      "$surface0" = "rgb(313244)";
      "$font" = "JetBrainsMono Nerd Font";

      # GENERAL
      general = {
        disable_loading_bar = true;
        hide_cursor = true;
      };

      # LAYOUT
      label = [
        {
          text = "$LAYOUT";
          color = "$text";
          font_size = 25;
          font_family = "$font";
          position = "30, -30";
          halign = "left";
          valign = "top";
        }

        # TIME
        {
          text = "$TIME";
          color = "$text";
          font_size = 90;
          font_family = "$font";
          position = "-30, 0";
          halign = "right";
          valign = "top";
        }

        # DATE
        {
          text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
          color = "$text";
          font_size = 25;
          font_family = "$font";
          position = "-30, -150";
          halign = "right";
          valign = "top";
        }
      ];

      # INPUT FIELD
      input-field = {
        size = "300, 60";
        outline_thickness = 4;
        dots_size = 0.2;
        dots_spacing = 0.2;
        dots_center = true;
        outer_color = lib.mkDefault "$accent";
        inner_color = lib.mkDefault "$surface0";
        font_color = lib.mkDefault "$text";
        fade_on_empty = false;
        placeholder_text = "<span foreground=\"##$textAlpha\"><i>󰌾 Logged in as </i><span foreground=\"##$accentAlpha\">$USER</span></span>";
        hide_input = false;
        check_color = lib.mkDefault "$accent";
        fail_color = lib.mkDefault "$red";
        fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
        capslock_color = lib.mkDefault "$yellow";
        position = "0, -20%";
        halign = "center";
        valign = "center";
      };
    };
  };
}
