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