import * as LucideIcons from 'lucide-static';
import icons from 'lucide-static/font/info.json' with { type: 'json' };
import lucidePackage from 'lucide-static/package.json' with { type: 'json' };
import { kebabToPascal } from './util/string.js';
import { addNameSpaceXML, encodeSVG } from './util/svg.js';
export const LUCIDE_VERSION = lucidePackage.version;
export function getIcon(iconName) {
    try {
        const kebabName = iconName.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
        const pascalName = kebabToPascal(kebabName);
        if (LucideIcons[pascalName]) {
            const svg = LucideIcons[pascalName];
            const encodedSvg = encodeSVG(addNameSpaceXML(svg));
            return {
                compat: icons[kebabName]?.encodedCode || '',
                iconSvg: encodedSvg,
            };
        }
    }
    catch (e) {
        console.error(`Error loading Lucide icon ${iconName}:`, e);
    }
}
//# sourceMappingURL=LucideDynamicLoader.js.map