/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { observable, action, makeObservable } from 'mobx';
export var LINEAGE_VIEW_MODE;
(function (LINEAGE_VIEW_MODE) {
    LINEAGE_VIEW_MODE["CLASS_LINEAGE"] = "CLASS_LINEAGE";
    LINEAGE_VIEW_MODE["DATABASE_LINEAGE"] = "DATABASE_LINEAGE";
    LINEAGE_VIEW_MODE["REPORT_LINEAGE"] = "REPORT_LINEAGE";
    LINEAGE_VIEW_MODE["PROPERTY_LINEAGE"] = "PROPERTY_LINEAGE";
})(LINEAGE_VIEW_MODE || (LINEAGE_VIEW_MODE = {}));
export class LineageState {
    applicationStore;
    selectedTab = LINEAGE_VIEW_MODE.DATABASE_LINEAGE;
    lineageData = undefined;
    isLineageViewerOpen = false;
    selectedPropertyOwnerNode = undefined;
    selectedProperty = undefined;
    selectedSourcePropertiesMap = undefined;
    constructor(applicationStore) {
        makeObservable(this, {
            selectedTab: observable,
            lineageData: observable,
            isLineageViewerOpen: observable,
            selectedPropertyOwnerNode: observable,
            selectedProperty: observable,
            selectedSourcePropertiesMap: observable,
            setSelectedTab: action,
            setLineageData: action,
            setIsLineageViewerOpen: action,
            setSelectedPropertyOwnerNode: action,
            setSelectedProperty: action,
            setSelectedSourcePropertiesMap: action,
            clearPropertySelections: action,
        });
        this.applicationStore = applicationStore;
    }
    setSelectedTab(tab) {
        this.selectedTab = tab;
    }
    setLineageData(data) {
        this.lineageData = data;
    }
    setIsLineageViewerOpen(isOpen) {
        this.isLineageViewerOpen = isOpen;
    }
    setSelectedPropertyOwnerNode(nodeId) {
        this.selectedPropertyOwnerNode = nodeId;
    }
    setSelectedProperty(propertyKey) {
        this.selectedProperty = propertyKey;
    }
    setSelectedSourcePropertiesMap(map) {
        this.selectedSourcePropertiesMap = map;
    }
    clearPropertySelections() {
        this.selectedProperty = undefined;
        this.selectedPropertyOwnerNode = undefined;
        this.selectedSourcePropertiesMap = undefined;
    }
}
//# sourceMappingURL=LineageState.js.map