"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createPlaywrightBridge = createPlaywrightBridge;
function createPlaywrightBridge(messageListener) {
    return {
        sendToMain: (message) => {
            if (!window.mablSendMessageToMain) {
                return Promise.reject(new Error('PlaywrightBridge: mablSendMessageToMain not available'));
            }
            return window.mablSendMessageToMain(message);
        },
        receiveFromMain: (message) => messageListener(message),
    };
}
