import l from "react";
import { IconContext as s, DefaultContext as O } from "./iconContext.js";
var g = ["attr", "size", "title"];
function v(t, e) {
  if (t == null) return {};
  var r = y(t, e), n, i;
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(t);
    for (i = 0; i < o.length; i++)
      n = o[i], !(e.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(t, n) && (r[n] = t[n]);
  }
  return r;
}
function y(t, e) {
  if (t == null) return {};
  var r = {};
  for (var n in t)
    if (Object.prototype.hasOwnProperty.call(t, n)) {
      if (e.indexOf(n) >= 0) continue;
      r[n] = t[n];
    }
  return r;
}
function c() {
  return c = Object.assign ? Object.assign.bind() : function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var r = arguments[e];
      for (var n in r)
        Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
    }
    return t;
  }, c.apply(this, arguments);
}
function m(t, e) {
  var r = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var n = Object.getOwnPropertySymbols(t);
    e && (n = n.filter(function(i) {
      return Object.getOwnPropertyDescriptor(t, i).enumerable;
    })), r.push.apply(r, n);
  }
  return r;
}
function u(t) {
  for (var e = 1; e < arguments.length; e++) {
    var r = arguments[e] != null ? arguments[e] : {};
    e % 2 ? m(Object(r), !0).forEach(function(n) {
      j(t, n, r[n]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : m(Object(r)).forEach(function(n) {
      Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
    });
  }
  return t;
}
function j(t, e, r) {
  return e = P(e), e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
}
function P(t) {
  var e = h(t, "string");
  return typeof e == "symbol" ? e : e + "";
}
function h(t, e) {
  if (typeof t != "object" || !t) return t;
  var r = t[Symbol.toPrimitive];
  if (r !== void 0) {
    var n = r.call(t, e);
    if (typeof n != "object") return n;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function p(t) {
  return t && t.map((e, r) => /* @__PURE__ */ l.createElement(e.tag, u({
    key: r
  }, e.attr), p(e.child)));
}
function _(t) {
  return (e) => /* @__PURE__ */ l.createElement(w, c({
    attr: u({}, t.attr)
  }, e), p(t.child));
}
function w(t) {
  var e = (r) => {
    var {
      attr: n,
      size: i,
      title: o
    } = t, b = v(t, g), f = i || r.size || "1em", a;
    return r.className && (a = r.className), t.className && (a = (a ? a + " " : "") + t.className), /* @__PURE__ */ l.createElement("svg", c({
      stroke: "currentColor",
      fill: "currentColor",
      strokeWidth: "0"
    }, r.attr, n, b, {
      className: a,
      style: u(u({
        color: t.color || r.color
      }, r.style), t.style),
      height: f,
      width: f,
      xmlns: "http://www.w3.org/2000/svg"
    }), o && /* @__PURE__ */ l.createElement("title", null, o), t.children);
  };
  return s !== void 0 ? /* @__PURE__ */ l.createElement(s.Consumer, null, (r) => e(r)) : e(O);
}
export {
  _ as GenIcon,
  w as IconBase
};
//# sourceMappingURL=iconBase.js.map
