"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OjSwipeActions = void 0;
const OjSwipeActionsBase_1 = require("./OjSwipeActionsBase");
/**
 * The component WebElement for [oj-swipe-actions](../../jsdocs/oj.ojSwipeActions.html).
 * Do not instantiate this class directly, instead, use
 * [ojSwipeActions](../functions/elements.ojSwipeActions-1.html).
 */
class OjSwipeActions extends OjSwipeActionsBase_1.OjSwipeActionsBase {
    // Put overrides here
    /**
     * Performs the specified action.
     *
     * @param {string} value The value of the oj-option associated with the action to perform.
     */
    async doAction(value) {
        await this.getDriver().executeAsyncScript([
            'var elem = arguments[0];',
            'var action = arguments[1];',
            'var done = arguments[2];',
            "require(['ojs/ojcustomelement-utils'], function (utils) {",
            '  var bridge = utils.CustomElementUtils.getElementBridge(elem);',
            '  bridge._WIDGET_INSTANCE._doAction(action).then(done);',
            '});'
        ].join('\n'), this, value);
    }
}
exports.OjSwipeActions = OjSwipeActions;
//# sourceMappingURL=OjSwipeActions.js.map