import { DataUtilities } from "../../../../Common/DataUtilities";
import { ValidationIssue } from "../../../../Common/IDesignValidationProvider";
export class RuleTableColumn {
    constructor(name) {
        this._id = DataUtilities.generateUniqueId();
        this.name = name;
        this.path = name;
    }
    getStorageData() {
        let data = {};
        Reflect.set(data, "_id", this._id);
        Reflect.set(data, "name", this.name);
        Reflect.set(data, "path", this.path);
        return data;
    }
    setStorageData(data) {
        this._id = Reflect.get(data, "_id");
        this.name = Reflect.get(data, "name");
        this.path = Reflect.get(data, "path");
    }
    getDesignValidationIssues() {
        let issues = [];
        if (this.name === "") {
            issues.push(new ValidationIssue("Column name required"));
        }
        if (!this.path) {
            issues.push(new ValidationIssue("Column data path required"));
        }
        return issues;
    }
}
//# sourceMappingURL=RuleTableRuleColumn.js.map