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