import { useVersionContext } from "../modules/builder/version/versionContext";
import { useSceneContext } from "../modules/scene/sceneContext";
import { useProductContext } from "../modules/simulation/products/productContext";
import { useVersionHistoryStore } from "../store/builder/useVersionHistoryStore";

const useRestStates = () => {
    const { selectedVersionStore } = useVersionContext();
    const { clearSelectedVersion } = selectedVersionStore();
    const { selectedProductStore } = useProductContext();
    const { clearSelectedProduct } = selectedProductStore();
    const { clearVersions } = useVersionHistoryStore();
    const { clearStores } = useSceneContext();

    const resetStates = () => {
        clearSelectedVersion();
        clearSelectedProduct();
        clearVersions();
        clearStores();
    };

    return {
        resetStates,
    };
};

export default useRestStates;