{"version":3,"file":"ChatViewEmptyPlaceholder.mjs","names":[],"sources":["../../../../src/plugins/SlotLayout/ChatViewEmptyPlaceholder.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport { ChatViewContext } from './ChatView';\nimport { useComponentContextIcons, useTranslationContext } from '../../context';\n\n/**\n * What a chat view shows while none of its slots has anything bound, worded for the active view\n * (channels or threads). `ChatView`'s built-in workspace layout renders it; an app rendering its\n * own views places it wherever its empty state goes.\n */\nexport const ChatViewEmptyPlaceholder = () => {\n  const { IconMessageBubble } = useComponentContextIcons();\n  const { t } = useTranslationContext();\n  // Outside a ChatView there is no active view, so the channels wording applies.\n  const activeView = useContext(ChatViewContext)?.activeView ?? 'channels';\n\n  return (\n    <div className='str-chat__chat-view__empty-placeholder'>\n      <IconMessageBubble />\n      <p className='str-chat__chat-view__empty-placeholder-text'>\n        {activeView === 'threads'\n          ? t('slotLayout.chatView.empty.threads.text', 'No thread selected')\n          : t('slotLayout.chatView.empty.channels.text', 'No chat selected')}\n      </p>\n    </div>\n  );\n};\n"],"mappings":";;;;;;;;;;;AAUA,IAAa,iCAAiC;CAC5C,MAAM,EAAE,sBAAsB,yBAAyB;CACvD,MAAM,EAAE,MAAM,sBAAsB;CAEpC,MAAM,aAAa,WAAW,eAAe,CAAC,EAAE,cAAc;CAE9D,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,oBAAC,mBAAD,CAAoB,CAAA,GACpB,oBAAC,KAAD;GAAG,WAAU;aACV,eAAe,YACZ,EAAE,0CAA0C,oBAAoB,IAChE,EAAE,2CAA2C,kBAAkB;EAClE,CAAA,CACA;;AAET"}