import { create } from "zustand";
import { immer } from "zustand/middleware/immer";
import { MODES } from "../config";

const store = (set) => ({
  mode: MODES.INITIAL,

  setMode: (mode) => {
    set((state) => {
      state.mode = mode;
    });
  },
});

export const useMode = create(immer(store));
