import { GraphElement } from '@csnext/cs-data';
import { guidGenerator } from '@csnext/cs-core';
export class GraphDocument extends GraphElement {
    constructor(element) {
        var _a, _b, _c;
        super();
        this.suggestedObservation = [];
        this.doc = {
            type: "doc",
            content: [],
        };
        if (element) {
            Object.assign(this, element);
        }
        if (!this.properties) {
            this.properties = {};
        }
        ;
        this.properties.id = (_a = this.properties.id) !== null && _a !== void 0 ? _a : guidGenerator();
        this.properties.created_time = (_b = this.properties.created_time) !== null && _b !== void 0 ? _b : new Date().getTime();
        this.properties.updated_time = (_c = this.properties.updated_time) !== null && _c !== void 0 ? _c : new Date().getTime();
    }
    get name() {
        var _a, _b;
        return (_b = (_a = this.properties) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : '';
    }
    get _node() {
        return this;
    }
    getNode() {
        return {
            id: this.id, type: 'node', title: this.name, _title: this.name, classId: 'input', properties: {
                name: this.name,
                reliability: this.reliability,
                credibility: this.credibility,
                start: '01-03-2019'
            }
        };
    }
}
export class DocumentNote {
}
//# sourceMappingURL=graph-document.js.map