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

{
  options.modules.apple-style.enable = lib.mkEnableOption "Enable Apple fonts and emojis";

  config = lib.mkIf (config.modules.apple-style.enable && config.modules.stylix.enable) {
    stylix.fonts = {
      serif = {
        package = inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd;
        name = "SFProDisplay Nerd Font";
      };

      sansSerif = {
        package = inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd;
        name = "SFProText Nerd Font";
      };

      monospace = {
        package = inputs.apple-fonts.packages.${pkgs.system}.sf-mono-nerd;
        name = "SFMono Nerd Font";
      };

      emoji = {
        package = inputs.apple-emoji.packages.${pkgs.system}.apple-emoji-nix;
        name = "Apple Color Emoji";
      };
    };
  };
}
