import React__default, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import Sendbird from './SendbirdProvider.js';
import { u as useMediaQueryContext } from './MediaQueryContext-fbe7af77.js';
import ChannelList from './ChannelList.js';
import Channel from './Channel.js';
import ChannelSettings from './ChannelSettings.js';
import MessageSearchPannel from './MessageSearch.js';
import Thread from './Thread.js';
import { GroupChannelHandler } from '@sendbird/chat/groupChannel';
import useSendbirdStateContext from './useSendbirdStateContext.js';
import { u as uuidv4 } from './uuid-1f1bbd9c.js';
import { V as VOICE_RECORDER_DEFAULT_MAX, a as VOICE_RECORDER_DEFAULT_MIN } from './consts-3c0ff1ed.js';
import './_rollupPluginBabelHelpers-0bc76382.js';
import './withSendbird.js';
import 'css-vars-ponyfill';
import './index.module-9202ebbd.js';
import './actionTypes-45ec82e6.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import './index-e2601165.js';
import './utils/message/getOutgoingMessageState.js';
import './index-d847a382.js';
import './VoiceRecorder/context.js';
import './LocalizationContext-57b46f6c.js';
import './stringSet-7a8ce1ce.js';
import './index-865112db.js';
import './ChannelListProvider-86b6d956.js';
import './topics-5ff88d6f.js';
import './utils-388a790e.js';
import './UserProfileContext-29074346.js';
import './ChannelList/components/ChannelListUI.js';
import './ChannelList/components/ChannelListHeader.js';
import './index-4023d1b2.js';
import './ui/Avatar.js';
import './ui/ImageRenderer.js';
import './ui/Icon.js';
import './ChannelList/components/AddChannel.js';
import './ui/IconButton.js';
import './CreateChannel.js';
import './CreateChannel/components/CreateChannelUI.js';
import './CreateChannelProvider-2b669e7e.js';
import './sendbirdSelectors.js';
import './CreateChannel/components/InviteUsers.js';
import './ui/Modal.js';
import 'react-dom';
import './index-7bff4ce0.js';
import './ui/Button.js';
import './ui/UserListItem.js';
import './ui/MutedAvatarOverlay.js';
import './ui/Checkbox.js';
import './ui/UserProfile.js';
import './ui/ContextMenu.js';
import './ui/SortByRow.js';
import './CreateChannel/components/SelectChannelType.js';
import './ChannelList/components/ChannelPreview.js';
import './ui/ChannelAvatar.js';
import './utils-6f2bb331.js';
import './ui/Badge.js';
import './index-fa140763.js';
import './index-f1701c11.js';
import './ui/Loader.js';
import './index-1ec11afb.js';
import './index-37531f98.js';
import './ui/MentionUserLabel.js';
import './consts-d0b365df.js';
import './ui/TextButton.js';
import './color-2ed716e6.js';
import './Channel/components/TypingIndicator.js';
import './ChannelProvider-b41fde4c.js';
import './compareIds-bc881fe7.js';
import './const-e51dda0c.js';
import '@sendbird/chat/message';
import './useLongPress-fbab35a9.js';
import './ChannelList/components/ChannelPreviewAction.js';
import './EditUserProfile.js';
import './index-5a1c1956.js';
import './ui/Input.js';
import './index-0f22e96e.js';
import './Channel/components/ChannelUI.js';
import './ui/ConnectionStatus.js';
import './Channel/components/ChannelHeader.js';
import './utils-af761f03.js';
import './Channel/components/MessageList.js';
import './Channel/components/Message.js';
import './Channel/components/SuggestedMentionList.js';
import './const-8daee9fc.js';
import './ThreadProvider-a3d3b241.js';
import './Thread/context/types.js';
import './ui/DateSeparator.js';
import './ui/MessageInput.js';
import 'dompurify';
import './consts-d0cfee49.js';
import './consts-7aab5aff.js';
import './tokenize-003bf3f7.js';
import './ui/MessageContent.js';
import './ui/MessageItemMenu.js';
import './types-bffbc5f5.js';
import './ui/MessageItemReactionMenu.js';
import './ui/ReactionButton.js';
import './ui/EmojiReactions.js';
import './ui/ReactionBadge.js';
import './ui/BottomSheet.js';
import './ui/Tooltip.js';
import './ui/TooltipWrapper.js';
import './Message/context.js';
import './ui/AdminMessage.js';
import './ui/TextMessageItemBody.js';
import './index-5141f766.js';
import './ui/MentionLabel.js';
import './ui/LinkLabel.js';
import './ui/FileMessageItemBody.js';
import './ui/ThumbnailMessageItemBody.js';
import './ui/OGMessageItemBody.js';
import './ui/UnknownMessageItemBody.js';
import './ui/QuoteMessage.js';
import './index-ac642e0b.js';
import './ui/ThreadReplies.js';
import './ui/VoiceMessageItemBody.js';
import './ui/ProgressBar.js';
import './VoicePlayer/useVoicePlayer.js';
import './ui/PlaybackTime.js';
import './Channel/components/FileViewer.js';
import './Channel/components/RemoveMessageModal.js';
import './index-3f1fa3f9.js';
import './useDirtyGetMentions-aac697f4.js';
import './Channel/components/UnreadCount.js';
import './Channel/components/FrozenNotification.js';
import './Channel/components/MessageInput.js';
import './ui/QuoteMessageInput.js';
import './VoiceMessageInputWrapper-bdc53de4.js';
import './VoiceRecorder/useVoiceRecorder.js';
import './index-1e5cf284.js';
import './ChannelSettings/components/ChannelSettingsUI.js';
import './ChannelSettings/context.js';
import './ChannelSettings/components/ChannelProfile.js';
import './ChannelSettings/components/EditDetailsModal.js';
import './ChannelSettings/components/ModerationPanel.js';
import './ui/Accordion.js';
import './ui/AccordionGroup.js';
import './context-cde5c2bf.js';
import './ui/Toggle.js';
import './ChannelSettings/components/UserListItem.js';
import './MemberList-6ff1e7fa.js';
import './ChannelSettings/components/LeaveChannel.js';
import './ChannelSettings/components/UserPanel.js';
import './MessageSearch/components/MessageSearchUI.js';
import './MessageSearch/context.js';
import './ui/MessageSearchItem.js';
import './ui/MessageSearchFileItem.js';
import './Thread/components/ThreadUI.js';
import './Thread/components/ParentMessageInfo.js';
import './RemoveMessageModal-625b3778.js';
import './Thread/components/ParentMessageInfoItem.js';
import './ui/FileViewer.js';
import './Thread/components/ThreadHeader.js';
import './Thread/components/ThreadList.js';
import './Thread/components/ThreadListItem.js';
import 'date-fns';
import './Thread/components/ThreadMessageInput.js';

