"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeQueueDescriptor = exports.encodeQueueDescriptor = void 0;
const delimiter = ";";
function encodeQueueDescriptor(tokenId, endpoint) {
    return [tokenId, endpoint].map(encodeURIComponent).join(delimiter);
}
exports.encodeQueueDescriptor = encodeQueueDescriptor;
function decodeQueueDescriptor(id) {
    const [tokenId, endpoint] = id.split(delimiter).map(decodeURIComponent);
    return {
        tokenId,
        endpoint,
    };
}
exports.decodeQueueDescriptor = decodeQueueDescriptor;
//# sourceMappingURL=queue-descriptor.js.map