import { create } from "zustand";
import { immer } from "zustand/middleware/immer";

const store = (set) => ({
  updateCounter: -1,

  toggleUpdateCounter: () => {
    set((state) => {
      state.updateCounter = state.updateCounter === -1 ? 1 : -1;
    });
  },
});

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