import { vi } from 'vitest';

// Create mock functions for each custom hook
export const mockUseAuth = vi.fn();
export const mockUseFlyers = vi.fn();
export const mockUseMasterItems = vi.fn();
export const mockUseUserData = vi.fn();
export const mockUseShoppingLists = vi.fn();
export const mockUseWatchedItems = vi.fn();
export const mockUseActiveDeals = vi.fn();
export const mockUseFlyerItems = vi.fn();
export const mockUseAiAnalysis = vi.fn();

// Mock the modules. The factory function returns the mock function.
// By placing these in a central file, any test that imports one of these
// mock functions will automatically have the corresponding hook mocked.
vi.mock('../../hooks/useAuth', () => ({ useAuth: mockUseAuth }));
vi.mock('../../hooks/useFlyers', () => ({ useFlyers: mockUseFlyers }));
vi.mock('../../hooks/useMasterItems', () => ({ useMasterItems: mockUseMasterItems }));
vi.mock('../../hooks/useUserData', () => ({ useUserData: mockUseUserData }));
vi.mock('../../hooks/useShoppingLists', () => ({ useShoppingLists: mockUseShoppingLists }));
vi.mock('../../hooks/useWatchedItems', () => ({ useWatchedItems: mockUseWatchedItems }));
vi.mock('../../hooks/useActiveDeals', () => ({ useActiveDeals: mockUseActiveDeals }));
vi.mock('../../hooks/useFlyerItems', () => ({ useFlyerItems: mockUseFlyerItems }));
vi.mock('../../hooks/useAiAnalysis', () => ({ useAiAnalysis: mockUseAiAnalysis }));
