"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const theme_1 = require("../../context/theme/index.js");
const utils_1 = require("../../utils/index.js");
const Image_1 = tslib_1.__importDefault(require("../Image/Image.js"));
const utils_2 = require("../Media/Image/utils.js");
function isIconSvg(icon) {
    return typeof icon === 'function';
}
const ContentListItemIcon = ({ icon, className, qa }) => {
    const theme = (0, theme_1.useTheme)();
    const iconThemed = (0, utils_1.getThemedValue)(icon, theme);
    if (isIconSvg(iconThemed)) {
        const Icon = iconThemed;
        return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Icon, { className: className }) }));
    }
    const iconData = (0, utils_2.getMediaImage)(iconThemed);
    return (0, jsx_runtime_1.jsx)(Image_1.default, { ...iconData, className: className, qa: qa });
};
exports.default = ContentListItemIcon;
//# sourceMappingURL=ContentListItemIcon.js.map
