{
  "model": {
    "type": "minecraft:condition",
        "property": "minecraft:has_component",
        "component": "minecraft:enchantments",
        "ignore_default": true,
    "on_true": {
      "type": "minecraft:composite",
      "models": [
        {
          "type": "minecraft:model",
          "model": "minecraft:item/enchanted_helmet"
        },
        {
          "type": "minecraft:select",
          "cases": [
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/leather_helmet_quartz_trim",
                "tints": [
                  {
                    "type": "minecraft:dye",
                    "default": -6265536
                  }
                ]
              },
              "when": "minecraft:quartz"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/leather_helmet_iron_trim",
                "tints": [
                  {
                    "type": "minecraft:dye",
                    "default": -6265536
                  }
                ]
              },
              "when": "minecraft:iron"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/leather_helmet_netherite_trim",
                "tints": [
                  {
                    "type": "minecraft:dye",
                    "default": -6265536
                  }
                ]
              },
              "when": "minecraft:netherite"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/leather_helmet_redstone_trim",
                "tints": [
                  {
                    "type": "minecraft:dye",
                    "default": -6265536
                  }
                ]
              },
              "when": "minecraft:redstone"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/leather_helmet_copper_trim",
                "tints": [
                  {
                    "type": "minecraft:dye",
                    "default": -6265536
                  }
                ]
              },
              "when": "minecraft:copper"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/leather_helmet_gold_trim",
                "tints": [
                  {
                    "type": "minecraft:dye",
                    "default": -6265536
                  }
                ]
              },
              "when": "minecraft:gold"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/leather_helmet_emerald_trim",
                "tints": [
                  {
                    "type": "minecraft:dye",
                    "default": -6265536
                  }
                ]
              },
              "when": "minecraft:emerald"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/leather_helmet_diamond_trim",
                "tints": [
                  {
                    "type": "minecraft:dye",
                    "default": -6265536
                  }
                ]
              },
              "when": "minecraft:diamond"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/leather_helmet_lapis_trim",
                "tints": [
                  {
                    "type": "minecraft:dye",
                    "default": -6265536
                  }
                ]
              },
              "when": "minecraft:lapis"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/leather_helmet_amethyst_trim",
                "tints": [
                  {
                    "type": "minecraft:dye",
                    "default": -6265536
                  }
                ]
              },
              "when": "minecraft:amethyst"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/leather_helmet_resin_trim",
                "tints": [
                  {
                    "type": "minecraft:dye",
                    "default": -6265536
                  }
                ]
              },
              "when": "minecraft:resin"
            }
          ],
          "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/leather_helmet",
            "tints": [
              {
                "type": "minecraft:dye",
                "default": -6265536
              }
            ]
          },
          "property": "minecraft:trim_material"
        }
      ]
    },
    "on_false": {
      "type": "minecraft:condition",
          "property": "minecraft:has_component",
          "component": "minecraft:enchantment_glint_override",
          "ignore_default": true,
      "on_true": {
        "type": "minecraft:composite",
        "models": [
          {
            "type": "minecraft:model",
            "model": "minecraft:item/enchanted_helmet"
          },
          {
            "type": "minecraft:select",
            "cases": [
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/leather_helmet_quartz_trim",
                  "tints": [
                    {
                      "type": "minecraft:dye",
                      "default": -6265536
                    }
                  ]
                },
                "when": "minecraft:quartz"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/leather_helmet_iron_trim",
                  "tints": [
                    {
                      "type": "minecraft:dye",
                      "default": -6265536
                    }
                  ]
                },
                "when": "minecraft:iron"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/leather_helmet_netherite_trim",
                  "tints": [
                    {
                      "type": "minecraft:dye",
                      "default": -6265536
                    }
                  ]
                },
                "when": "minecraft:netherite"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/leather_helmet_redstone_trim",
                  "tints": [
                    {
                      "type": "minecraft:dye",
                      "default": -6265536
                    }
                  ]
                },
                "when": "minecraft:redstone"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/leather_helmet_copper_trim",
                  "tints": [
                    {
                      "type": "minecraft:dye",
                      "default": -6265536
                    }
                  ]
                },
                "when": "minecraft:copper"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/leather_helmet_gold_trim",
                  "tints": [
                    {
                      "type": "minecraft:dye",
                      "default": -6265536
                    }
                  ]
                },
                "when": "minecraft:gold"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/leather_helmet_emerald_trim",
                  "tints": [
                    {
                      "type": "minecraft:dye",
                      "default": -6265536
                    }
                  ]
                },
                "when": "minecraft:emerald"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/leather_helmet_diamond_trim",
                  "tints": [
                    {
                      "type": "minecraft:dye",
                      "default": -6265536
                    }
                  ]
                },
                "when": "minecraft:diamond"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/leather_helmet_lapis_trim",
                  "tints": [
                    {
                      "type": "minecraft:dye",
                      "default": -6265536
                    }
                  ]
                },
                "when": "minecraft:lapis"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/leather_helmet_amethyst_trim",
                  "tints": [
                    {
                      "type": "minecraft:dye",
                      "default": -6265536
                    }
                  ]
                },
                "when": "minecraft:amethyst"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/leather_helmet_resin_trim",
                  "tints": [
                    {
                      "type": "minecraft:dye",
                      "default": -6265536
                    }
                  ]
                },
                "when": "minecraft:resin"
              }
            ],
            "fallback": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "property": "minecraft:trim_material"
          }
        ]
      },
      "on_false": {
        "type": "minecraft:select",
        "cases": [
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet_quartz_trim",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "when": "minecraft:quartz"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet_iron_trim",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "when": "minecraft:iron"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet_netherite_trim",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "when": "minecraft:netherite"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet_redstone_trim",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "when": "minecraft:redstone"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet_copper_trim",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "when": "minecraft:copper"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet_gold_trim",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "when": "minecraft:gold"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet_emerald_trim",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "when": "minecraft:emerald"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet_diamond_trim",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "when": "minecraft:diamond"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet_lapis_trim",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "when": "minecraft:lapis"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet_amethyst_trim",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "when": "minecraft:amethyst"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/leather_helmet_resin_trim",
              "tints": [
                {
                  "type": "minecraft:dye",
                  "default": -6265536
                }
              ]
            },
            "when": "minecraft:resin"
          }
        ],
        "fallback": {
          "type": "minecraft:model",
          "model": "minecraft:item/leather_helmet",
          "tints": [
            {
              "type": "minecraft:dye",
              "default": -6265536
            }
          ]
        },
        "property": "minecraft:trim_material"
      }
    }
  }
}