// The layer's slot rules, shared by the components that render the slots. import type { ChatConversationRow } from './types' /** * dmActionsTarget is the conversation the conversation-actions slot renders * for: the open DM's row when it is a DM, else null (channels never show * the slot, so a call button placed in it appears in DMs only). */ export function dmActionsTarget(dm: ChatConversationRow | null | undefined): ChatConversationRow | null { return dm && dm.type === 'dm' ? dm : null }