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