const DesktopLayout = props => {
  const {
    isReactionEnabled,
    replyType,
    isMessageGroupingEnabled,
    allowProfileEdit,
    showSearchIcon,
    onProfileEditSuccess,
    disableAutoSelect,
    currentChannel,
    setCurrentChannel,
    showSettings,
    setShowSettings,
    showSearch,
    setShowSearch,
    highlightedMessage,
    setHighlightedMessage,
    startingPoint,
    setStartingPoint,
    showThread,
    setShowThread,
    threadTargetMessage,
    setThreadTargetMessage
  } = props;
  const [animatedMessageId, setAnimatedMessageId] = useState(null);
  return /*#__PURE__*/React__default.createElement("div", {
    className: "sendbird-app__wrap"
  }, /*#__PURE__*/React__default.createElement("div", {
    className: "sendbird-app__channellist-wrap"
  }, /*#__PURE__*/React__default.createElement(ChannelList, {
    allowProfileEdit: allowProfileEdit,
    activeChannelUrl: currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url,
    onProfileEditSuccess: onProfileEditSuccess,
    disableAutoSelect: disableAutoSelect,
    onChannelSelect: channel => {
      setStartingPoint === null || setStartingPoint === void 0 ? void 0 : setStartingPoint(null);
      setHighlightedMessage === null || setHighlightedMessage === void 0 ? void 0 : setHighlightedMessage(null);
      if (channel) {
        setCurrentChannel(channel);
      } else {
        setCurrentChannel(null);
      }
    }
  })), /*#__PURE__*/React__default.createElement("div", {
    className: `
          ${showSettings ? 'sendbird-app__conversation--settings-open' : ''}
          ${showSearch ? 'sendbird-app__conversation--search-open' : ''}
          sendbird-app__conversation-wrap
        `
  }, /*#__PURE__*/React__default.createElement(Channel, {
    channelUrl: (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url) || '',
    onChatHeaderActionClick: () => {
      setShowSearch(false);
      setShowThread(false);
      setShowSettings(!showSettings);
    },
    onSearchClick: () => {
      setShowSettings(false);
      setShowThread(false);
      setShowSearch(!showSearch);
    },
    onReplyInThread: _ref => {
      let {
        message
      } = _ref;
      // parent message
      setShowSettings(false);
      setShowSearch(false);
      if (replyType === 'THREAD') {
        setThreadTargetMessage(message);
        setShowThread(true);
      }
    },
    onQuoteMessageClick: _ref2 => {
      let {
        message
      } = _ref2;
      // thread message
      setShowSettings(false);
      setShowSearch(false);
      if (replyType === 'THREAD') {
        setThreadTargetMessage(message);
        setShowThread(true);
      }
    },
    onMessageAnimated: () => {
      setAnimatedMessageId(null);
    },
    onMessageHighlighted: () => {
      setHighlightedMessage === null || setHighlightedMessage === void 0 ? void 0 : setHighlightedMessage(null);
    },
    showSearchIcon: showSearchIcon,
    startingPoint: startingPoint,
    animatedMessage: animatedMessageId,
    highlightedMessage: highlightedMessage,
    isReactionEnabled: isReactionEnabled,
    replyType: replyType,
    isMessageGroupingEnabled: isMessageGroupingEnabled
  })), showSettings && /*#__PURE__*/React__default.createElement("div", {
    className: "sendbird-app__settingspanel-wrap"
  }, /*#__PURE__*/React__default.createElement(ChannelSettings, {
    className: "sendbird-channel-settings",
    channelUrl: (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url) || '',
    onCloseClick: () => {
      setShowSettings(false);
    }
  })), showSearch && /*#__PURE__*/React__default.createElement("div", {
    className: "sendbird-app__searchpanel-wrap"
  }, /*#__PURE__*/React__default.createElement(MessageSearchPannel, {
    channelUrl: (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url) || '',
    onResultClick: message => {
      if (message.messageId === highlightedMessage) {
        setHighlightedMessage === null || setHighlightedMessage === void 0 ? void 0 : setHighlightedMessage(null);
        setTimeout(() => {
          setHighlightedMessage === null || setHighlightedMessage === void 0 ? void 0 : setHighlightedMessage(message.messageId);
        });
      } else {
        setStartingPoint === null || setStartingPoint === void 0 ? void 0 : setStartingPoint(message.createdAt);
        setHighlightedMessage === null || setHighlightedMessage === void 0 ? void 0 : setHighlightedMessage(message.messageId);
      }
    },
    onCloseClick: () => {
      setShowSearch(false);
    }
  })), showThread && /*#__PURE__*/React__default.createElement(Thread, {
    className: "sendbird-app__thread",
    channelUrl: (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url) || '',
    message: threadTargetMessage,
    onHeaderActionClick: () => {
      setShowThread(false);
    },
    onMoveToParentMessage: _ref3 => {
      let {
        message,
        channel
      } = _ref3;
      if ((channel === null || channel === void 0 ? void 0 : channel.url) !== (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url)) {
        setCurrentChannel(channel);
      }
      if ((message === null || message === void 0 ? void 0 : message.messageId) !== animatedMessageId) {
        setStartingPoint === null || setStartingPoint === void 0 ? void 0 : setStartingPoint(message === null || message === void 0 ? void 0 : message.createdAt);
      }
      setTimeout(() => {
        setAnimatedMessageId(message === null || message === void 0 ? void 0 : message.messageId);
      }, 500);
    }
  }));
};

