"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const webViewUtil_1 = require("../util/webViewUtil");
class ElementContextSwitcher {
    driver;
    constructor(driver) {
        this.driver = driver;
    }
    async switchToNativeContext() {
        return this.driver.switchContext(webViewUtil_1.NATIVE_APP_CONTEXT);
    }
    getAsyncRetryOptions() {
        const maxRetryTime = 20_000;
        const timeout = 350;
        return {
            retries: maxRetryTime / timeout,
            minTimeout: timeout,
            maxTimeout: timeout,
            maxRetryTime,
        };
    }
}
exports.default = ElementContextSwitcher;
