import { LoaderUniDriver } from '@wix/design-system/dist/testkit/unidriver';
import { baseUniDriverFactory } from '../../unidriver';
import { waitFor } from '@wix/wix-ui-test-utils/unidriver';
export function SplashUniDriver(base, body, { dataHook: _ }) {
    const getInitialLoaderBase = () => base.$('[data-hook="initial-loader"]');
    const getInitialLoader = () => LoaderUniDriver(getInitialLoaderBase(), body);
    return {
        ...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) => waitFor(async () => !(await getInitialLoader().exists()), timeout),
    };
}
//# sourceMappingURL=Splash.uni.driver.js.map