var PANELS = /*#__PURE__*/function (PANELS) {
  PANELS["CHANNEL_LIST"] = "CHANNEL_LIST";
  PANELS["CHANNEL"] = "CHANNEL";
  PANELS["CHANNEL_SETTINGS"] = "CHANNEL_SETTINGS";
  PANELS["MESSAGE_SEARCH"] = "MESSAGE_SEARCH";
  PANELS["THREAD"] = "THREAD";
  return PANELS;
}(PANELS || {});
const MobileLayout = props => {
  var _store$stores, _store$stores$sdkStor, _store$config;
  const {
    replyType,
    isMessageGroupingEnabled,
    allowProfileEdit,
    isReactionEnabled,
    showSearchIcon,
    onProfileEditSuccess,
    currentChannel,
    setCurrentChannel,
    highlightedMessage,
    setHighlightedMessage,
    startingPoint,
    setStartingPoint,
    threadTargetMessage,
    setThreadTargetMessage
  } = props;
  const [panel, setPanel] = useState(PANELS.CHANNEL_LIST);
  const [animatedMessageId, setAnimatedMessageId] = useState(null);
  const store = useSendbirdStateContext();
  const sdk = store === null || store === void 0 ? void 0 : (_store$stores = store.stores) === null || _store$stores === void 0 ? void 0 : (_store$stores$sdkStor = _store$stores.sdkStore) === null || _store$stores$sdkStor === void 0 ? void 0 : _store$stores$sdkStor.sdk;
  const userId = store === null || store === void 0 ? void 0 : (_store$config = store.config) === null || _store$config === void 0 ? void 0 : _store$config.userId;
  const goToMessage = (message, timeoutCb) => {
    setStartingPoint === null || setStartingPoint === void 0 ? void 0 : setStartingPoint((message === null || message === void 0 ? void 0 : message.createdAt) || null);
    setTimeout(() => {
      timeoutCb === null || timeoutCb === void 0 ? void 0 : timeoutCb((message === null || message === void 0 ? void 0 : message.messageId) || null);
    }, 500);
  };
  useEffect(() => {
    if (panel !== PANELS.CHANNEL) {
      goToMessage(null, () => setAnimatedMessageId(null));
    }
  }, [panel]);
  useEffect(() => {
    var _sdk$groupChannel;
    const handlerId = uuidv4();
    if (sdk !== null && sdk !== void 0 && (_sdk$groupChannel = sdk.groupChannel) !== null && _sdk$groupChannel !== void 0 && _sdk$groupChannel.addGroupChannelHandler) {
      var _sdk$groupChannel2;
      const handler = new GroupChannelHandler({
        onUserBanned: (groupChannel, user) => {
          if (groupChannel.url === (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url) && (user === null || user === void 0 ? void 0 : user.userId) === userId) {
            setPanel(PANELS.CHANNEL_LIST);
          }
        },
        onChannelDeleted: channelUrl => {
          if (channelUrl === (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url)) {
            setPanel(PANELS.CHANNEL_LIST);
          }
        },
        onUserLeft: (groupChannel, user) => {
          if (groupChannel.url === (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url) && (user === null || user === void 0 ? void 0 : user.userId) === userId) {
            setPanel(PANELS.CHANNEL_LIST);
          }
        }
      });
      sdk === null || sdk === void 0 ? void 0 : (_sdk$groupChannel2 = sdk.groupChannel) === null || _sdk$groupChannel2 === void 0 ? void 0 : _sdk$groupChannel2.addGroupChannelHandler(handlerId, handler);
    }
    return () => {
      var _sdk$groupChannel3, _sdk$groupChannel3$re;
      sdk === null || sdk === void 0 ? void 0 : (_sdk$groupChannel3 = sdk.groupChannel) === null || _sdk$groupChannel3 === void 0 ? void 0 : (_sdk$groupChannel3$re = _sdk$groupChannel3.removeGroupChannelHandler) === null || _sdk$groupChannel3$re === void 0 ? void 0 : _sdk$groupChannel3$re.call(_sdk$groupChannel3, handlerId);
    };
  }, [sdk]);
  return /*#__PURE__*/React__default.createElement("div", null, panel === PANELS.CHANNEL_LIST && /*#__PURE__*/React__default.createElement("div", {
    className: "sb_mobile__panelwrap"
  }, /*#__PURE__*/React__default.createElement(ChannelList, {
    onProfileEditSuccess: onProfileEditSuccess,
    onChannelSelect: channel => {
      setCurrentChannel(channel);
      setPanel(PANELS.CHANNEL);
    },
    allowProfileEdit: allowProfileEdit
    // this condition must be true for mobile
    ,
    disableAutoSelect: true
  })), panel === PANELS.CHANNEL && /*#__PURE__*/React__default.createElement("div", {
    className: "sb_mobile__panelwrap"
  }, /*#__PURE__*/React__default.createElement(Channel, {
    replyType: replyType,
    channelUrl: (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url) || '',
    onSearchClick: () => {
      setPanel(PANELS.MESSAGE_SEARCH);
    },
    onBackClick: () => {
      setPanel(PANELS.CHANNEL_LIST);
    },
    isReactionEnabled: isReactionEnabled,
    showSearchIcon: showSearchIcon,
    isMessageGroupingEnabled: isMessageGroupingEnabled,
    startingPoint: startingPoint,
    animatedMessage: animatedMessageId,
    highlightedMessage: highlightedMessage,
    onChatHeaderActionClick: () => {
      setPanel(PANELS.CHANNEL_SETTINGS);
    },
    onReplyInThread: _ref => {
      let {
        message
      } = _ref;
      if (replyType === 'THREAD') {
        setPanel(PANELS.THREAD);
        setThreadTargetMessage(message);
      }
    },
    onQuoteMessageClick: _ref2 => {
      let {
        message
      } = _ref2;
      // thread message
      if (replyType === 'THREAD') {
        setThreadTargetMessage(message);
        setPanel(PANELS.THREAD);
      }
    }
  })), panel === PANELS.CHANNEL_SETTINGS && /*#__PURE__*/React__default.createElement("div", {
    className: "sb_mobile__panelwrap"
  }, /*#__PURE__*/React__default.createElement(ChannelSettings, {
    channelUrl: (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url) || '',
    onCloseClick: () => {
      setPanel(PANELS.CHANNEL);
    },
    onLeaveChannel: () => {
      setPanel(PANELS.CHANNEL_LIST);
    }
  })), panel === PANELS.MESSAGE_SEARCH && /*#__PURE__*/React__default.createElement("div", {
    className: "sb_mobile__panelwrap"
  }, /*#__PURE__*/React__default.createElement(MessageSearchPannel, {
    channelUrl: (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url) || '',
    onCloseClick: () => {
      setPanel(PANELS.CHANNEL);
    },
    onResultClick: message => {
      setPanel(PANELS.CHANNEL);
      goToMessage(message, messageId => {
        setHighlightedMessage === null || setHighlightedMessage === void 0 ? void 0 : setHighlightedMessage(messageId);
      });
    }
  })), panel === PANELS.THREAD && /*#__PURE__*/React__default.createElement("div", {
    className: "sb_mobile__panelwrap"
  }, /*#__PURE__*/React__default.createElement(Thread, {
    channelUrl: (currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url) || '',
    message: threadTargetMessage,
    onHeaderActionClick: () => {
      setPanel(PANELS.CHANNEL);
    },
    onMoveToParentMessage: _ref3 => {
      let {
        message,
        channel
      } = _ref3;
      setCurrentChannel(channel);
      goToMessage(message, messageId => {
        setPanel(PANELS.CHANNEL);
        setAnimatedMessageId(messageId);
      });
    }
  })));
};

