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