/**
 * Copyright 2023 Impulse Innovations Limited
 *
 *
 * 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 type { Reducer } from 'react';
import type { GraphState, SimulationGraph } from '../types';
import { EdgeType, EditorMode } from '../types';
export declare enum GraphActionType {
    ACCEPT_EDGE = "ACCEPT_EDGE",
    ADD_EDGE = "ADD_EDGE",
    ADD_LATENT_NODE = "ADD_LATENT_NODE",
    INIT = "INIT",
    INIT_GRAPH = "INIT_GRAPH",
    REMOVE_EDGE = "REMOVE_EDGE",
    REMOVE_NODE = "REMOVE_NODE",
    RENAME_NODE = "RENAME_NODE",
    REVERSE_EDGE = "REVERSE_EDGE",
    UPDATE_EDGE = "UPDATE_EDGE",
    UPDATE_EDGE_NOTE = "UPDATE_EDGE_NOTE",
    UPDATE_EDGE_TYPE = "UPDATE_EDGE_TYPE",
    UPDATE_NODE = "UPDATE_NODE"
}
interface AcceptEdgeAction {
    source: string;
    target: string;
    type: GraphActionType.ACCEPT_EDGE;
}
interface AddEdgeAction {
    edgeEncoderMode?: boolean;
    source: string;
    target: string;
    type: GraphActionType.ADD_EDGE;
}
interface AddLatentNodeAction {
    position: PIXI.PointData;
    type: GraphActionType.ADD_LATENT_NODE;
}
interface InitGraphAction {
    graph: SimulationGraph;
    editorMode: EditorMode;
    type: GraphActionType.INIT_GRAPH;
}
interface RenameNodeAction {
    label: string;
    node: string;
    type: GraphActionType.RENAME_NODE;
}
interface RemoveEdgeAction {
    edge: [string, string];
    type: GraphActionType.REMOVE_EDGE;
}
interface ReverseEdgeAction {
    edge: [string, string];
    type: GraphActionType.REVERSE_EDGE;
}
interface RemoveNodeAction {
    node: string;
    type: GraphActionType.REMOVE_NODE;
}
interface UpdateEdgeAction {
    extras: Record<string, any>;
    source: string;
    target: string;
    type: GraphActionType.UPDATE_EDGE;
}
interface UpdateEdgeTypeAction {
    edge_type: EdgeType;
    source: string;
    target: string;
    type: GraphActionType.UPDATE_EDGE_TYPE;
}
interface UpdateEdgeNoteAction {
    note: string;
    source: string;
    target: string;
    type: GraphActionType.UPDATE_EDGE_NOTE;
}
interface UpdateNodeAction {
    extras: Record<string, any>;
    node: string;
    type: GraphActionType.UPDATE_NODE;
}
export type GraphAction = AcceptEdgeAction | AddEdgeAction | AddLatentNodeAction | InitGraphAction | RenameNodeAction | RemoveEdgeAction | ReverseEdgeAction | RemoveNodeAction | UpdateEdgeAction | UpdateEdgeTypeAction | UpdateNodeAction | UpdateEdgeNoteAction;
/**
 * The main reducer for applying edits to a graph and keeping the structure consistent.
 *
 * @param state the current state of the graph to apply mutations to
 * @param action the action to perform
 */
export declare const GraphReducer: Reducer<GraphState, GraphAction>;
export declare const GraphActionCreators: {
    acceptEdge: ([source, target]: [string, string]) => AcceptEdgeAction;
    addEdge: (edge: [string, string]) => AddEdgeAction;
    addLatentNode: (position: PIXI.PointData) => AddLatentNodeAction;
    removeEdge: (edge: [string, string]) => RemoveEdgeAction;
    removeNode: (node: string) => RemoveNodeAction;
    renameNode: (node: string, label: string) => RenameNodeAction;
    reverseEdge: (edge: [string, string]) => ReverseEdgeAction;
    updateEdge: (edge: [string, string], extras: Record<string, any>) => UpdateEdgeAction;
    updateEdgeNote: (edge: [string, string], note: string) => UpdateEdgeNoteAction;
    updateEdgeType: (edge: [string, string], symbol: string) => UpdateEdgeTypeAction;
    updateNode: (node: string, extras: Record<string, any>) => UpdateNodeAction;
};
export {};
//# sourceMappingURL=causal-graph-store.d.ts.map