import { create } from "zustand";

interface IUserMenuStore {
    visible: boolean;
    setVisible: (state: boolean) => void;
    clear: () => void;
}

export type UserMenuState = IUserMenuStore;

const useUserMenuStore = create<UserMenuState>()((set) => ({
    visible: false,
    setVisible: (state: boolean) => set(() => ({ visible: state })),
    clear: () =>
        set(() => ({
            visible: false,
        })),
}));

export { useUserMenuStore };
