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