import React__default from 'react';
import { g as getChannelTitle } from '../../chunks/bundle-CQdKG76t.js';
import { useSendbirdStateContext } from '../../useSendbirdStateContext.js';
import { u as useLocalization } from '../../chunks/bundle-BPLoGpIy.js';
import { useGroupChannelListContext } from '../context.js';
import { G as GroupChannelListItemView } from '../../chunks/bundle-DLtA6rcB.js';
import '../../chunks/bundle-B9I7KCZ2.js';
import '../../chunks/bundle-Cme8jJ5D.js';
import '../../chunks/bundle-DnVyKahm.js';
import '../../chunks/bundle-CMgJTzYH.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-B628FXKZ.js';
import '../../chunks/bundle-B1gHpFXu.js';
import '../../chunks/bundle-BwafidOs.js';
import '../../ui/Loader.js';
import '../../chunks/bundle-BGoByD2z.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-ByuZy4m8.js';
import '../../chunks/bundle-K3w8yQDQ.js';
import '../../chunks/bundle-B3xAJZu1.js';
import '../../withSendbird.js';
import '@sendbird/uikit-tools';
import '../../chunks/bundle-DUd6AS_D.js';
import '../../chunks/bundle-CYhNLg4_.js';
import '@sendbird/chat';
import '../../chunks/bundle-B97onQ-B.js';
import '../../chunks/bundle-C6OwelAY.js';
import '../../chunks/bundle-BydEbpDQ.js';
import '../../GroupChannel/components/TypingIndicator.js';
import '../../ui/Badge.js';
import '../../ui/ChannelAvatar.js';
import '../../chunks/bundle-D89r5O-w.js';
import '../../ui/ImageRenderer.js';
import '../../chunks/bundle-DVCGbhaI.js';
import '../../chunks/bundle-BaEyjChY.js';
import '../../ui/MentionUserLabel.js';
import '../../chunks/bundle-BT8XMu5e.js';
import '../../chunks/bundle-DAF0GGlr.js';
import 'react-dom';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import 'css-vars-ponyfill';
import '@sendbird/chat/openChannel';
import '../../chunks/bundle-jVDgtxRn.js';
import '../../chunks/bundle-Mfnn12A9.js';
import '../../chunks/bundle-BfonFE4n.js';
import '../../ui/SortByRow.js';
import '../../ui/TextButton.js';
import '../../chunks/bundle-DDIIh2iG.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 = useSendbirdStateContext().config;
    var stringSet = useLocalization().stringSet;
    var _e = useGroupChannelListContext(), _f = _e.isTypingIndicatorEnabled, isTypingIndicatorEnabled = _f === void 0 ? false : _f, _g = _e.isMessageReceiptStatusEnabled, isMessageReceiptStatusEnabled = _g === void 0 ? false : _g;
    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
