package it.integry.integrywmsnative.view.dialogs.basket_lu.interfaces;


import it.integry.integrywmsnative.core.expansion.RunnableArgs;

public abstract class DialogBasketLU_BaseViewModel implements IDialogBasketLUViewModel {

    private Runnable mOnPrev;
    private RunnableArgs<Object> mOnDone;

    @Override
    public void setOnPrev(Runnable onPrev) {
        this.mOnPrev = onPrev;
    }

    @Override
    public void setOnDone(RunnableArgs<Object> onDone) {
        this.mOnDone = onDone;
    }


    protected void done(Object data) {
        if(this.mOnDone != null) mOnDone.run(data);
    }

    protected void previous() {
        mOnPrev.run();
    }

}
