"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ojStatusMeterGauge = exports.OjStatusMeterGauge = void 0;
const __1 = require("../../");
const OjStatusMeterGauge_1 = require("./OjStatusMeterGauge");
Object.defineProperty(exports, "OjStatusMeterGauge", { enumerable: true, get: function () { return OjStatusMeterGauge_1.OjStatusMeterGauge; } });
/**
 * Retrieve an instance of [OjStatusMeterGauge](../classes/elements.OjStatusMeterGauge.html).
 * @example
 * ```javascript
 * import { ojStatusMeterGauge } from '@oracle/oraclejet-webdriver/elements';
 * const el = await ojStatusMeterGauge(driver, By.id('my-oj-status-meter-gauge'));
 * ```
 * @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 ojStatusMeterGauge(driver, by) {
    const webEl = await driver.findElement(by);
    // Check that the element is of type OjStatusMeterGauge
    if (!(webEl instanceof OjStatusMeterGauge_1.OjStatusMeterGauge)) {
        const tagName = await webEl.getTagName();
        let supplemental = '';
        if (webEl.constructor.name === 'OjStatusMeterGauge') {
            supplemental = 'You likely have multiple installations of this package.';
        }
        throw Error(`ojStatusMeterGauge(${by}) created ${webEl.constructor.name} for <${tagName}>, but expected ${OjStatusMeterGauge_1.OjStatusMeterGauge.name}. ${supplemental}`);
    }
    return webEl;
}
exports.ojStatusMeterGauge = ojStatusMeterGauge;
(0, __1.register)('oj-status-meter-gauge', OjStatusMeterGauge_1.OjStatusMeterGauge);
//# sourceMappingURL=index.js.map