function parseCollectionName(collection) {
    if (!collection) return [];
    const dataSourceCollection = collection.split(':');
    const collectionName = dataSourceCollection.pop();
    var _dataSourceCollection_;
    const dataSourceName = null !== (_dataSourceCollection_ = dataSourceCollection[0]) && void 0 !== _dataSourceCollection_ ? _dataSourceCollection_ : 'main';
    return [
        dataSourceName,
        collectionName
    ];
}
function joinCollectionName(dataSourceName, collectionName) {
    if (!dataSourceName || 'main' === dataSourceName) return collectionName;
    return "".concat(dataSourceName, ":").concat(collectionName);
}
export { joinCollectionName, parseCollectionName };
