{
  "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/iron_helmet_quartz_trim"
              },
              "when": "minecraft:quartz"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/iron_helmet_iron_trim"
              },
              "when": "minecraft:iron"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/iron_helmet_netherite_trim"
              },
              "when": "minecraft:netherite"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/iron_helmet_redstone_trim"
              },
              "when": "minecraft:redstone"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/iron_helmet_copper_trim"
              },
              "when": "minecraft:copper"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/iron_helmet_gold_trim"
              },
              "when": "minecraft:gold"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/iron_helmet_emerald_trim"
              },
              "when": "minecraft:emerald"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/iron_helmet_diamond_trim"
              },
              "when": "minecraft:diamond"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/iron_helmet_lapis_trim"
              },
              "when": "minecraft:lapis"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/iron_helmet_amethyst_trim"
              },
              "when": "minecraft:amethyst"
            },
            {
              "model": {
                "type": "minecraft:model",
                "model": "minecraft:item/iron_helmet_resin_trim"
              },
              "when": "minecraft:resin"
            }
          ],
          "fallback": {
            "type": "minecraft:model",
            "model": "minecraft:item/iron_helmet"
          },
          "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/iron_helmet_quartz_trim"
                },
                "when": "minecraft:quartz"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/iron_helmet_iron_trim"
                },
                "when": "minecraft:iron"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/iron_helmet_netherite_trim"
                },
                "when": "minecraft:netherite"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/iron_helmet_redstone_trim"
                },
                "when": "minecraft:redstone"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/iron_helmet_copper_trim"
                },
                "when": "minecraft:copper"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/iron_helmet_gold_trim"
                },
                "when": "minecraft:gold"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/iron_helmet_emerald_trim"
                },
                "when": "minecraft:emerald"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/iron_helmet_diamond_trim"
                },
                "when": "minecraft:diamond"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/iron_helmet_lapis_trim"
                },
                "when": "minecraft:lapis"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/iron_helmet_amethyst_trim"
                },
                "when": "minecraft:amethyst"
              },
              {
                "model": {
                  "type": "minecraft:model",
                  "model": "minecraft:item/iron_helmet_resin_trim"
                },
                "when": "minecraft:resin"
              }
            ],
            "fallback": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet"
            },
            "property": "minecraft:trim_material"
          }
        ]
      },
      "on_false": {
        "type": "minecraft:select",
        "cases": [
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet_quartz_trim"
            },
            "when": "minecraft:quartz"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet_iron_trim"
            },
            "when": "minecraft:iron"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet_netherite_trim"
            },
            "when": "minecraft:netherite"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet_redstone_trim"
            },
            "when": "minecraft:redstone"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet_copper_trim"
            },
            "when": "minecraft:copper"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet_gold_trim"
            },
            "when": "minecraft:gold"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet_emerald_trim"
            },
            "when": "minecraft:emerald"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet_diamond_trim"
            },
            "when": "minecraft:diamond"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet_lapis_trim"
            },
            "when": "minecraft:lapis"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet_amethyst_trim"
            },
            "when": "minecraft:amethyst"
          },
          {
            "model": {
              "type": "minecraft:model",
              "model": "minecraft:item/iron_helmet_resin_trim"
            },
            "when": "minecraft:resin"
          }
        ],
        "fallback": {
          "type": "minecraft:model",
          "model": "minecraft:item/iron_helmet"
        },
        "property": "minecraft:trim_material"
      }
    }
  }
}