'use strict';

var getIconHtmlFromIconDefinition = require('./getIconHtmlFromIconDefinition-CcxaDUjV.js');
var index = require('./index-B-Dw-4Qa.js');

function getIconHtmlFromIconName(iconName) {
    let faIcon;
    const usedIconName = iconName.includes('fa') ? iconName : `fa${capitalize(iconName)}`;
    const dynamicIcon = index.solidIcons[usedIconName];
    if (!dynamicIcon) {
        console.error(`Icon "${iconName}" not found"`);
        return null;
    }
    getIconHtmlFromIconDefinition.library$1.add(dynamicIcon);
    faIcon = getIconHtmlFromIconDefinition.icon(dynamicIcon);
    return faIcon ? faIcon.html[0] : null;
}
function capitalize(iconName) {
    if (!iconName) {
        return iconName;
    }
    return iconName.charAt(0).toUpperCase() + iconName.slice(1);
}

exports.getIconHtmlFromIconName = getIconHtmlFromIconName;
//# sourceMappingURL=getIconHtmlFromIconName-C81SQtii.js.map

//# sourceMappingURL=getIconHtmlFromIconName-C81SQtii.js.map