import React__default from 'react';
import { g as getChannelTitle } from '../../chunks/bundle-2U8QpYXo.js';
import { u as useLocalization } from '../../chunks/bundle-Del33VzI.js';
import { G as GroupChannelListItemView } from '../../chunks/bundle-CVD_LLYN.js';
import { u as useGroupChannelList } from '../../chunks/bundle-CnnonhFO.js';
import { u as useSendbird } from '../../chunks/bundle-i_3w58Zd.js';
import '../../chunks/bundle-yl5d1NoZ.js';
import '../../chunks/bundle-mGsud0ec.js';
import '../../chunks/bundle-fdEQfX2s.js';
import '../../chunks/bundle-BZGITC2g.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-MlG9piGf.js';
import '../../chunks/bundle-viBng0Kh.js';
import '../../chunks/bundle-C1dqPUnT.js';
import '../../ui/Loader.js';
import '../../chunks/bundle-vmZ9LoYK.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-DgosLQK9.js';
import '../../chunks/bundle-DEuCwnTn.js';
import '../../chunks/bundle-CqLLOVG5.js';
import '../../chunks/bundle-BhhLSKSz.js';
import '../../chunks/bundle-Cl9rtdlj.js';
import '../../chunks/bundle-Ba_cV-Zm.js';
import '../../chunks/bundle-DBhJIxHw.js';
import '../../GroupChannel/components/TypingIndicator.js';
import '../../chunks/bundle-DGh2T5IL.js';
import '../../chunks/bundle-BUYU9H94.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../ui/Badge.js';
import '../../ui/ChannelAvatar.js';
import '../../chunks/bundle-CAEBoiEz.js';
import '../../ui/ImageRenderer.js';
import '../../chunks/bundle-Dl_v8XoN.js';
import '../../chunks/bundle-B2BBbSEN.js';
import '../../ui/MentionUserLabel.js';
import '../../chunks/bundle-D6b2YGeE.js';
import '../../chunks/bundle-CtQtfJlT.js';
import 'react-dom';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../ui/TextButton.js';
import '../../chunks/bundle-Bokm7tQ9.js';
import '../../chunks/bundle-BwvurfUT.js';
import '@sendbird/uikit-tools';
import '../../chunks/bundle-B0s_McF0.js';
import '../../chunks/bundle-DS1Ocu-E.js';
import '../../chunks/bundle-BmoSvBYM.js';

var GroupChannelListItem = function (_a) {
    var _b, _c, _d;
    var channel = _a.channel, isSelected = _a.isSelected, isTyping = _a.isTyping, renderChannelAction = _a.renderChannelAction, onLeaveChannel = _a.onLeaveChannel, onClick = _a.onClick, tabIndex = _a.tabIndex;
    var config = useSendbird().state.config;
    var stringSet = useLocalization().stringSet;
    var _e = useGroupChannelList().state, isTypingIndicatorEnabled = _e.isTypingIndicatorEnabled, isMessageReceiptStatusEnabled = _e.isMessageReceiptStatusEnabled;
    var userId = config.userId;
    var isMessageStatusEnabled = isMessageReceiptStatusEnabled
        && (!((_b = channel.lastMessage) === null || _b === void 0 ? void 0 : _b.isAdminMessage()))
        && ((_d = (_c = channel.lastMessage) === null || _c === void 0 ? void 0 : _c.sender) === null || _d === void 0 ? void 0 : _d.userId) === userId;
    return (React__default.createElement(GroupChannelListItemView, { channel: channel, tabIndex: tabIndex, channelName: getChannelTitle(channel, userId, stringSet), isTyping: isTypingIndicatorEnabled && isTyping, isSelected: isSelected, isMessageStatusEnabled: isMessageStatusEnabled, onClick: onClick, onLeaveChannel: onLeaveChannel, renderChannelAction: renderChannelAction }));
};

export { GroupChannelListItem };
//# sourceMappingURL=GroupChannelListItem.js.map
