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