export class BehaviorRegistry {
    factories = new Map();
    register(type, factory) {
        if (this.factories.has(type)) {
            throw new Error(`Behavior type already registered: ${type}`);
        }
        this.factories.set(type, factory);
    }
    create(type) {
        const factory = this.factories.get(type);
        if (!factory) {
            throw new Error(`Unknown behavior type: ${type}`);
        }
        return factory();
    }
}
//# sourceMappingURL=BehaviorRegistry.js.map