import { create } from "zustand";

interface State {
    isCollapse: boolean;
}

interface Action {
    setCollapse: (value: boolean) => void;
}

const initialState: State = {
    isCollapse: false,
};

export const useSystemStore = create<State & Action>()((set, get) => {
    return {
        ...initialState,
        setCollapse: (value) => set((state) => ({ ...state, isCollapse: value })),

        reset: () => set(initialState),
    };
});
