import { l as library$1, i as icon } from './getIconHtmlFromIconDefinition-2377fd50.js';
import { s as solidIcons } from './index-83df969e.js';

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

export { getIconHtmlFromIconName as g };

//# sourceMappingURL=getIconHtmlFromIconName-84400bd5.js.map