import { jsx as e } from "react/jsx-runtime";
import { withRioglyphPrefix as m } from "./treeUtils.js";
import a from "../../utils/classNames.js";
const p = [".png", ".webp", ".jpg", ".jpeg", ".svg"], d = ({ icon: t, expandedIcon: o, isOpen: i }) => {
  const s = i && o || t;
  if (!s)
    return null;
  if (p.some((c) => s.toLowerCase().endsWith(c)))
    return /* @__PURE__ */ e("div", { className: "display-grid place-items-center margin-right-5", style: { width: "18px", height: "18px" }, children: /* @__PURE__ */ e("img", { src: s, style: { maxWidth: "100%", maxHeight: "100%" } }) });
  const n = m(s), r = a("rioglyph", n);
  return /* @__PURE__ */ e("span", { className: r });
};
export {
  d as default
};
//# sourceMappingURL=TreeIcon.js.map
