import type { Channel as StreamChannel, Thread } from 'stream-chat'; import type { ReactNode } from 'react'; import type { ChatView } from './ChatView'; import type { LayoutSlotBinding, SlotName } from './layoutController/layoutControllerTypes'; export type UserListEntitySource = { query: string; }; export type ChannelListEntitySource = Record; export type ThreadListEntitySource = Record; export type SearchResultsEntitySource = { query: string; }; export type UserProfileEntitySource = { userId: string; }; export type ChatViewEntityBinding = { key?: string; kind: 'channelList'; source: ChannelListEntitySource; } | { key?: string; kind: 'threadList'; source: ThreadListEntitySource; } | { key?: string; kind: 'channel'; source: StreamChannel; } | { key?: string; kind: 'thread'; source: Thread; } | { key?: string; kind: 'memberList'; source: StreamChannel; } | { key?: string; kind: 'userList'; source: UserListEntitySource; } | { key?: string; kind: 'searchResults'; source: SearchResultsEntitySource; } | { key?: string; kind: 'pinnedMessagesList'; source: StreamChannel; } | { key?: string; kind: 'userProfile'; source: UserProfileEntitySource; }; export type ChatViewEntityKind = ChatViewEntityBinding['kind']; export type LayoutEntityByKind = Extract; export type ChatViewSlotRendererProps = { entity: LayoutEntityByKind; slot: string; source: LayoutEntityByKind['source']; }; export type ChatViewSlotFallbackProps = { slot: string; }; /** * Per-kind render overrides: `slotRenderers[kind]` replaces only that kind's `Component` and keeps * its built-in `persistent` and `view` policy. */ export type ChatViewSlotRenderers = Partial<{ [TKind in ChatViewEntityKind]: (props: ChatViewSlotRendererProps) => ReactNode; }>; export declare const getChatViewEntityBinding: (binding?: LayoutSlotBinding) => ChatViewEntityBinding | undefined; export declare const createChatViewSlotBinding: (entity: ChatViewEntityBinding) => LayoutSlotBinding; /** * Declarative layout of a view: its slot names plus optional bindings seeded into them. Each layout * keeps its own slot state across view switches. */ export type LayoutDescriptor = { id: ChatView; slots: SlotName[]; initialBindings?: Partial>; }; //# sourceMappingURL=slotBinding.d.ts.map