{"version":3,"file":"ChannelListContext.mjs","names":[],"sources":["../../../src/context/ChannelListContext.tsx"],"sourcesContent":["import type { PropsWithChildren } from 'react';\nimport React, { createContext, useContext } from 'react';\n\nimport type { ChannelPaginator } from 'stream-chat';\n\nexport type ChannelListContextValue = {\n  /**\n   * The primary (first) channel paginator of the `ChannelManager` on `ChatContext`. Undefined\n   * outside `ChannelLists`.\n   */\n  paginator?: ChannelPaginator;\n};\n\nexport const ChannelListContext = createContext<ChannelListContextValue | undefined>(\n  undefined,\n);\n\n/** Provides the primary channel paginator to the channel lists rendered by `ChannelLists`. */\nexport const ChannelListContextProvider = ({\n  children,\n  value,\n}: PropsWithChildren<{\n  value: ChannelListContextValue;\n}>) => (\n  <ChannelListContext.Provider value={value}>{children}</ChannelListContext.Provider>\n);\n\nexport const useChannelListContext = (): ChannelListContextValue =>\n  useContext(ChannelListContext) ?? {};\n"],"mappings":";;;AAaA,IAAa,qBAAqB,cAChC,KAAA,CACF;;AAGA,IAAa,8BAA8B,EACzC,UACA,YAIA,oBAAC,mBAAmB,UAApB;CAAoC;CAAQ;AAAsC,CAAA;AAGpF,IAAa,8BACX,WAAW,kBAAkB,KAAK,CAAC"}