import { forwardRef as d, useContext as n } from "react";
import { EuiThemeContext as l, EuiColorModeContext as v, EuiModificationsContext as T } from "./context.js";
import { createElement as p } from "../../../../../../../@emotion_react@11.9.3_hszxbvtkrbiogp66pfduqrogei/node_modules/@emotion/react/dist/emotion-react.browser.esm.js";
function a() {
  return a = Object.assign || function(r) {
    for (var e = 1; e < arguments.length; e++) {
      var o = arguments[e];
      for (var i in o)
        Object.prototype.hasOwnProperty.call(o, i) && (r[i] = o[i]);
    }
    return r;
  }, a.apply(this, arguments);
}
var E = function() {
  var e = n(l), o = n(v), i = n(T);
  return {
    euiTheme: e,
    colorMode: o,
    modifications: i
  };
}, C = function(e) {
  var o = e.displayName || e.name || "ComponentWithTheme", i = function(u, h) {
    var t = E(), f = t.euiTheme, s = t.colorMode, c = t.modifications;
    return p(e, a({
      theme: {
        euiTheme: f,
        colorMode: s,
        modifications: c
      },
      ref: h
    }, u));
  }, m = /* @__PURE__ */ d(i);
  return m.displayName = o, m;
};
export {
  E as useEuiTheme,
  C as withEuiTheme
};
//# sourceMappingURL=hooks.js.map
