/*
 * Copyright (C) 2016-2020 Kano Computing Ltd.
 * License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
 */
import { ContributionManager } from '../contribution.js';
const registeredRemix = new ContributionManager();
export function registerRemix(id, remix) {
    registeredRemix.register(id, remix);
}
export function createRemix(editor) {
    const RemixConstructor = registeredRemix.get(editor.sourceType);
    if (!RemixConstructor) {
        throw new Error(`Could not create remix: Remix for source type '${editor.sourceType}' was not imported`);
    }
    return new RemixConstructor(editor);
}
export * from './remix.js';
//# sourceMappingURL=index.js.map