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