// src/contexts/UserDataContext.ts
import React from 'react';
import type { MasterGroceryItem, ShoppingList } from '../types';

export interface UserDataContextType {
  watchedItems: MasterGroceryItem[];
  shoppingLists: ShoppingList[];
  setWatchedItems: React.Dispatch<React.SetStateAction<MasterGroceryItem[]>>;
  setShoppingLists: React.Dispatch<React.SetStateAction<ShoppingList[]>>;
  isLoading: boolean;
  error: string | null;
}

export const UserDataContext = React.createContext<UserDataContextType | undefined>(undefined);