"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ojThematicMap = exports.OjThematicMap = void 0;
const __1 = require("../../");
const OjThematicMap_1 = require("./OjThematicMap");
Object.defineProperty(exports, "OjThematicMap", { enumerable: true, get: function () { return OjThematicMap_1.OjThematicMap; } });
/**
 * Retrieve an instance of [OjThematicMap](../classes/elements.OjThematicMap.html).
 * @example
 * ```javascript
 * import { ojThematicMap } from '@oracle/oraclejet-webdriver/elements';
 * const el = await ojThematicMap(driver, By.id('my-oj-thematic-map'));
 * ```
 * @param driver A WebDriver/WebElement instance from where the element will be
 * searched. If WebDriver is passed, the element will be searched globally in the
 * document. If WebElement is passed, the search will be relative to this element.
 * @param by The locator with which to find the element
 */
async function ojThematicMap(driver, by) {
    const webEl = await driver.findElement(by);
    // Check that the element is of type OjThematicMap
    if (!(webEl instanceof OjThematicMap_1.OjThematicMap)) {
        const tagName = await webEl.getTagName();
        let supplemental = '';
        if (webEl.constructor.name === 'OjThematicMap') {
            supplemental = 'You likely have multiple installations of this package.';
        }
        throw Error(`ojThematicMap(${by}) created ${webEl.constructor.name} for <${tagName}>, but expected ${OjThematicMap_1.OjThematicMap.name}. ${supplemental}`);
    }
    return webEl;
}
exports.ojThematicMap = ojThematicMap;
(0, __1.register)('oj-thematic-map', OjThematicMap_1.OjThematicMap);
//# sourceMappingURL=index.js.map