import React__default from 'react';
import { g as getChannelTitle } from '../../chunks/bundle-qouYngqR.js';
import { useSendbirdStateContext } from '../../useSendbirdStateContext.js';
import { u as useLocalization } from '../../chunks/bundle-wpc1Fted.js';
import { useGroupChannelListContext } from '../context.js';
import { G as GroupChannelListItemView } from '../../chunks/bundle-fgpwMbpA.js';
import '../../chunks/bundle-KIf79auh.js';
import '../../chunks/bundle-eC1SRuX3.js';
import '../../chunks/bundle-wWnN6K3w.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-DHw1C5gJ.js';
import '../../chunks/bundle-9c5vLDe9.js';
import '../../chunks/bundle-XDy3Cf54.js';
import '../../ui/Loader.js';
import '../../chunks/bundle-LTiCF37t.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-0QDb7-Y_.js';
import '../../chunks/bundle-ubVU4exZ.js';
import '../../chunks/bundle-PYv4lPO3.js';
import '../../withSendbird.js';
import '@sendbird/uikit-tools';
import '../../chunks/bundle-_hGurAcC.js';
import '../../chunks/bundle-PTiTVbcu.js';
import '@sendbird/chat';
import '../../chunks/bundle-hjFxrcMW.js';
import '../../chunks/bundle-lZq_XDzb.js';
import '../../chunks/bundle-Y3ZVN9yF.js';
import '../../GroupChannel/components/TypingIndicator.js';
import '../../ui/Badge.js';
import '../../ui/ChannelAvatar.js';
import '../../chunks/bundle-b2jLXyrm.js';
import '../../ui/ImageRenderer.js';
import '../../chunks/bundle-Sl-oiala.js';
import '../../chunks/bundle-v3VMB7al.js';
import '../../ui/MentionUserLabel.js';
import '../../chunks/bundle-9C7b_-hs.js';
import '../../chunks/bundle-22Jw6ztq.js';
import 'react-dom';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../ui/TextButton.js';
import '../../chunks/bundle-n2BmCgGV.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
