/**
 * Icon registry for storing and retrieving icon SVG content.
 * Icons are keyed by "name:weight" (e.g., "check:regular", "x:bold")
 */
class IconRegistry {
    constructor() {
        this._icons = new Map();
    }
    getKey(name, weight = 'regular') {
        return `${name}:${weight}`;
    }
    /**
     * Register a single icon
     */
    register(name, svg, weight = 'regular') {
        this._icons.set(this.getKey(name, weight), svg);
    }
    /**
     * Register multiple icons at once
     */
    registerMany(icons) {
        for (const icon of icons) {
            this.register(icon.name, icon.svg, icon.weight ?? 'regular');
        }
    }
    /**
     * Get an icon's SVG content
     */
    get(name, weight = 'regular') {
        return this._icons.get(this.getKey(name, weight));
    }
    /**
     * Check if an icon is registered
     */
    has(name, weight = 'regular') {
        return this._icons.has(this.getKey(name, weight));
    }
    /**
     * Get all registered icon keys
     */
    list() {
        return Array.from(this._icons.keys());
    }
}
export const iconRegistry = new IconRegistry();
