"use strict";
const React = require("react");
const rating_utils = require("./rating.utils.cjs");
function _interopNamespaceDefault(e) {
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
  if (e) {
    for (const k in e) {
      if (k !== "default") {
        const d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: () => e[k]
        });
      }
    }
  }
  n.default = e;
  return Object.freeze(n);
}
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
const iconFn1 = (index) => React__namespace.createElement("span", { key: index }, "Icon 1");
describe("iconJsxFromDefinition", () => {
  it("should convert a function icon definition to JSX element", () => {
    const result = rating_utils.iconJsxFromDefinition(iconFn1, 0);
    expect(result).toEqual(React__namespace.createElement("span", { key: 0 }, "Icon 1"));
  });
  it("should return the icon as is if it is not a function", () => {
    const icon = React__namespace.createElement("span", { key: 1 }, "Icon 2");
    const result = rating_utils.iconJsxFromDefinition(icon, 1);
    expect(result).toEqual(icon);
  });
});
//# sourceMappingURL=rating.utils.spec.cjs.map
