recipe help

  "type": "minecraft:smithing_transform",
  "base": "#minecraft:swords",
  "addition": [
    "minecraft:yellow_dye",
    "minecraft:white_dye",
    "minecraft:red_dye",
    "minecraft:purple_dye",
    "minecraft:pink_dye",
    "minecraft:orange_dye",
    "minecraft:magenta_dye",
    "minecraft:lime_dye",
    "minecraft:light_gray_dye",
    "minecraft:light_blue_dye",
    "minecraft:green_dye",
    "minecraft:gray_dye",
    "minecraft:cyan_dye",
    "minecraft:brown_dye",
    "minecraft:blue_dye",
    "minecraft:black_dye"
  ],
  "template": "#minecraft:small_flowers",
  "result": {
    "id": "matching sword :("
  }
}```

im working on this recipe, im trying to make it so the smithing recipe can add the component to any sword thats put in but the output sword should match the same tier of the input sword.. is this possible?
Continue to help post