import { create } from 'zustand';
export const useToolApprovalStore = create((set) => ({
    pendingApprovals: [],
    addPendingApproval: (approval) => set((state) => ({
        pendingApprovals: [...state.pendingApprovals, approval],
    })),
    removePendingApproval: (callId) => set((state) => ({
        pendingApprovals: state.pendingApprovals.filter((a) => a.callId !== callId),
    })),
    updatePendingApproval: (callId, args) => set((state) => ({
        pendingApprovals: state.pendingApprovals.map((a) => a.callId === callId ? { ...a, args } : a),
    })),
    clearPendingApprovals: () => set({ pendingApprovals: [] }),
    setPendingApprovals: (approvals) => set({ pendingApprovals: approvals }),
}));
//# sourceMappingURL=toolApprovalStore.js.map