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