"use strict";

exports.__esModule = true;
exports.SplashUniDriver = SplashUniDriver;
var _unidriver = require("@wix/design-system/dist/testkit/unidriver");
var _unidriver2 = require("../../unidriver");
var _unidriver3 = require("@wix/wix-ui-test-utils/unidriver");
function SplashUniDriver(base, body, {
  dataHook: _
}) {
  const getInitialLoaderBase = () => base.$('[data-hook="initial-loader"]');
  const getInitialLoader = () => (0, _unidriver.LoaderUniDriver)(getInitialLoaderBase(), body);
  return {
    ...(0, _unidriver2.baseUniDriverFactory)(base),
    waitInitialLoader: timeout => getInitialLoaderBase().wait(timeout),
    /** Indicates whether initial loader is in loading status */
    isInitialLoaderLoading: () => getInitialLoader().isLoading(),
    /** Indicates whether initial loader exists */
    initialLoaderExists: () => getInitialLoader().exists(),
    waitInitialLoaderRemoved: timeout => (0, _unidriver3.waitFor)(async () => !(await getInitialLoader().exists()), timeout)
  };
}
//# sourceMappingURL=Splash.uni.driver.js.map