import { create } from "zustand";
import { SharedStoreType } from "../types/SharedTypes";

export const useSharedStore = create<SharedStoreType>((set) => ({
  openSidebar: false,
  setOpenSidebar: (value) => set({ openSidebar: value }),
  openNewMessage: false,
  setOpenNewMessage: (value) => set({ openNewMessage: value }),
  draftData: null,
  setDraftData: (draft) => set({ draftData: draft }),
  editingDraftId: null,
  setEditingDraftId: (id) => set({ editingDraftId: id }),
}));
