"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IS_TEST_BROWSER_WEBKIT = exports.IS_TEST_BROWSER_FIREFOX = exports.IS_TEST_BROWSER_CHROMIUM = exports.TEST_BROWSER_ENGINE = exports.TEST_BROWSER_TYPE = void 0;
const browserEngines_1 = require("../browserEngines/browserEngines");
const browserTypes_1 = require("../core/browserTypes");
const VALID_TEST_BROWSER_TYPES = ['chrome', 'firefox', 'webkit'];
const browserTypeEnvironmentVariable = process.env.TEST_BROWSER_TYPE?.toLowerCase() ?? 'chrome';
if (browserTypeEnvironmentVariable &&
    !VALID_TEST_BROWSER_TYPES.includes(browserTypeEnvironmentVariable)) {
    throw Error(`Test browser type cannot be ${browserTypeEnvironmentVariable}, it must be one of ${VALID_TEST_BROWSER_TYPES}`);
}
exports.TEST_BROWSER_TYPE = browserTypeEnvironmentVariable;
exports.TEST_BROWSER_ENGINE = browserEngines_1.BrowserTypeToBrowserEngine[exports.TEST_BROWSER_TYPE];
exports.IS_TEST_BROWSER_CHROMIUM = exports.TEST_BROWSER_ENGINE === browserEngines_1.BrowserTypeToBrowserEngine[browserTypes_1.BrowserType.Chrome];
exports.IS_TEST_BROWSER_FIREFOX = exports.TEST_BROWSER_ENGINE === browserEngines_1.BrowserTypeToBrowserEngine[browserTypes_1.BrowserType.Firefox];
exports.IS_TEST_BROWSER_WEBKIT = exports.TEST_BROWSER_ENGINE === browserEngines_1.BrowserTypeToBrowserEngine[browserTypes_1.BrowserType.Webkit];
