import React__default from 'react';
import { g as getChannelTitle } from '../../chunks/bundle-Dd7rgmeQ.js';
import { u as useLocalization } from '../../chunks/bundle-l_QLKq1Y.js';
import { G as GroupChannelListItemView } from '../../chunks/bundle-BQnpPj5l.js';
import { u as useGroupChannelList } from '../../chunks/bundle-Bc6hXWJF.js';
import { u as useSendbird } from '../../chunks/bundle-I25ah_Bv.js';
import '../../chunks/bundle-B8Grfnrx.js';
import '../../chunks/bundle-Dy1IZ181.js';
import '../../chunks/bundle-DYBTopZK.js';
import '../../chunks/bundle-BYOddwmS.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-CDcu1I4f.js';
import '../../chunks/bundle-HspRRkmy.js';
import '../../chunks/bundle-Y2KBbxRr.js';
import '../../ui/Loader.js';
import '../../chunks/bundle-CgLhYjm5.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-BTxw_tIt.js';
import '../../chunks/bundle-De-3zaYV.js';
import '../../chunks/bundle-Ob7Cw3V-.js';
import '../../chunks/bundle-Dhf37wzM.js';
import '../../chunks/bundle-C8TP-mjp.js';
import '../../chunks/bundle-CJmXP56m.js';
import '../../chunks/bundle-yKqHFFfz.js';
import '../../GroupChannel/components/TypingIndicator.js';
import '../../chunks/bundle-CTkGIdt8.js';
import '../../chunks/bundle-C4OmfIXk.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../ui/Badge.js';
import '../../ui/ChannelAvatar.js';
import '../../chunks/bundle-DgFzcADJ.js';
import '../../ui/ImageRenderer.js';
import '../../chunks/bundle-C_ngoQD_.js';
import '../../chunks/bundle-DS6Kt7YS.js';
import '../../ui/MentionUserLabel.js';
import '../../chunks/bundle-Dp_oW1ks.js';
import '../../chunks/bundle-LnGQMQVt.js';
import 'react-dom';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../ui/TextButton.js';
import '../../chunks/bundle-DED6q4Ti.js';
import '../../chunks/bundle-DT1VcdMs.js';
import '@sendbird/uikit-tools';
import '../../chunks/bundle-BYqblmEM.js';
import '../../chunks/bundle-WsWZ-SJW.js';
import '../../chunks/bundle-C5Pz6wMm.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
