import { __decorate, __param } from "tslib";
import { Receive, Remotable } from '@aire-ux/aire-condensation';
import GraphConfiguration from '@aire-designer/transfer/configuration/GraphConfiguration';
/* eslint-disable */
function construct(cfg) {
    // @ts-ignore
    return mxgraph({
        mxLoadResources: cfg.loadResources || true,
        mxForceIncludes: cfg.forceIncludes || false,
        mxLoadStylesheets: cfg.loadStylesheets || true,
        mxResourceExtension: cfg.resourceExtension || '.txt',
        mxProductionMode: cfg.productionMode || true,
        mxBasePath: cfg.basePath,
    });
}
/* eslint-enable */
let MxGraphManager = class MxGraphManager {
    constructor(configuration) {
        this.configuration = configuration;
        if (!window.mx) {
            window.mx = construct(configuration);
        }
    }
};
MxGraphManager = __decorate([
    Remotable,
    __param(0, Receive(GraphConfiguration))
], MxGraphManager);
export { MxGraphManager };
//# sourceMappingURL=mxgraph.js.map