import { create } from 'zustand';
export const useUsageStore = create((set) => ({
    usage: {},
    isLoading: {},
    lastFetched: {},
    isModalOpen: false,
    modalProvider: null,
    setUsage: (provider, data) => set((s) => ({ usage: { ...s.usage, [provider]: data } })),
    setLoading: (provider, loading) => set((s) => ({ isLoading: { ...s.isLoading, [provider]: loading } })),
    setLastFetched: (provider, time) => set((s) => ({ lastFetched: { ...s.lastFetched, [provider]: time } })),
    openModal: (provider) => set({ isModalOpen: true, modalProvider: provider }),
    closeModal: () => set({ isModalOpen: false, modalProvider: null }),
}));
//# sourceMappingURL=usageStore.js.map