import { jsx as _ } from "react/jsx-runtime";
import { useId as b, useRef as g, useEffect as y } from "react";
function v(o) {
  return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
}
var f = { exports: {} };
var d;
function x() {
  return d || (d = 1, (function(o) {
    (function() {
      var s = {}.hasOwnProperty;
      function n() {
        for (var t = "", r = 0; r < arguments.length; r++) {
          var e = arguments[r];
          e && (t = u(t, p.call(this, e)));
        }
        return t;
      }
      function p(t) {
        if (typeof t == "string" || typeof t == "number")
          return this && this[t] || t;
        if (typeof t != "object")
          return "";
        if (Array.isArray(t))
          return n.apply(this, t);
        if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
          return t.toString();
        var r = "";
        for (var e in t)
          s.call(t, e) && t[e] && (r = u(r, this && this[e] || e));
        return r;
      }
      function u(t, r) {
        return r ? t ? t + " " + r : t + r : t;
      }
      o.exports ? (n.default = n, o.exports = n) : window.classNames = n;
    })();
  })(f)), f.exports;
}
var S = x();
const j = /* @__PURE__ */ v(S), w = {
  "purpur-logo": "_purpur-logo_i793p_1",
  "purpur-logo--black": "_purpur-logo--black_i793p_10",
  "purpur-logo--white": "_purpur-logo--white_i793p_13",
  "purpur-logo--purple": "_purpur-logo--purple_i793p_16"
}, N = j.bind(w), m = "purpur-logo", O = ({
  svg: o,
  allyTitle: s,
  className: n,
  color: p = "purple",
  height: u,
  width: t,
  ...r
}) => {
  const e = b(), h = N(m, `${m}--${p}`, n), l = g(null);
  return y(() => {
    if (!s || !l.current) return;
    const i = l.current.firstChild;
    if (!i) return;
    const a = i.querySelector("title");
    a && a.remove();
    const c = document.createElement("title");
    c.id = e, c.textContent = s || "", i.prepend(c), i.setAttribute("aria-labelledby", e), i.setAttribute("role", "img");
  }, [s, e]), /* @__PURE__ */ _(
    "span",
    {
      ref: l,
      className: h,
      dangerouslySetInnerHTML: { __html: o.svg },
      style: { height: u, width: t },
      ...r
    }
  );
};
O.displayName = "Logo";
export {
  O as Logo
};
//# sourceMappingURL=logo.es.js.map
