import React__default, { useContext, useMemo } from 'react';
import { A as Avatar } from '../chunks/bundle-BlN1UcdM.js';
import { L as LocalizationContext } from '../chunks/bundle-Aca68v_Z.js';
import { b as getOpenChannelAvatar } from '../chunks/bundle-gwYwzrc3.js';
import '../chunks/bundle-CMZSpHeh.js';
import './ImageRenderer.js';
import '../chunks/bundle-DRN8Ufbc.js';
import '../chunks/bundle-Bzds2Ucm.js';
import './Icon.js';
import '../chunks/bundle-XCQLW6rR.js';
import '../chunks/bundle-eddZycld.js';

function ChannelAvatar(_a) {
    var channel = _a.channel, theme = _a.theme, _b = _a.height, height = _b === void 0 ? 56 : _b, _c = _a.width, width = _c === void 0 ? 56 : _c;
    var stringSet = useContext(LocalizationContext).stringSet;
    var memoizedAvatar = useMemo(function () {
        return (React__default.createElement(Avatar, { className: "sendbird-chat-header__avatar--open-channel", src: getOpenChannelAvatar(channel), width: "".concat(width, "px"), height: "".concat(height, "px"), alt: (channel === null || channel === void 0 ? void 0 : channel.name) || stringSet.OPEN_CHANNEL_SETTINGS__NO_TITLE }));
    }, [channel === null || channel === void 0 ? void 0 : channel.coverUrl, theme]);
    return (React__default.createElement(React__default.Fragment, null, memoizedAvatar));
}

export { ChannelAvatar as default };
//# sourceMappingURL=OpenChannelAvatar.js.map
