import React__default from 'react';
import { g as getChannelTitle } from '../../chunks/bundle-DoOtjsD6.js';
import { useSendbirdStateContext } from '../../useSendbirdStateContext.js';
import { u as useLocalization } from '../../chunks/bundle-CfVl8s4A.js';
import { useGroupChannelListContext } from '../context.js';
import { G as GroupChannelListItemView } from '../../chunks/bundle-B7STKajJ.js';
import '../../chunks/bundle-BL7mChau.js';
import '../../chunks/bundle-C_D936HH.js';
import '../../chunks/bundle-Cj_Dxz14.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-c8Tan9dw.js';
import '../../chunks/bundle-BoHJWlEb.js';
import '../../chunks/bundle-DQaFQR2q.js';
import '../../ui/Loader.js';
import '../../chunks/bundle-ca6IMmD9.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-RX4SHzNN.js';
import '../../chunks/bundle-DOfvZYT8.js';
import '../../chunks/bundle-t2omiCx_.js';
import '../../chunks/bundle-Dp-XZCMz.js';
import '../../withSendbird.js';
import '@sendbird/uikit-tools';
import '../../chunks/bundle-BtIszx7q.js';
import '../../chunks/bundle-PPnIQFif.js';
import 'react-dom';
import '../../chunks/bundle-Bvh73TsV.js';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import 'css-vars-ponyfill';
import '@sendbird/chat';
import '../../chunks/bundle-0P_11xTV.js';
import '@sendbird/chat/openChannel';
import '../../chunks/bundle-hFyf4W91.js';
import '../../chunks/bundle-BjZ9zlI7.js';
import '../../ui/SortByRow.js';
import '../../chunks/bundle-QoBhYyBD.js';
import '../../chunks/bundle-C-LUJN0d.js';
import '../../GroupChannel/components/TypingIndicator.js';
import '../../ui/Badge.js';
import '../../ui/ChannelAvatar.js';
import '../../chunks/bundle-BLuTnfAP.js';
import '../../ui/ImageRenderer.js';
import '../../chunks/bundle-BJvmAi6P.js';
import '../../chunks/bundle-y7An0AyT.js';
import '../../ui/MentionUserLabel.js';
import '../../chunks/bundle-Cdm9wGwJ.js';
import '../../ui/TextButton.js';
import '../../chunks/bundle-CE4y6Xvr.js';
import '../../chunks/bundle-095SzdU2.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
