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