const AppLayout = props => {
  const {
    isReactionEnabled,
    replyType,
    isMessageGroupingEnabled,
    allowProfileEdit,
    showSearchIcon,
    onProfileEditSuccess,
    disableAutoSelect,
    currentChannel,
    setCurrentChannel
  } = props;
  const [showThread, setShowThread] = useState(false);
  const [threadTargetMessage, setThreadTargetMessage] = useState(null);
  const [showSettings, setShowSettings] = useState(false);
  const [showSearch, setShowSearch] = useState(false);
  const [highlightedMessage, setHighlightedMessage] = useState(null);
  const [startingPoint, setStartingPoint] = useState(null);
  const {
    isMobile
  } = useMediaQueryContext();
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, isMobile ? /*#__PURE__*/React__default.createElement(MobileLayout, {
    replyType: replyType,
    isMessageGroupingEnabled: isMessageGroupingEnabled,
    allowProfileEdit: allowProfileEdit,
    isReactionEnabled: isReactionEnabled,
    showSearchIcon: showSearchIcon,
    onProfileEditSuccess: onProfileEditSuccess,
    currentChannel: currentChannel,
    setCurrentChannel: setCurrentChannel,
    highlightedMessage: highlightedMessage,
    setHighlightedMessage: setHighlightedMessage,
    startingPoint: startingPoint,
    setStartingPoint: setStartingPoint,
    threadTargetMessage: threadTargetMessage,
    setThreadTargetMessage: setThreadTargetMessage
  }) : /*#__PURE__*/React__default.createElement(DesktopLayout, {
    isReactionEnabled: isReactionEnabled,
    replyType: replyType,
    isMessageGroupingEnabled: isMessageGroupingEnabled,
    allowProfileEdit: allowProfileEdit,
    showSearchIcon: showSearchIcon,
    onProfileEditSuccess: onProfileEditSuccess,
    disableAutoSelect: disableAutoSelect,
    currentChannel: currentChannel,
    setCurrentChannel: setCurrentChannel,
    showThread: showThread,
    setShowThread: setShowThread,
    threadTargetMessage: threadTargetMessage,
    setThreadTargetMessage: setThreadTargetMessage,
    showSettings: showSettings,
    setShowSettings: setShowSettings,
    showSearch: showSearch,
    setShowSearch: setShowSearch,
    highlightedMessage: highlightedMessage,
    setHighlightedMessage: setHighlightedMessage,
    startingPoint: startingPoint,
    setStartingPoint: setStartingPoint
  }));
};

