class ClassRegistry {
    constructor() {
        this.registry = new Map();
    }
    addClass(groupName, className, classDefinition) {
        if (!this.registry.has(groupName)) {
            this.registry.set(groupName, new Map());
        }
        const group = this.registry.get(groupName);
        group === null || group === void 0 ? void 0 : group.set(className, classDefinition);
    }
    getClass(groupName, className) {
        var _a;
        return (_a = this.registry.get(groupName)) === null || _a === void 0 ? void 0 : _a.get(className);
    }
    getGroup(groupName) {
        return this.registry.has(groupName)
            ? Array.from(this.registry.get(groupName).values())
            : undefined;
    }
    clear() {
        this.registry.clear();
    }
}
export const classRegistry = new ClassRegistry();
