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