import { __exports as ThemedStyleSheet } from "../../../_virtual/ThemedStyleSheet.js";
var hasRequiredThemedStyleSheet;
function requireThemedStyleSheet() {
  if (hasRequiredThemedStyleSheet) return ThemedStyleSheet;
  hasRequiredThemedStyleSheet = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", {
      value: true
    });
    exports$1._getInterface = _getInterface;
    exports$1._getTheme = get;
    exports$1["default"] = void 0;
    var styleInterface;
    var styleTheme;
    var START_MARK = "react-with-styles.resolve.start";
    var END_MARK = "react-with-styles.resolve.end";
    var MEASURE_MARK = "👩‍🎨 [resolve]";
    function registerTheme(theme) {
      styleTheme = theme;
    }
    function registerInterface(interfaceToRegister) {
      styleInterface = interfaceToRegister;
    }
    function create(makeFromTheme, createWithDirection) {
      var styles = createWithDirection(makeFromTheme(styleTheme));
      return function() {
        return styles;
      };
    }
    function createLTR(makeFromTheme) {
      return create(makeFromTheme, styleInterface.createLTR || styleInterface.create);
    }
    function createRTL(makeFromTheme) {
      return create(makeFromTheme, styleInterface.createRTL || styleInterface.create);
    }
    function get() {
      return styleTheme;
    }
    function resolve() {
      if (process.env.NODE_ENV !== "production" && typeof performance !== "undefined" && performance.mark !== void 0 && typeof performance.clearMarks === "function") {
        performance.clearMarks(START_MARK);
        performance.mark(START_MARK);
      }
      for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {
        styles[_key] = arguments[_key];
      }
      var result = styleInterface.resolve(styles);
      if (process.env.NODE_ENV !== "production" && typeof performance !== "undefined" && performance.mark !== void 0 && typeof performance.clearMarks === "function") {
        performance.clearMarks(END_MARK);
        performance.mark(END_MARK);
        performance.measure(MEASURE_MARK, START_MARK, END_MARK);
        performance.clearMarks(MEASURE_MARK);
      }
      return result;
    }
    function resolveLTR() {
      for (var _len2 = arguments.length, styles = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        styles[_key2] = arguments[_key2];
      }
      if (styleInterface.resolveLTR) {
        return styleInterface.resolveLTR(styles);
      }
      return resolve(styles);
    }
    function resolveRTL() {
      for (var _len3 = arguments.length, styles = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
        styles[_key3] = arguments[_key3];
      }
      if (styleInterface.resolveRTL) {
        return styleInterface.resolveRTL(styles);
      }
      return resolve(styles);
    }
    function flush() {
      if (styleInterface.flush) {
        styleInterface.flush();
      }
    }
    function _getInterface() {
      return styleInterface;
    }
    var _default = {
      registerTheme,
      registerInterface,
      create: createLTR,
      createLTR,
      createRTL,
      get,
      resolve: resolveLTR,
      resolveLTR,
      resolveRTL,
      flush
    };
    exports$1["default"] = _default;
  })(ThemedStyleSheet);
  return ThemedStyleSheet;
}
export {
  requireThemedStyleSheet as __require
};
