import { mergeIconData as s } from "../icon/merge.js";
import { getIconsTree as f } from "./tree.js";
function i(r, o, n) {
  const u = r.icons, l = r.aliases || /* @__PURE__ */ Object.create(null);
  let t = {};
  function c(e) {
    t = s(u[e] || l[e], t);
  }
  return c(o), n.forEach(c), s(r, t);
}
function g(r, o) {
  if (r.icons[o]) return i(r, o, []);
  const n = f(r, [o])[o];
  return n ? i(r, o, n) : null;
}
export {
  g as getIconData,
  i as internalGetIconData
};
