import { useContext } from 'react'
import AIUserContext from '.'

export const useAIUser = () => {
  const context = useContext(AIUserContext)
  if (!context) {
    throw new Error('useAIUser must be used within a AIUserProvider')
  }
  return context
}
