import { dispatchStateChange } from "../../Dispatcher/UC/DispatchStateChangeUC";
import { UndoRedoEntity, } from "../../UndoRedo/Entities/UndoRedoEntity";
export class SetLandmarkSizeUndoRedo {
    constructor(data, appObjects) {
        this.data = data;
        this.appObjects = appObjects;
        this.undoAction = () => {
            const { landmark, undoSize } = this.data;
            landmark.size = undoSize;
            dispatchStateChange(this.appObjects);
        };
        this.redoAction = () => {
            const { landmark, redoSize } = this.data;
            landmark.size = redoSize;
            dispatchStateChange(this.appObjects);
        };
        const undoRedo = UndoRedoEntity.get(appObjects);
        if (!undoRedo) {
            appObjects.submitWarning("SetLandmarkSizeUndoRedo", "Unable to find UndoRedoEntity");
            return;
        }
        undoRedo.submitAction(this);
    }
}
//# sourceMappingURL=SetLandmarkSizeUndoRedo.js.map