import { Injectable } from '@angular/core';
import * as i0 from "@angular/core";
//TODO: remove if not used in the end
/**
 * Service handling additional data for relations node editor
 */
export class RelationsNodeData {
    constructor() {
        //######################### protected properties #########################
        /**
         * Additional data for components
         */
        this.data = {};
    }
    //######################### public methods #########################
    /**
     * Adds new additional data for node by its id
     * @param id - Id of node that will have new additional data
     * @param data - Data that should be stored
     */
    add(id, data) {
        this.data[id] = data;
    }
    /**
     * Removes additional data for node by its id
     * @param id - Id of node that additional data should be removed
     */
    remove(id) {
        delete this.data[id];
    }
    /**
     * Gets additional data for node by its id
     * @param id - Id of node that additional data should be returned
     */
    get(id) {
        var _a;
        return (_a = this.data[id]) !== null && _a !== void 0 ? _a : null;
    }
}
RelationsNodeData.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: RelationsNodeData, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
RelationsNodeData.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: RelationsNodeData });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: RelationsNodeData, decorators: [{
            type: Injectable
        }] });
//# sourceMappingURL=relationsNodeData.service.js.map