/**
 * This is a drop in Chat solution
 * Can also be used as an example for creating
 * default chat apps
 */
function App(props) {
  const {
    appId,
    userId,
    accessToken,
    customApiHost,
    customWebSocketHost,
    breakpoint,
    theme,
    userListQuery,
    nickname,
    profileUrl,
    dateLocale,
    config = {},
    isReactionEnabled,
    isMentionEnabled,
    isVoiceMessageEnabled,
    voiceRecord,
    replyType,
    isMessageGroupingEnabled,
    colorSet,
    stringSet,
    allowProfileEdit,
    disableUserProfile,
    disableMarkAsDelivered,
    renderUserProfile,
    showSearchIcon,
    onProfileEditSuccess,
    imageCompression,
    disableAutoSelect,
    isTypingIndicatorEnabledOnChannelList,
    isMessageReceiptStatusEnabledOnChannelList
  } = props;
  const [currentChannel, setCurrentChannel] = useState(null);
  return /*#__PURE__*/React__default.createElement(Sendbird, {
    stringSet: stringSet,
    appId: appId,
    userId: userId,
    accessToken: accessToken,
    customApiHost: customApiHost,
    customWebSocketHost: customWebSocketHost,
    breakpoint: breakpoint,
    theme: theme,
    nickname: nickname,
    profileUrl: profileUrl,
    dateLocale: dateLocale,
    userListQuery: userListQuery,
    config: config,
    colorSet: colorSet,
    disableUserProfile: disableUserProfile,
    disableMarkAsDelivered: disableMarkAsDelivered,
    renderUserProfile: renderUserProfile,
    imageCompression: imageCompression,
    isReactionEnabled: isReactionEnabled,
    isMentionEnabled: isMentionEnabled,
    isVoiceMessageEnabled: isVoiceMessageEnabled,
    voiceRecord: voiceRecord,
    onUserProfileMessage: channel => {
      setCurrentChannel(channel);
    },
    isTypingIndicatorEnabledOnChannelList: isTypingIndicatorEnabledOnChannelList,
    isMessageReceiptStatusEnabledOnChannelList: isMessageReceiptStatusEnabledOnChannelList,
    replyType: replyType
  }, /*#__PURE__*/React__default.createElement(AppLayout, {
    isReactionEnabled: isReactionEnabled,
    replyType: replyType,
    isMessageGroupingEnabled: isMessageGroupingEnabled,
    allowProfileEdit: allowProfileEdit,
    showSearchIcon: showSearchIcon,
    onProfileEditSuccess: onProfileEditSuccess,
    disableAutoSelect: disableAutoSelect,
    currentChannel: currentChannel,
    setCurrentChannel: setCurrentChannel
  }));
}
App.propTypes = {
  appId: PropTypes.string.isRequired,
  userId: PropTypes.string.isRequired,
  accessToken: PropTypes.string,
  customApiHost: PropTypes.string,
  customWebSocketHost: PropTypes.string,
  theme: PropTypes.string,
  userListQuery: PropTypes.func,
  nickname: PropTypes.string,
  profileUrl: PropTypes.string,
  breakpoint: PropTypes.string,
  allowProfileEdit: PropTypes.bool,
  disableUserProfile: PropTypes.bool,
  disableMarkAsDelivered: PropTypes.bool,
  renderUserProfile: PropTypes.func,
  onProfileEditSuccess: PropTypes.func,
  dateLocale: PropTypes.shape({}),
  config: PropTypes.shape({
    // None Error Warning Info 'All/Debug'
    logLevel: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
    isREMUnitEnabled: PropTypes.bool
  }),
  isReactionEnabled: PropTypes.bool,
  replyType: PropTypes.oneOf(['NONE', 'QUOTE_REPLY', 'THREAD']),
  showSearchIcon: PropTypes.bool,
  isMessageGroupingEnabled: PropTypes.bool,
  stringSet: PropTypes.objectOf(PropTypes.string),
  colorSet: PropTypes.objectOf(PropTypes.string),
  imageCompression: PropTypes.shape({
    compressionRate: PropTypes.number,
    resizingWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
    resizingHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
  }),
  disableAutoSelect: PropTypes.bool,
  isMentionEnabled: PropTypes.bool,
  isVoiceMessageEnabled: PropTypes.bool,
  voiceRecord: PropTypes.shape({
    maxRecordingTime: PropTypes.number,
    minRecordingTime: PropTypes.number
  }),
  isTypingIndicatorEnabledOnChannelList: PropTypes.bool,
  isMessageReceiptStatusEnabledOnChannelList: PropTypes.bool
};
App.defaultProps = {
  accessToken: '',
  customApiHost: '',
  customWebSocketHost: '',
  theme: 'light',
  nickname: '',
  profileUrl: '',
  userListQuery: null,
  breakpoint: null,
  dateLocale: null,
  allowProfileEdit: false,
  onProfileEditSuccess: null,
  disableMarkAsDelivered: false,
  showSearchIcon: false,
  renderUserProfile: null,
  config: {},
  voiceRecord: {
    maxRecordingTime: VOICE_RECORDER_DEFAULT_MAX,
    minRecordingTime: VOICE_RECORDER_DEFAULT_MIN
  },
  isMessageGroupingEnabled: true,
  stringSet: null,
  colorSet: null,
  imageCompression: {},
  disableAutoSelect: false,
  isMentionEnabled: false,
  isReactionEnabled: true,
  replyType: 'QUOTE_REPLY',
  disableUserProfile: false,
  isVoiceMessageEnabled: false,
  isTypingIndicatorEnabledOnChannelList: false,
  isMessageReceiptStatusEnabledOnChannelList: false
};

export { App as default };
//# sourceMappingURL=App.js.map
