"use strict";

exports.__esModule = true;
exports.resolveIn = exports.makeControlled = exports.isClassExists = exports.getFormattedDataHooks = exports.findByHook = exports.findBaseByHook = exports.findBaseByExactHook = exports.ASSET_PREFIX = void 0;
var _reactHelpers = require("@wix/wix-ui-test-utils/react-helpers");
exports.isClassExists = _reactHelpers.isClassExists;
exports.makeControlled = _reactHelpers.makeControlled;
var findBaseByHook = (base, hook) => base.$("[data-hook*=\"".concat(hook, "\"]"));
exports.findBaseByHook = findBaseByHook;
var findBaseByExactHook = (base, hook) => base.$("[data-hook=\"".concat(hook, "\"]"));
exports.findBaseByExactHook = findBaseByExactHook;
var findByHook = (element, hook) => element.querySelector("[data-hook*=\"".concat(hook, "\"]"));
exports.findByHook = findByHook;
var resolveIn = timeout => new Promise(resolve => {
  setTimeout(() => {
    resolve({});
  }, timeout);
});
exports.resolveIn = resolveIn;
var ASSET_PREFIX = exports.ASSET_PREFIX = 'http://localhost:3000/';

/**
 * Formatting all your dataHooks object properties to their query syntax ie. `[data-hook="${value}"]`
 */
var getFormattedDataHooks = dataHooks => {
  var formattedDataHooks = {};
  Object.entries(dataHooks).map(_ref => {
    var [entry, value] = _ref;
    return formattedDataHooks[entry] = "[data-hook=\"".concat(value, "\"]");
  });
  return formattedDataHooks;
};
exports.getFormattedDataHooks = getFormattedDataHooks;
//# sourceMappingURL=index.js.map