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

export const useChatConfig = () => {
  const context = useContext(ChatConfigContext)
  if (!context) {
    throw new Error('useChatConfig must be used within a ChatConfigProvider')
  }
  return context
}
