"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AsyncSEL = exports.AsyncSSELRef = exports.AsyncSELSWatch = exports.AsyncSELCall = exports.AsyncSELGet = void 0;
const AsyncSELGet = (selectable) => {
    return {
        $getSelection: function (data, callback) {
            try {
                const selection = selectable.getSelection();
                callback(selection);
            }
            catch (err) {
                callback(undefined, err.message);
            }
        },
    };
};
exports.AsyncSELGet = AsyncSELGet;
const AsyncSELCall = (selectable) => {
    return {
        $setSelectionRange: function (data) {
            selectable.setSelectionRange(data.start, data.end, data.direction);
        },
    };
};
exports.AsyncSELCall = AsyncSELCall;
const AsyncSELSWatch = (selectable) => {
    return {};
};
exports.AsyncSELSWatch = AsyncSELSWatch;
const AsyncSSELRef = (selectable) => {
    return {};
};
exports.AsyncSSELRef = AsyncSSELRef;
const AsyncSEL = (selectable) => {
    return {
        ...(0, exports.AsyncSELGet)(selectable),
        ...(0, exports.AsyncSELCall)(selectable),
        ...(0, exports.AsyncSELSWatch)(selectable),
        ...(0, exports.AsyncSSELRef)(selectable),
    };
};
exports.AsyncSEL = AsyncSEL;
//# sourceMappingURL=AsyncSEL.js.map