"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const palette = require("../../model/mixin/palette.js");
function enableAriaDecalForTree(seriesModel) {
  var data = seriesModel.getData();
  var tree = data.tree;
  var decalPaletteScope = {};
  tree.eachNode(function(node) {
    var current = node;
    while (current && current.depth > 1) {
      current = current.parentNode;
    }
    var decal = palette.getDecalFromPalette(seriesModel.ecModel, current.name || current.dataIndex + "", decalPaletteScope);
    node.setVisual("decal", decal);
  });
}
exports.default = enableAriaDecalForTree;
