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